Download the PHP package flyokai/amp-channel-dispatcher without Composer

On this page you can find all versions of the php package flyokai/amp-channel-dispatcher. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package amp-channel-dispatcher

flyokai/amp-channel-dispatcher

User docs → AGENTS.md

Async bidirectional message dispatching over AMPHP channels — request/response correlation, middleware pipeline, remote iterators, and configurable error handling.

This is the messaging plumbing that lets two PHP processes (or threads) talk to each other over an AMPHP Channel. You get request/response semantics with automatic id correlation, a middleware stack for cross-cutting concerns, and remote iterators for streaming large result sets without buffering.

Features

Installation

Quick start

Concepts

Messages

Every message implements Message:

Request and Response both extend Message. A Response carries requestId(): ?int for correlation.

Built-in responses

Class Meaning
Response\SuccessResponse Generic success
Response\ErrorResponse Recoverable error (message + code)
Response\AcceptedResponse Acknowledgement
Response\FatalErrorResponse Terminates the dispatcher (extends ErrorResponse, requestId = null)
Response\IteratorContinue Remote-iterator pagination payload

Dispatcher lifecycle

The dispatcher attaches a Context attribute to every incoming request with:

Middleware

Remote iterators

When a handler returns a ConcurrentIterator, the consumer side gets a RemoteIterator proxy. Each continue() is a blocking RPC round-trip:

API

Class Purpose
Dispatcher Central read/write hub
DefaultDispatcherChannel Channel adapter
RequestHandler (interface) handleRequest(Request): Response
Middleware (interface) handleRequest(Request, RequestHandler $next): Response
stackMiddleware(...) Helper to compose handler + middlewares
Error\ErrorHandler (interface) handleError, handleException
Error\DefaultErrorHandler Recoverable vs fatal heuristic
RemoteIterator, IteratorStorage Remote iteration
Context Per-request context (dispatcher ref, sendRequest, iterator storage)

Gotchas

See also

License

MIT


All versions of amp-channel-dispatcher with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
amphp/sync Version ^2
flyokai/misc Version self.version
flyokai/data-mate Version self.version
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package flyokai/amp-channel-dispatcher contains the following files

Loading the files please wait ...