Event-driven, non-blocking I/O with PHP.

Related tags

Event php reactphp
Overview
ReactPHP Logo

Event-driven, non-blocking I/O with PHP.

Build Status

ReactPHP is a low-level library for event-driven programming in PHP. At its core is an event loop, on top of which it provides low-level utilities, such as: Streams abstraction, async DNS resolver, network client/server, HTTP client/server and interaction with processes. Third-party libraries can use these components to create async network clients/servers and more.

ReactPHP is production ready and battle-tested with millions of installations from all kinds of projects around the world. Its event-driven architecture makes it a perfect fit for efficient network servers and clients handling hundreds or thousands of concurrent connections, long-running applications and many other forms of cooperative multitasking with non-blocking I/O operations. What makes ReactPHP special is its vivid ecosystem with hundreds of third-party libraries allowing you to integrate with many existing systems, such as common network services, database systems and other third-party APIs.

  • Production ready and battle-tested.
  • Rock-solid with stable long-term support (LTS) releases.
  • Requires no extensions and runs on any platform - no excuses!
  • Takes advantage of optional extensions to get better performance when available.
  • Highly recommends latest version of PHP 7+ for best performance and support.
  • Supports legacy PHP 5.3+ and HHVM for maximum compatibility.
  • Well designed and reusable components.
  • Decoupled parts so they can be replaced by alternate implementations.
  • Carefully tested (unit & functional).
  • Promotes standard PSRs where possible for maximum interoperability.
  • Aims to be technology neutral, so you can use your preferred application stack.
  • Small core team of professionals supported by large network of outside contributors.

ReactPHP is non-blocking by default. Use workers for blocking I/O. The event loop is based on the reactor pattern (hence the name) and strongly inspired by libraries such as EventMachine (Ruby), Twisted (Python) and Node.js (V8).

This repository you're currently looking at is mostly used as a meta repository to discuss and plan all things @ReactPHP. See the individual components linked below for more details about each component, its documentation and source code.

Core Components

Network Components

  • Socket Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP. Read the documentation

  • Datagram Event-driven UDP client and server sockets for ReactPHP. Read the documentation

Protocol Components

Utility Components

Built with ReactPHP

  • Thruway PHP Client and Router Library for Autobahn and WAMP (Web Application Messaging Protocol) for Real-Time Application Messaging voryx/Thruway

  • PPM - PHP Process Manager PPM is a process manager, supercharger and load balancer for modern PHP applications. php-pm/php-pm

  • php-ar-drone 🚁 Port of node-ar-drone which allows user to control a Parrot AR Drone over PHP jolicode/php-ar-drone

  • Ratchet Asynchronous WebSocket server ratchetphp/Ratchet

  • Predis\Async Asynchronous PHP client library for Redis built on top of ReactPHP nrk/predis-async

  • clue/redis-server A Redis server implementation in pure PHP clue/redis-server

And many more on our wiki page »

Articles

  • Sergey Zhuk A series of articles covering ReactPHP: from the basics to the real application examples. sergeyzhuk.me

  • Cees-Jan Kiewiet Blog series about several ReactPHP components and how they work. blog.wyrihaximus.net

  • Loïc Faugeron Super Speed Symfony - ReactPHP. gnugat.github.io

  • Marc J. Schmidt Bring High Performance Into Your PHP App (with ReactPHP). marcjschmidt.de

  • Marc Morera When ReactPHP meet Symfony medium.com/@apisearch

Talks

Getting started

ReactPHP consists of a set of individual components. This means that instead of installing something like a "ReactPHP framework", you actually pick only the components that you need.

This project follows SemVer for all its stable components. The recommended way to install these components is through Composer. New to Composer?

For example, this may look something like this:

# recommended install: pick required components
$ composer require react/event-loop react/http

As an alternative, we also provide a meta package that will install all stable components at once. Installing this is only recommended for quick prototyping, as the list of stable components may change over time. This meta package can be installed like this:

# quick protoyping only: install all stable components
$ composer require react/react:^1.1

For more details, check out ReactPHP's homepage for quickstart examples and usage details.

See also the combined changelog for all ReactPHP components for details about version upgrades.

Support

Do you have a question and need help with ReactPHP? Don't worry, we're here to help!

