PHPackages                             eliep/avro-rpc-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. eliep/avro-rpc-php

ActiveLibrary[API Development](/categories/api)

eliep/avro-rpc-php
==================

An Avro RPC client in PHP (compatible with the Avro RPC server in Java)

1.7.7-p0(9y ago)48411Apache-2.0PHP

Since Mar 3Pushed 9y ago4 watchersCompare

[ Source](https://github.com/eliep/avro-rpc-php)[ Packagist](https://packagist.org/packages/eliep/avro-rpc-php)[ Docs](https://github.com/eliep/avro-rpc-php)[ RSS](/packages/eliep-avro-rpc-php/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (13)Used By (1)

Avro RPC client for PHP
=======================

[](#avro-rpc-client-for-php)

See [Avro](http://avro.apache.org/) for a full documentation on Avro and its usage in PHP.

This library is a fork of the original Avro library, only adding a php Avro RPC client

Installation
------------

[](#installation)

```
composer require eliep/avro-rpc-php
```

Usage
-----

[](#usage)

### Create a client for your protocol

[](#create-a-client-for-your-protocol)

```
/**
 * $protocol: your Avro protocol as a string
 * $serverHost: Avro RPC Server Host
 * $serverPort: Avro RPC Server Port
 **/

// Parse your avro protocol
$avroProtocol = AvroProtocol::parse($protocol);
// Connect to the server
$client = NettyFramedSocketTransceiver::create($serverHost, $serverPort);
// Retrieve a client
$requestor = new Requestor($avroProtocol, $client);
```

### Request the server

[](#request-the-server)

Simply use the `request` method of the `Requestor` instance. This method has two parameters:

- the message name as defined in your avro protocol
- an array of named parameter as defined by the request part of your message

for example, if your protocol is:

```
{
 ...
 "types": [
     {"type": "record", "name": "SimpleRequest",
      "fields": [{"name": "subject",   "type": "string"}]
     },
     {"type": "record", "name": "SimpleResponse",
      "fields": [{"name": "response",   "type": "string"}]
     }
 ],

 "messages": {
     "testSimpleRequestResponse": {
         "doc" : "Simple Request Response",
         "request": [{"name": "message", "type": "SimpleRequest"}],
         "response": "SimpleResponse"
     }
 }
}
```

```
try {
  $response = $requestor->request('testSimpleRequestResponse', array("message" => array("subject" => "pong")));
  echo "Response received: ".json_encode($response)."\n";
} catch (AvroRemoteException $e) {
  // an error occured on the server while handling the request.
}
```

Example
-------

[](#example)

An RPC client example is located in the `examples/sample_rpc_client.php`. It can be used with the `examples/sample_rpc_server.php` to test the client/server communication.

- Run `php examples/sample_rpc_server.php`
- Then run `php examples/sample_rpc_client.php` in another console.

Test
----

[](#test)

Test can be run with:

```
phpunit test/AllTests.php
```

These are mostly the original Avro test except for the `test/IpcTest.php` files

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 91.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~49 days

Recently: every ~130 days

Total

12

Last Release

3601d ago

Major Versions

0.1.10 → 1.7.7-p02016-08-20

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6548339?v=4)[Elie](/maintainers/eliep)[@eliep](https://github.com/eliep)

---

Top Contributors

[![eliep](https://avatars.githubusercontent.com/u/6548339?v=4)](https://github.com/eliep "eliep (11 commits)")[![jpthomasset](https://avatars.githubusercontent.com/u/2405195?v=4)](https://github.com/jpthomasset "jpthomasset (1 commits)")

---

Tags

rpcserializationavro

### Embed Badge

![Health badge](/badges/eliep-avro-rpc-php/health.svg)

```
[![Health](https://phpackages.com/badges/eliep-avro-rpc-php/health.svg)](https://phpackages.com/packages/eliep-avro-rpc-php)
```

###  Alternatives

[apache/thrift

Apache Thrift RPC system

10.9k2.1M45](/packages/apache-thrift)[grpc/grpc

gRPC library for PHP

508126.2M211](/packages/grpc-grpc)[sajya/server

Easy implementation of the JSON-RPC 2.0 server for the Laravel framework.

2392.0M6](/packages/sajya-server)[lstrojny/fxmlrpc

Fast and tiny XML/RPC client with bridges for various HTTP clients

1415.6M32](/packages/lstrojny-fxmlrpc)[tivoka/tivoka

The universal JSON-RPC client/server library. JSON-RPC done right!

75161.8k3](/packages/tivoka-tivoka)[jsonrpc/jsonrpc

JSON-RPC 2.0 client/server implementation

44413.7k4](/packages/jsonrpc-jsonrpc)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
