amp - A non-blocking concurrency framework for PHP applications.

  •        80

Amp is a non-blocking concurrency framework for PHP. It provides an event loop, promises and streams as a base for asynchronous programming.Promises in combination with generators are used to build coroutines, which allow writing asynchronous code just like synchronous code, without any callbacks.

http://amphp.org/amp
https://github.com/amphp/amp

Tags
Implementation
License
Platform

   




Related Projects

http-server - A non-blocking HTTP application server for PHP based on Amp.

  •    PHP

This package provides a non-blocking HTTP/1.1 and HTTP/2 application server written in PHP based on Amp. Several features are provided in separate packages, such as the WebSocket component. The packages was previously named amphp/aerys, but has been renamed to be easier to remember, as many people were having issues with the old name.

artax - An async HTTP/1.1 client for Amp.

  •    PHP

Artax is an asynchronous HTTP/1.1 client for Amp. Its API simplifies standards-compliant HTTP resource traversal and RESTful web service consumption without obscuring the underlying protocol. The library manually implements HTTP over TCP sockets; as such it has no dependency on ext/curl.This package can be installed as a Composer dependency.

thread - Unmaintained. Use https://github.com/amphp/parallel.

  •    PHP

This library is unmaintained. Please use https://github.com/amphp/parallel instead.

uvloop - Ultra fast asyncio event loop.

  •    Python

uvloop is a fast, drop-in replacement of the built-in asyncio event loop. uvloop is implemented in Cython and uses libuv under the hood. The project documentation can be found here. Please also check out the wiki.

event-loop - ReactPHP's core reactor event loop that libraries can use for evented I/O.

  •    PHP

ReactPHP's core reactor event loop that libraries can use for evented I/O. In order for async based libraries to be interoperable, they need to use the same event loop. This component provides a common LoopInterface that any library can target. This allows them to be used in the same loop, with one single run() call that is controlled by the user.


Libev - High performance full-featured event loop written in C

  •    C

Libev is a high-performance event loop, supporting eight event types (I/O, real time timers, wall clock timers, signals, child status changes, idle, check and prepare handlers). It uses a priority queue to manage timers and uses arrays as fundamental data structure. It has no artificial limitations on the number of watchers waiting for the same event.

predis-async - Asynchronous PHP client library for Redis built on top of ReactPHP

  •    PHP

Asynchronous (non-blocking) version of Predis, the full-featured PHP client library for Redis, built on top of React to handle evented I/O. By default Predis\Async does not require any additional C extension to work, but it can be optionally paired with phpiredis to sensibly lower the overhead of serializing and parsing the Redis protocol.Predis\Async is currently under development but already works pretty well. The client foundation is being built on top of the event loop abstraction offered by React, an event-oriented framework for PHP that aims to provide everything needed to create reusable libraries and long-running applications using an evented approach powered by non-blocking I/O. This library is partially tested on HHVM, but support for this runtime should be considered experimental.

tokio-core - I/O primitives and event loop for async I/O in Rust

  •    Rust

Core I/O and event loop abstraction for asynchronous I/O in Rust built on futures and mio.You can find extensive documentation and examples about how to use this crate online at https://tokio.rs as well as the examples folder in this repository. The API documentation is also a great place to get started for the nitty-gritty.

libevent - an event notification library

  •    C

The libevent API provides a mechanism to execute a callback function when a specific event occurs on a file descriptor or after a timeout has been reached. It is meant to replace the asynchronous event loop found in event-driven network servers.

p-progress - Create a promise that reports progress

  •    Javascript

Useful for reporting progress to the user during long-running async operations.Same as the Promise constructor, but with an appended progress parameter in executor.

kotlin-coroutines-retrofit - Kotlin Coroutines await() extension for Retrofit Call

  •    Kotlin

Based on kotlinx.coroutines implementation. NOTE: All examples in this README use runBlocking to build coroutine but it is only useful for testing or examples.

aioprocessing - A Python 3.4+ library that integrates the multiprocessing module with asyncio

  •    Python

The aioprocessing objects can be used just like their multiprocessing equivalents - as they are in func above - but they can also be seamlessly used inside of asyncio coroutines, without ever blocking the event loop. In most cases, this library makes blocking calls to multiprocessing methods asynchronous by executing the call in a ThreadPoolExecutor, using asyncio.run_in_executor(). It does not re-implement multiprocessing using asynchronous I/O. This means there is extra overhead added when you use aioprocessing objects instead of multiprocessing objects, because each one is generally introducing a ThreadPoolExecutor containing at least one threading.Thread. It also means that all the normal risks you get when you mix threads with fork apply here, too (See http://bugs.python.org/issue6721 for more info).

AsyncAwait - async/await for Android built upon coroutines introduced in Kotlin 1.1

  •    Kotlin

As you see in the example above, you can write asynchronous code in a imperative style, step by step. Calling await to run code in background doesn't lock the UI thread. And execution continues in UI thread after background work is finished. There is no magic, see how it works. Use it to show loading progress, its second parameter is a progress handler.

co - The ultimate generator based flow-control goodness for nodejs (supports thunks, promises, etc)

  •    Javascript

Generator based control flow goodness for nodejs and the browser, using promises, letting you write non-blocking code in a nice-ish way.co@4.0.0 has been released, which now relies on promises. It is a stepping stone towards the async/await proposal. The primary API change is how co() is invoked. Before, co returned a "thunk", which you then called with a callback and optional arguments. Now, co() returns a promise.

kotlinx.coroutines - Library support for Kotlin coroutines

  •    Kotlin

Library support for Kotlin coroutines in Kotlin/JVM and Kotlin/JS. This is a companion version for Kotlin 1.2.21 release. Note that these libraries are experimental and are subject to change.