Download the PHP package simgroep/event-sourcing without Composer

On this page you can find all versions of the php package simgroep/event-sourcing. 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 event-sourcing

simgroep/event-sourcing

Provides several components on top of broadway.

Concurrency

Updating an aggregate root at the same time may lead to concurrency problems. To solve this we provide a CommandGateway and a LockingRepository, inspired by the Axon Framework.

The LockingRepository will prevent access to the repository once load() is called. When save() is called, the lock will be released. Trying to access the repository while being locked will result in a ConcurrencyException.

The CommandGateway will in turn catch the ConcurrencyException, and will try do dispatch the command again until a specific condition is met (depends on the used Scheduler implementation), or throw the ConcurrencyException otherwise.

Replaying Events

The EventSourcingBundle contains commands to make interactive replaying of events available after doing a few simple steps.

Mark projectors for replaying

The bundle needs to be aware which projectors are replayable and what there corresponding repositories are.

Projectors are tagged by 'projector.replayable' and the 'repository attribute' is used to define the repository.

For example:

Test if your projectors are correctly tagged as replayable

After tagging your projectors you can test the outcome with the next command: (don't forget to clear the symfony cache.)

You can directly see if your projectors are marked for rebuilding their projections.

Replay time

Now it's time for the fun part ...replaying!. There are three forms of replaying:

Non-interactive replaying

Non-interactive replaying is straight forward.

With "--threads" you can define the number of threads. The maximum number of threads is the number of cpu cores * 2.

Note: "--threads" cannot be used with interactive mode or when replaying a specific stream

Replay a specific stream of events

If you want to replay only the events from a specific stream then

Interactive replaying

When time travelling becomes important for debugging purposes then you can choose for interactive replaying of your event store.

Interactive replaying contains one extra argument (--interact) and a value which contains the stream id.

Every event of the event store will be replayed, if one those events contains the supplied stream id and hits one of the selected projectors then:

  1. The event will be replayed first and the first projection will be updated.
  2. The replaying will pause if gives you the option to continue or stop replaying.
  3. If multiple projectors are affected by this event then the next projector will be updated and we will go back to step 2.

All versions of event-sourcing with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
broadway/broadway Version ~0.5
jurjean/spray-serializer-bundle Version 1.0.x-dev
jurjean/spray-serializer Version 2.0.x-dev
arvenil/ninja-mutex Version >=0.4.0
react/child-process Version >=0.4.0
bunny/bunny Version >=0.1.5
symfony/symfony Version 2.*
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 simgroep/event-sourcing contains the following files

Loading the files please wait ....