As a first step, check the elaborate documentation that comes with each component (see links to individual documentation for each component above). If you find your question is not answered within the documentation, there's a fair chance that it may be relevant to more people. Please do not hesitate to file your question as an issue in the relevant component so others can also participate.

You can also check out our official Gitter chat room. Most of the people involved in this project are available in this chat room, so many questions get answered in a few minutes to some hours. We also use this chat room to announce all new releases and ongoing development efforts, so consider staying in this chat room for a little longer.

Also follow @reactphp on Twitter for updates. We use this mostly for noteworthy, bigger updates and to keep the community updated about ongoing development efforts. You can always use the #reactphp hashtag if you have anything to share!

We're a very open project and we prefer public communication whenever possible, so that more people can participate and help getting the best solutions available. At the same time, we realize that some things are better addressed in private. Whether you just want to say thank you, want to report a security issue or want to help sponsor a certain feature development, you can reach out to the core team in private by sending an email to [email protected]. Please keep in mind that we're a small team of volunteers and do our best to support anybody reaching out.

Do you want to support ReactPHP? Awesome! Let's start with letting the the world know why you think ReactPHP is awesome and try to help others getting on board! Send a tweet, write a blog post, give a talk at your local user group or conference or even write a book. There are many ways you can help. You can always reach out to us in private and help others in our support channels. Thank you!

Tests

To run the test suite, you first need to clone this repo and then install all dependencies through Composer:

$ composer install

To run the test suite, go to the project root and run:

$ php vendor/bin/phpunit

The test suite also contains a number of functional integration tests that rely on a stable internet connection. Due to the vast number of integration tests, these are skipped by default during CI runs. If you also do not want to run these, they can simply be skipped like this:

$ php vendor/bin/phpunit --exclude-group internet

License

MIT, see LICENSE.

