oneverest / prooph-saga-playground

Small CLI application to introduce Saga pattern.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

prooph-saga-playground

Build Status Scrutinizer Code Quality

Small CLI application to introduce Saga pattern. It reflects the business process of making a reservation. It uses message driven approach (see ProcessManager section). Prooph/service-bus was used for handling messages (commands, domain events).

Inspired by:

Requirements

non-docker:
docker:

Installation (non-docker):

  • git clone git@github.com:lzakrzewski/prooph-saga-playground.git
  • cd prooph-saga-playground && composer install

Usage

non-docker:
  • bin/console prooph:saga:playground
docker:
  • make playground (with docker installation step might be skipped)

Example output

example-output

ProcessManager

It can handle two scenarios. When everything is fine then OrderProcessManager dispatches OrderConfirmed event and process ends. If there is not enough seats available then OrderProcessManager dispatches AddSeatsToWaitList command.

happy-path:

happy-path

unhappy-path:

unhappy-path

About

Small CLI application to introduce Saga pattern.


Languages

Language:PHP 99.3%Language:Makefile 0.7%