PHPackages                             polytalk/polytalk - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. polytalk/polytalk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

polytalk/polytalk
=================

Protocol to communicate between languages.

79[1 issues](https://github.com/andruu/polytalk-php/issues)PHP

Since Nov 30Pushed 13y ago1 watchersCompare

[ Source](https://github.com/andruu/polytalk-php)[ Packagist](https://packagist.org/packages/polytalk/polytalk)[ RSS](/packages/polytalk-polytalk/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Polytalk
========

[](#polytalk)

Polytalk is a simple protocol which allows communication between different languages via TCP.

Polytalk currently supports PHP, Node.js and Ruby.

Protocol
--------

[](#protocol)

The protocol is a simple language agnostic JSON object containing the class, method and arguments. It will then return an response as either a string or JSON object.

Key Valueclass The class to call the method on. Namespaced classes require the `::` separator.method The method you want to call.arguments The arguments to inject into the method in key value pairs.Installation
------------

[](#installation)

The recommended way to install Polytalk is [through composer](http://getcomposer.org/).

```
"require": {
  "polytalk/polytalk": "dev-master"
}
```

Server Example
--------------

[](#server-example)

Be sure that any classes you want to be exposed by the server to the client are included/required from the server.

```
$server = new Polytalk\Server(['port' => 9090]);
$server->run(function ($connection, $request) use ($server) {
  $response = $server->call($request);
  $server->push($connection, $response);
});
```

Client Example
--------------

[](#client-example)

```
$client  = new Polytalk\Client(['port' => 9090]);

$request = [
    'class' => 'Model::Order',
    'method' => 'findBySize',
    'arguments' => [
        'size' => 'small',
        'limit' => 3
    ]
];

// Return response
$response = $client->call($request);
var_dump($response);

// Callback
$first_order = $client->call($request, function ($response) {
  return $response[0];
});
var_dump($first_order);
```

### License

[](#license)

MIT, see LICENSE.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/150730?v=4)[Andrew Weir](/maintainers/andruu)[@andruu](https://github.com/andruu)

---

Top Contributors

[![andruu](https://avatars.githubusercontent.com/u/150730?v=4)](https://github.com/andruu "andruu (19 commits)")

### Embed Badge

![Health badge](/badges/polytalk-polytalk/health.svg)

```
[![Health](https://phpackages.com/badges/polytalk-polytalk/health.svg)](https://phpackages.com/packages/polytalk-polytalk)
```

###  Alternatives

[flagsmith/flagsmith-php-client

18806.3k2](/packages/flagsmith-flagsmith-php-client)

PHPackages © 2026

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