Comments
  • Implemented some experimental event loops with nextTick() support.

    Implemented some experimental event loops with nextTick() support.

    I fully expect that this PR will be rejected in its current form, but I needed a place to start a discussion about it.

    This pull-request attempts to provide a reliable way to register callbacks on the event-loop that are executed with the following guarantees:

    On each tick of the engine:

    • the callbacks are executed in the same order as they are enqueued
    • the callbacks are executed before any pending timer or IO events
    • callbacks registered within an existing callback will also execute before IO events

    As best I can tell this matches the current behaviour of process.nextTick() in nodejs (0.10.x), and as such I have dared to call the feature 'nextTick'. Please correct any misconceptions I have about this :) (see #92)

    There is one new interface:

    • NextTickLoopInterface - adds the nextTick() method to the existing LoopInterface

    And two implementations:

    • ExtEventLoop - uses ext-event (OOP bindings for libevent, see #161)
    • StreamSelectNextTickLoop - a stream_select() based loop

    Both implementations are tested against the existing abstract test cases for loops and timers.

    I haven't had a chance to try libev or libuv yet, but I will attempt to provide implementations based on both of those libraries if this PR is well received.

    I chose not to completely replace the existing stream_select() based loop at this stage, but there is no reason it would need to remain if the implementation proposed in this PR is accepted in the future.

    Finally, I also added some doc-blocks to LoopInterface to clarify the guarantees made in regards to timer behaviour (in contrast to nextTick() behaviour) and return values.

    Edit: Notably absent is any concept of minimum resolution for timers, I was speaking with @nrk about this on IRC and we talked about the possibility of allowing users to configure the resolution, perhaps that is now unnecessary.

    event-loop 
    opened by jmalloc 39
  • WIP: ChildProcess

    WIP: ChildProcess

    This is just a proposal. And no unit-test code is available now.

    Please give me advices for...

    • Better API
      • Should the constructor param of Process be Stream object or resource variable?
    • Better naming
      • Factory? Executor?
    • Better implementation
    • ..and so on

    Below is the result of example code

    $ php examples/child-process.php 
    [A] [PID]    pid is 68466
    [A] [CMD]    php '-r' 'foreach (range(1, 3) as $i) { echo $i, PHP_EOL; sleep(1); } fputs(STDERR, "Bye.");'
    [B] [PID]    pid is 68467
    [B] [CMD]    php '-r' 'foreach (range(1, 6) as $i) { echo $i, PHP_EOL; sleep(1); } fputs(STDERR, "Bye.");'
    [C] [PID]    pid is 68468
    [C] [CMD]    php '-r' 'foreach (range(1, 9) as $i) { echo $i, PHP_EOL; sleep(1); } fputs(STDERR, "Bye.");'
    [C] [STDOUT] string(2) "1\n"
    [A] [STDOUT] string(2) "1\n"
    [B] [STDOUT] string(2) "1\n"
    [A] [STDOUT] string(2) "2\n"
    [B] [STDOUT] string(2) "2\n"
    [C] [STDOUT] string(2) "2\n"
    [A] [STDOUT] string(2) "3\n"
    [C] [STDOUT] string(2) "3\n"
    [B] [STDOUT] string(2) "3\n"
    [B] [STDOUT] string(2) "4\n"
    [C] [STDOUT] string(2) "4\n"
    [A] [STDERR] string(4) "Bye."
    [A] [STDOUT] string(0) ""
    [A] [STDERR] string(0) ""
    [A] [EXIT]   exited with status code 0
    [B] [STDOUT] string(2) "5\n"
    [C] [STDOUT] string(2) "5\n"
    [B] [STDOUT] string(2) "6\n"
    [C] [STDOUT] string(2) "6\n"
    [B] [STDOUT] string(0) ""
    [B] [STDERR] string(4) "Bye."
    [B] [STDERR] string(0) ""
    [B] [EXIT]   exited with status code 0
    [C] [STDOUT] string(2) "7\n"
    [C] [STDOUT] string(2) "8\n"
    [C] [STDOUT] string(2) "9\n"
    [C] [STDERR] string(4) "Bye."
    [C] [STDOUT] string(0) ""
    [C] [STDERR] string(0) ""
    [C] [EXIT]   exited with status code 0
    

    Currently, empty string is emitted when a process is exiting. It seems because of implementation difference of Stream->handleData() and Connection->handleData().

    https://github.com/react-php/react/blob/2a43233661bd148c3eaa9214a89558669d202828/src/React/Socket/Connection.php#L14 https://github.com/react-php/react/blob/2a43233661bd148c3eaa9214a89558669d202828/src/React/Stream/Stream.php#L114

    Connection->handleData() closes when hendled empty string and not emits data event then. But Stream->handleData() emits empty string.

    What is the difference for?

    opened by yuya-takeyama 32
  • Add libuv eventloop + filesystem

    Add libuv eventloop + filesystem

    Took @chobie's implementation of libuveventloop Implemented libuvfilesystem

    ISSUE:

    removeStream() fails, since libuv doesn't handle streams the same way libev does. You cannot open two streams on one input, it's only one stream with different flags. So, these lines

            $this->loop->addReadStream($input, $this->expectCallableOnce());
            $this->loop->addWriteStream($input, $this->expectCallableOnce());
    

    basically come to calling:

    • uv_poll_init() to init a stream.
    • uv_poll_start() with UV::READABLE flag to start a read stream
    • uv_poll_start() with UV:WRITABLE flag to start a write stream.

    The matter is that addReadStream()'s callback never gets called.

    People from libuv's IRC channel suggested me to use uv_stop(), in this way:

    • uv_poll_init() to init a stream.
    • uv_poll_start() with UV::READABLE flag to start a read stream
    • uv_poll_stop() to stop the stream, while making sure to save the flags from current poll
    • uv_poll_start() with both UV::WRITABLE and UV::READABLE flags to start a new read/write stream.

    But the issue's still here, since addReadStream()'s callback still never gets called.

    What should I do about it ?

    opened by csaoh 29
  • HTTP client

    HTTP client

    This adds a very simple HTTP client implementation (1.0; no keep-alive, no chunked encoding)

    Fixes #58

    Usage example:

    <?php
    
    $loop = React\EventLoop\Factory::create();
    
    $dnsResolverFactory = new React\Dns\Resolver\Factory();
    $dnsResolver = $dnsResolverFactory->createCached('8.8.8.8', $loop);
    
    $factory = new React\HttpClient\Factory();
    $client = $factory->create($loop, $dnsResolver);
    
    $request = $client->request('GET', 'https://github.com/');
    $request->on('response', function ($response) {
        $response->on('data', function ($data) {
            // ...
        });
    });
    $request->end();
    
    opened by arnaud-lb 23
  • HipHop VM testing

    HipHop VM testing

    Travis CI added hhvm as possible PHP version to test against. Because hhvm is an emerging alternative PHP VM it's interesting to keep an eye on it. By adding it to the test matrix we can see how our code (changes) respond on hhvm. Since it's not critical and AFAIK a goal to work on hhvm I've added it to allow failures. So we don't have to worry about breaking the tests if it doesn't work in hhvm just yet.

    opened by WyriHaximus 19
  • Discussion about the communication channel

    Discussion about the communication channel

    ATM, ReactPHP has IRC as the official communication channel.

    From my point of view, if we want to increase this community, which in fact should be insane, we should try to transform this community in order to be more easy for the people to ask, respond and solve problems. Otherwise, frustration is what people have, and this is usually synonym to "bounce rate".

    I can understand that some people don't like Slack because is not open source, but as far as I see, Slack communities are, at this precise moment, the most growing communities. That could help a lot ReactPHP to start growing as it deserves.

    This is my proposal. Let the discussion start :D

    question help wanted 
    opened by mmoreram 18
  • popen() streams sometimes block the event loop

    popen() streams sometimes block the event loop

    I'm writing a small application using React and Ratchet that opens up a few long-running external processes, and redirects some of their output (via stdout) through a websocket connection.

    Using popen and React's stream class to talk to the external process usually works just fine, and the process's output gets sent to the websocket as it executes -- as one would expect. Some processes, however, block the event loop until they've completed running.

    Inside my Ratchet application, I can run

    $ping = new Stream(popen("ping -t 127.0.0.1",'r'),$server->loop);
    $ping->on('data',function($data) use ($from){
        $from->send($data);
    });
    

    and ping will continuously direct its output through my websocket connection, $from.

    However, if I use a different executable (in this case, the Adobe F4V Post-Processor), I get no output from f4vpp, or anything else in my event loop (say, the ping command above) until f4vpp exits.

    $f4vpp = new Stream(popen("f4vpp -v -i in.f4v -o out.mp4",'r'),$server->loop);
    $f4vpp->on('data',function($data) use ($from){
        $from->send($data);
    });
    

    What's going on here? Is this user error, or a legitimate shortcoming in React or PHP on win32?

    stream 
    opened by schmod 18
  • Require PHP 5.4

    Require PHP 5.4

    PHP 5.4.0 was released on 01-Mar-2012. The end of life for PHP 5.3.x is in March 2013.

    The major decision factor is a) ease of getting started; b) ease of deployment.

    Getting started

    In case users do not have PHP 5.4.x on their local machines, we must provide install instructions. For example, OSX ships with 5.3, so we should point users to either php-osx or homebrew-php.

    This seems like an acceptable requirement to me.

    Deployment

    It is critical that major distros ship with PHP 5.4 before we bump the requirement.

    • Ubuntu and Fedora are already doing so.
    • Debian will ship with it in the next release. Which will be around Feb/Mar 2013.
    • I wasn't able to find any info on Centos and RedHat.

    Proposal

    IMO we should wait at least until debian wheezy is out. Which would mean bumping whenever that happens, hopefully within the next 2-3 months.

    Feedback please.

    opened by igorw 17
  • Dns resolver

    Dns resolver

    This PR is based on PR #41. Fixes #19.

    TODO:

    • Benchmark and profile
    • Set up subtree split

    References:

    • RFC1034 Domain Names - Concepts and Facilities
    • RFC1035 Domain Names - Implementation and Specification
    opened by igorw 17
  • [HttpParser] New component

    [HttpParser] New component

    opened by igorw 17
  • Avoid warning when catching signal with pcntl_signal()

    Avoid warning when catching signal with pcntl_signal()

    Creating a temporary error handler when selecting/accepting a stream to avoid warning messages, caused by catching a signal with function pcntl_signal().

    See issue : https://github.com/reactphp/react/issues/296

    event-loop 
    opened by Divi 16
  • Outdated blog posts

    Outdated blog posts

    We should make some revisions about the blog posts and the talks in the main repository README file. For example, the "Super Speed Symfony - ReactPHP" is more than 3 years old, and is based on top of old versions for both Symfony and ReactPHP libraries.

    maintenance help wanted 
    opened by mmoreram 5
