2017 © Pedro PelĂĄez
 

library doris

Doris is a remote command bus implementation based on Bernard and Tactician

image

indigophp/doris

Doris is a remote command bus implementation based on Bernard and Tactician

  • Monday, January 12, 2015
  • by mark.sagikazar
  • Repository
  • 0 Watchers
  • 0 Stars
  • 0 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Doris

Latest Version Software License Build Status Code Coverage Quality Score HHVM Status Total Downloads, (*1)

Doris is a remote command bus implementation based on Bernard and Tactician., (*2)

Install

Via Composer, (*3)

``` bash $ composer require indigophp/doris, (*4)



## Usage Install Doris in both your application and (if you have any) dedicated worker package/instance. You can run your consumer directly using your application, however you should avoid it if possible. Bootstrapping your application consumes more resource than necessary. (That said, sometimes it is simply easier.) In this case you have to make sure that you provide your consumer instance with all the data it needs: database connection details, required dependencies, etc. ### Remote execution To send a command to it's destination, simply create a remote executing command bus, and use it like you would use any other: ``` php use Doris\RemoteCommandBus; // ...create a Bernard\Queue instance // make sure to add te appropriate serializers $commandBus = new RemoteCommandBus($queue); $commandBus->execute($command);

Consuming commands

On the other side of the message queue you must set up a consumer:, (*5)

``` php use Doris\Consumer; use Doris\Listener\CommandLimit;, (*6)

// ... create your inner commandBus, (*7)

$consumer = new Consumer;, (*8)

// execute maximum of 10 commands $consumer->addListener(new CommandLimit(10));, (*9)

$consumer->consume($queue, $commandBus);, (*10)


List of available listeners: - `CommandLimit`: limits how many commands should be executed - `TimeLimit`: limits how long the consumer can run - `Wait`: wait for some time at the end of every cycle ## Testing ``` bash $ phpspec run

Contributing

Please see CONTRIBUTING for details., (*11)

Credits

Name refers to the film Bernard and Doris., (*12)

License

The MIT License (MIT). Please see License File for more information., (*13)

The Versions

12/01 2015

dev-develop

dev-develop https://indigophp.com

Doris is a remote command bus implementation based on Bernard and Tactician

  Sources   Download

MIT

The Requires

 

The Development Requires

by MĂĄrk SĂĄgi-KazĂĄr

bernard tactician command-bus doris