Skip to content

Commit

Permalink
Merge pull request #55 from codeliner/feature/v4.0
Browse files Browse the repository at this point in the history
Feature/v4.0
  • Loading branch information
codeliner committed Aug 2, 2015
2 parents c3fac48 + 01db97c commit 4d33066
Show file tree
Hide file tree
Showing 93 changed files with 2,086 additions and 4,300 deletions.
34 changes: 13 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
PSB - ProophServiceBus
======================

PHP 5.5+ Lightweight Service Bus Facade supporting CQRS and Microservices
PHP 5.5+ Lightweight Service Bus Facade supporting CQRS and Micro Services

[![Build Status](https://travis-ci.org/prooph/service-bus.png?branch=master)](https://travis-ci.org/prooph/service-bus)

Message API
-----------
Messaging API
-------------

prooph/service-bus is a lightweight messaging facade sitting in front of your model. The idea is that the API of your model
is defined through messages.
prooph/service-bus is a lightweight messaging facade.
It allows you to define the API of your model with the help of messages.

1. Command messages describe the actions your model can handle.
2. Event messages describe things that happened while your model handled a command.
Expand All @@ -18,30 +18,27 @@ is defined through messages.
prooph/service-bus shields your model. Data input and output ports become irrelevant and no longer influence the business logic.
I'm looking at you Hexagonal Architecture.

prooph/service-bus decouples your model from any framework except prooph/service-bus of course :-). You can use a
prooph/service-bus decouples your model from any framework. You can use a
web framework like Zend, Symfony, Laravel and co. to handle http requests and pass them via prooph/service-bus to your model
but you can also receive the same messages via CLI or from a messaging infrastructure like RabbitMQ or Beanstalkd.
but you can also receive the same messages via CLI or from a message queue system like RabbitMQ or Beanstalkd.

![psb_architecture](docs/img/psb_architecture.png)


Installation
------------

You can install prooph/service-bus via composer by adding `"prooph/service-bus": "~3.0"` as requirement to your composer.json.
You can install prooph/service-bus via composer by adding `"prooph/service-bus": "~4.0"` as requirement to your composer.json.

Quick Start
-----------

The simplest way to get started is to set up one of the message buses provided by prooph/service-bus.

```php
<?php

use Prooph\ServiceBus\CommandBus;
use Prooph\ServiceBus\Example\Command\EchoText;
use Prooph\ServiceBus\InvokeStrategy\CallbackStrategy;
use Prooph\ServiceBus\Router\CommandRouter;
use Prooph\ServiceBus\Plugin\Router\CommandRouter;

$commandBus = new CommandBus();

Expand All @@ -56,11 +53,8 @@ $router->route('Prooph\ServiceBus\Example\Command\EchoText')
//Expand command bus with the router plugin
$commandBus->utilize($router);

//Expand command bus with the callback invoke strategy
$commandBus->utilize(new CallbackStrategy());

//We create a new Command
$echoText = EchoText::fromString('It works');
$echoText = new EchoText('It works');

//... and dispatch it
$commandBus->dispatch($echoText);
Expand All @@ -72,16 +66,14 @@ Documentation
-------------

- [Overview](docs/service_bus_system.md)
- [CommandBus](docs/command_bus.md)
- [EventBus](docs/event_bus.md)
- [QueryBus](docs/query_bus.md)
- [Message Bus API](docs/message_bus.md)
- [Plugins](docs/plugins.md)
- [Asynchronous MessageDispatcher](docs/message_dispatcher.md)
- [Message Queue Producers](docs/queue_producer.md)

# ZF2 Integration

[prooph/proophessor](https://github.com/prooph/proophessor) seamlessly integrates prooph/service-bus with a ZF2 application.
Note: Currently proophessor only supports prooph/service-bus 3.x. Support for 4.x is coming soon.

Support
-------
Expand Down
21 changes: 9 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,36 @@
}
],
"keywords": [
"php",
"ESB",
"Service Bus",
"prooph",
"Messaging",
"CQRS",
"library",
"DDD",
"domain-driven design",
"ZF2"
],
"require": {
"php": ">=5.5",
"beberlei/assert": "~2.0",
"prooph/common" : "~2.2",
"react/promise" : "~2.2"
"prooph/common" : "~3.1",
"react/promise" : "~2.2",
"container-interop/container-interop" : "~1.1"
},
"require-dev": {
"phpunit/phpunit": "3.7.*",
"phpunit/phpunit": "~4.7",
"satooshi/php-coveralls": "dev-master"
},
"suggest": {
"prooph/event-store": "Use ProophEventStore and let the EventBus dispatch persisted DomainEvents",
"zendframework/zend-servicemanager": "Use Zf2 ServiceLocator to lazy load your handlers and listeners"
"zendframework/zend-servicemanager": "Use Zf2 ServiceManager to lazy load your handlers and listeners"
},
"autoload": {
"psr-0": {
"psr-4": {
"Prooph\\ServiceBus\\": "src/"
}
},
"autoload-dev": {
"psr-0": {
"Prooph\\ServiceBusTest\\": "tests/",
"Prooph\\EventSourcingTest\\": "vendor/prooph/event-sourcing/tests"
"psr-4": {
"Prooph\\ServiceBusTest\\": "tests/"
}
}
}
123 changes: 0 additions & 123 deletions docs/command_bus.md

This file was deleted.

128 changes: 0 additions & 128 deletions docs/event_bus.md

This file was deleted.

Loading

0 comments on commit 4d33066

Please sign in to comment.