Releases(v1.3.0)
  • v1.3.0(Jul 11, 2022)

    A major new feature release, see release announcement.

    • Feature: Add new Async component to core components. (#458 by @clue)

    • Feature: Support PHP 8.1 release. (#451 by @clue)

    • Improve documentation, update HTTP server example for reactphp/http v1.6.0 release. (#449 and #459 by @clue and #457 by @nhedger)

    • Improve test suite, support PHPUnit 9 and update dependencies to avoid skipping tests. (#450 and #454 by @clue and #455 by @SimonFrings)

    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Jul 11, 2021)

  • v1.1.0(Jul 11, 2020)

    A major new feature release, see release announcement.

    • Feature: Add event-driven, streaming HTTP client and server implementation via react/http. (#440 by @clue)

    • Update documentation to link to project meta repo and link to our official Gitter chat room. (#432 and #433 by @clue)

    • Improve test suite to run tests on PHP 7.4 and add .gitattributes to exclude dev files from exports. (#434 by @reedy and #439 by @clue)

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Jul 11, 2019)

    • First stable LTS release, now following SemVer. We'd like to emphasize that this project is production ready and battle-tested. We plan to support all long-term support (LTS) releases for at least 24 months, so you have a rock-solid foundation to build on top of.

    ReactPHP consists of a set of individual components. This means that instead of installing something like a "ReactPHP framework", you actually can pick only the components that you need. As an alternative, we also provide this meta package that will install all stable components at once. Installing this is only recommended for quick prototyping, as the list of stable components may change over time. In other words, this meta package does not contain any source code and instead only consists of links to all our main components, see also our list of components for more details.

    Source code(tar.gz)
    Source code(zip)
  • v0.4.2(Dec 11, 2014)

  • v0.4.1(May 4, 2014)

    Hungry Hungry CPU: CPU starvation bug fixes and other bug fixes.

    • Bug fix: [EventLoop] null timeout in StreamSelectLoop causing 100% CPU usage (@clue)
    • Bug fix: [Socket] Check read buffer for data before shutdown signal and end emit (@ArtyDev)
    • Bug fix: [DNS] Fixed PSR-4 autoload path (@marcj/WyriHaximus)
    • Bug fix: v0.3.4 changes merged for v0.4.1
    Source code(tar.gz)
    Source code(zip)
  • v0.3.4(Jul 5, 2018)

    • Bug fix: [Stream] Fixed 100% CPU spike from non-empty write buffer on closed stream
    • Buf fix: [Socket] Reset socket to non-blocking after shutting down (PHP bug)
    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(Feb 3, 2014)

    Fore!

    • Feature: Added ChildProcess to run async child processes within the event loop (@jmikola)
    • Feature: [EventLoop] Added EventLoopInterface::nextTick(), implemented in all event loops (@jmalloc)
    • Feature: [EventLoop] Added EventLoopInterface::futureTick(), implemented in all event loops (@jmalloc)
    • Feature: [EventLoop] Added ExtEventLoop implementation using pecl/event (@jmalloc)
    • BC break: [HttpClient] Drop unused Response::getBody()
    • BC break: Bump minimum PHP version to PHP 5.4, remove 5.3 specific hacks
    • BC break: Remove $loop argument from HttpClient: Client, Request, Response
    • BC break: Update to React/Promise 2.0
    • BC break: Update to Evenement 2.0
    • BC break: [EventLoop] New method: EventLoopInterface::nextTick()
    • BC break: [EventLoop] New method: EventLoopInterface::futureTick()
    • Bug fix: [Dns] Properly resolve CNAME aliases
    • Dependency: Autoloading and filesystem structure now PSR-4 instead of PSR-0
    Source code(tar.gz)
    Source code(zip)
  • v0.3.3(Jul 9, 2013)

    Connection state bug fixes

    • Bug fix: [EventLoop] No error on removing non-existent streams (@clue)
    • Bug fix: [EventLoop] Do not silently remove feof listeners in LibEvLoop
    • Bug fix: [Stream] Correctly detect closed connections
    Source code(tar.gz)
    Source code(zip)
  • v0.3.2(Jul 5, 2018)

  • v0.3.1(Jul 5, 2018)

    • Feature: [Socket] Support binding to IPv6 addresses (@clue)
    • Feature: [SocketClient] Support connecting to IPv6 addresses (@clue)
    • Bug fix: [Stream] Allow any ReadableStreamInterface on BufferedSink::createPromise()
    • Bug fix: [HttpClient] Correct requirement for socket-client
    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Jul 5, 2018)

    • BC break: [EventLoop] New timers API (@nrk)
    • BC break: [EventLoop] Remove check on return value from stream callbacks (@nrk)
    • BC break: [HttpClient] Socket connection handling moved to new SocketClient component
    • Feature: [SocketClient] New SocketClient component extracted from HttpClient (@clue)
    • Feature: [Stream] Factory method for BufferedSink

    EventLoop

    • The timer callback now receives a Timer instance, with the following useful methods:

      • cancel
      • isActive
      • setData($data)
      • getData

      And some other less common ones. These are prefered over LoopInterface::cancelTimer and LoopInterface::isTimerActive.

    • You can no longer return a boolean from a periodic timer callback to abort it.

    HttpClient

    • HttpClient\*ConnectionManager has been moved to SocketClient\*Connector, and the getConnection method has been renamed to create.

      Before:

      $connectionManager->getConnection($host, $port);

      After:

      $connector->create($host, $port);

    Source code(tar.gz)
    Source code(zip)
  • v0.2.7(Jul 5, 2018)

  • v0.2.6(Jul 5, 2018)

    • Feature: [Cache] New cache component, used by DNS
    • Bug fix: [Http] Emit end event when Response closes (@beaucollins)
    • Bug fix: [EventLoop] Plug memory issue in libevent timers (@cameronjacobson)
    • Bug fix: [EventLoop] Correctly pause LibEvLoop on stop()
    Source code(tar.gz)
    Source code(zip)
  • v0.2.5(Jul 5, 2018)

    • Feature: [Stream] Make BufferedSink trigger progress events on the promise (@jsor)
    • Feature: [HttpClient] Use a promise-based API internally
    • Bug fix: [HttpClient] Use DNS resolver correctly
    Source code(tar.gz)
    Source code(zip)
  • v0.2.4(Jul 5, 2018)

    • Feature: [Stream] Added ThroughStream, CompositeStream, ReadableStream and WritableStream
    • Feature: [Stream] Added BufferedSink
    • Feature: [Dns] Change to promise-based API (@jsor)
    Source code(tar.gz)
    Source code(zip)
  • v0.2.3(Jul 5, 2018)

    • Feature: LibEvLoop, integration of php-libev
    • Bug fix: Forward drain events from HTTP response (@cs278)
    • Dependency: Updated guzzle deps to 3.0.*
    Source code(tar.gz)
    Source code(zip)
  • v0.2.2(Jul 5, 2018)

    • Major: Dropped Espresso as a core component now available as react/espresso only
    • Feature: DNS executor timeout handling (@arnaud-lb)
    • Feature: DNS retry executor (@arnaud-lb)
    • Feature: HTTP client (@arnaud-lb)
    Source code(tar.gz)
    Source code(zip)
  • v0.2.1(Jul 5, 2018)

    • Feature: Support HTTP 1.1 continue
    • Bug fix: Check for EOF in Buffer::write()
    • Bug fix: Make Espresso\Stack work with invokables (such as Espresso\Application)
    • Minor adjustments to DNS parser
    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Jul 5, 2018)

  • v0.1.1(Jul 5, 2018)

  • v0.1.0(Jul 5, 2018)

Owner
ReactPHP
Event-driven, non-blocking I/O with PHP.
ReactPHP
An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols. PHP>=5.3.

Workerman What is it Workerman is an asynchronous event-driven PHP framework with high performance to build fast and scalable network applications. Wo

walkor 10.2k Jan 4, 2023
Événement is a very simple event dispatching library for PHP.

Événement Événement is a very simple event dispatching library for PHP. It has the same design goals as Silex and Pimple, to empower the user while st

Igor 1.2k Jan 4, 2023
A pragmatic event sourcing library for PHP with a focus on developer experience.

EventSaucePHP EventSauce is a somewhat opinionated, no-nonsense, and easy way to introduce event sourcing into PHP projects. It's designed so storage

EventSauce 685 Dec 31, 2022
PHP Application using DDD CQRS Event Sourcing with Hexagonal Architecture

PHP Application using DDD CQRS Event Sourcing with Hexagonal Architecture Application built with Ecotone Framework and powered by integrations with Pr

EcotoneFramework 65 Dec 27, 2022
Revolt is a rock-solid event loop for concurrent PHP applications.

Revolt is a rock-solid event loop for concurrent PHP applications.

Revolt PHP 586 Jan 2, 2023
Infrastructure and testing helpers for creating CQRS and event sourced applications.

Broadway Broadway is a project providing infrastructure and testing helpers for creating CQRS and event sourced applications. Broadway tries hard to n

null 1.5k Dec 27, 2022
[READ-ONLY] The event dispatcher library for CakePHP. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp

CakePHP Event Library This library emulates several aspects of how events are triggered and managed in popular JavaScript libraries such as jQuery: An

CakePHP 21 Oct 6, 2022
Icicle is a PHP library for writing asynchronous code using synchronous coding techniques

Icicle is now deprecated in favor of Amp v2.0. This version is is currently under development, but close to release. The v2.0 branches are amp_v2 in a

icicle.io 1.1k Dec 21, 2022
Asynchronous coroutines for PHP 7.

Recoil An asynchronous coroutine kernel for PHP 7. composer require recoil/recoil The Recoil project comprises the following packages: recoil/api - T

Recoil 787 Dec 8, 2022
PHP 7.4 EventStore Implementation

Prooph Event Store Common classes and interface for Prooph Event Store implementations. Installation You can install prooph/event-store via composer b

null 532 Dec 9, 2022
Reactive extensions for PHP.

This package is abandoned. Use https://github.com/ReactiveX/RxPHP instead Rx.PHP Reactive extensions for PHP. The reactive extensions for PHP are a se

Alexander 208 Apr 6, 2021
Golang's defer statement for PHP

PHP Defer A defer statement originally comes from Golang. This library allows you to use defer functionality in PHP code. Usage <?php defer($context,

null 249 Dec 31, 2022
Reactive extensions for PHP

RxPHP Reactive extensions for PHP. The reactive extensions for PHP are a set of libraries to compose asynchronous and event-based programs using obser

ReactiveX 1.6k Dec 12, 2022
🚀 Coroutine-based concurrency library for PHP

English | 中文 Swoole is an event-driven asynchronous & coroutine-based concurrency networking communication engine with high performance written in C++

Swoole Project 17.7k Jan 5, 2023
Event-driven, non-blocking I/O with PHP.

Event-driven, non-blocking I/O with PHP. ReactPHP is a low-level library for event-driven programming in PHP. At its core is an event loop, on top of

ReactPHP 8.5k Dec 26, 2022
A non-blocking concurrency framework for PHP applications. 🐘

Amp is a non-blocking concurrency framework for PHP. It provides an event loop, promises and streams as a base for asynchronous programming. Promises

Amp 3.8k Jan 6, 2023
A non-blocking concurrency framework for PHP applications. 🐘

Amp is a non-blocking concurrency framework for PHP. It provides an event loop, promises and streams as a base for asynchronous programming. Promises

Amp 3.8k Jan 4, 2023
A non-blocking stream abstraction for PHP based on Amp.

amphp/byte-stream is a stream abstraction to make working with non-blocking I/O simple. Installation This package can be installed as a Composer depen

Amp 317 Dec 22, 2022
A simple RESTful non-blocking API, to send and receive money

A simple RESTful non-blocking API, to send and receive money.

Daniel Rodrigues 3 Dec 19, 2022
An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols. PHP>=5.3.

Workerman What is it Workerman is an asynchronous event-driven PHP framework with high performance to build fast and scalable network applications. Wo

walkor 10.2k Jan 4, 2023