Download the PHP package upscale/swoole-dispatch without Composer

On this page you can find all versions of the php package upscale/swoole-dispatch. 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 swoole-dispatch

Request Dispatch for Swoole

This is a collection of request dispatch strategies for Swoole web-server that compliment the built-in dispatch modes. Sticky session dispatch strategy also known as the session affinity is the cornerstone of this library. Other strategies are provided as a fallback for guest requests without the session context. They mimic the native dispatch modes that are by design mutually exclusive to the custom dispatch function.

Strategies:

Installation

The library is to be installed via Composer as a dependency:

Dispatch Strategies

Fixed Client

Dispatch requests to workers according to client connection ID equivalent to the built-in fixed dispatch mode.

Register the dispatcher:

Send some test requests:

Round Robin

Dispatch requests to workers in circular order equivalent to the built-in polling dispatch mode.

Register the dispatcher:

Send some test requests:

Sticky Session

Dispatch requests to workers according to session ID for sticky session also known as session affinity. All requests belonging to a session will be dispatched to a dedicated worker process. Session ID is recognized in a query string and cookie headers in that order of priority.

This strategy is complimentary to the session locking and can compensate for the lack of thereof. It prevents race conditions in workers competing for an exclusive lock of the same session ID. Workers only pick up requests of their respective sessions as well as guest requests without the session context.

Dispatch of guest requests will be delegated to a specified fallback strategy of choice.

Register the sticky session dispatcher with fallback to the Round-Robin for guests:

Send some test requests with and without the session context:

URL Path

Dispatch requests to workers according to a URL path of a HTTP request. Configure whether to use a query string in addition to the path or not (the default). Custom URL path filter can be provided via the PCRE regular expression syntax. The dispatch can also be limited to a given HTTP methods (HEAD and GET by default).

Register the URL path dispatcher with fallback to the Round-Robin:

Send some test requests:

Contributing

Pull Requests with fixes and improvements are welcome!

License

Copyright © Upscale Software. All rights reserved.

Licensed under the Apache License, Version 2.0.


All versions of swoole-dispatch with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
ext-swoole Version ^4.0
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 upscale/swoole-dispatch contains the following files

Loading the files please wait ....