laruence/yar
FreeLight, concurrent RPC framework for PHP & C
FreeFree tier
About laruence/yar
Yar (Yet Another RPC framework) is a lightweight, concurrent RPC framework for PHP, implemented as a PECL extension. It enables fast and simple communication between PHP applications, supporting multiple data packagers (PHP, JSON, MsgPack) and multiple transfer protocols (HTTP, HTTPS, TCP). Yar is designed for ease of use, offering concurrent RPC calls and detailed debug information. It is open source and hosted on GitHub.
Key Features
Concurrent RPC calls
Multiple data packagers: PHP, JSON, MsgPack
Multiple transfer protocols: HTTP, HTTPS, TCP
Easy to set up as a PHP extension
Detailed debug information
Supports persistent connections and custom headers
Pros & Cons
Pros
- Fast and lightweight
- Simple API for both server and client
- Concurrent remote calls improve performance
- Supports multiple serialization formats
- Open source with active maintenance
Cons
- Primarily for PHP (client may need PHP)
- Requires installation as a PHP extension
- Optional MsgPack support needs extra installation
- Not an AI tool; no machine learning capabilities
Best For
Communication between PHP applicationsBuilding microservices with PHP backendsRemote procedure calls in clustered PHP environments
FAQ
What is Yar?
Yar (Yet Another RPC framework) is a lightweight, concurrent RPC framework for PHP that provides easy communication between PHP applications and supports concurrent remote calls.
What are the requirements for Yar?
PHP 7.0+ (master branch) and the Curl and Json extensions. MsgPack is optional. For PHP 5.2+ use the php5 branch.
How do I install Yar?
Yar can be installed via PECL: pecl install yar. Alternatively, compile it from source using phpize and ./configure.
What data packagers does Yar support?
Yar supports PHP, JSON, and MsgPack (optional) data packagers. The default packager can be set via the yar.packager configuration.