Coder Social home page Coder Social logo

react-1's Introduction

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, interaction with processes. Third-party libraries can use these components to create async network clients/servers and more.

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).

Design goals

  • Usable with a bare minimum of PHP extensions, add more extensions to get better performance.
  • Provide a standalone event-loop component that can be re-used by other libraries.
  • Decouple parts so they can be replaced by alternate implementations.

ReactPHP is non-blocking by default. Use workers for blocking I/O.

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

Talks

Getting started

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

The recommended way to install these components is through Composer. New to Composer?

For example, this may look something like this:

$ composer require react/event-loop react/http

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.

Documentation

Superficial documentation can be found in the README files of the individual components. See vendor/react/*/src/README.md.

Community

Check out #reactphp on irc.freenode.net. Also follow @reactphp on twitter.

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 on Travis CI. 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.

react-1's People

Contributors

arghav avatar arnaud-lb avatar artggd avatar beaucollins avatar cameronjacobson avatar cboden avatar cgcai avatar clue avatar cystbear avatar danielruf avatar e3betht avatar elliot avatar h4cc avatar hannesvdvreken avatar igorw avatar irvyne avatar jmalloc avatar jmikola avatar jsor avatar lt avatar mykiwi avatar nrk avatar pborreli avatar robinvdvleuten avatar romainneutron avatar sgoettschkes avatar whatthejeff avatar wyrihaximus avatar yuya-takeyama avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.