All Projects → prooph → Pdo Event Store

prooph / Pdo Event Store

Licence: bsd-3-clause
PDO implementation of ProophEventStore http://getprooph.org

Projects that are alternatives of or similar to Pdo Event Store

Weapsy
ASP.NET Core CMS
Stars: ✭ 748 (+679.17%)
Mutual labels:  mysql, ddd, cqrs
Rails event store
A Ruby implementation of an Event Store based on Active Record
Stars: ✭ 947 (+886.46%)
Mutual labels:  event-sourcing, ddd, cqrs
Symfony 5 Es Cqrs Boilerplate
Symfony 5 DDD ES CQRS backend boilerplate
Stars: ✭ 759 (+690.63%)
Mutual labels:  event-sourcing, ddd, cqrs
Nestjs Cqrs Starter
NestJS CQRS Microservices Starter Project
Stars: ✭ 80 (-16.67%)
Mutual labels:  event-sourcing, ddd, cqrs
Productcontext Eventsourcing
A practical/experimental Event Sourcing application on Product Bounded Context in an e-commerce
Stars: ✭ 88 (-8.33%)
Mutual labels:  event-sourcing, ddd, cqrs
Modular Monolith With Ddd
Full Modular Monolith application with Domain-Driven Design approach.
Stars: ✭ 6,210 (+6368.75%)
Mutual labels:  event-sourcing, ddd, cqrs
Wolkenkit
wolkenkit is an open-source CQRS and event-sourcing framework based on Node.js, and it supports JavaScript and TypeScript.
Stars: ✭ 880 (+816.67%)
Mutual labels:  event-sourcing, ddd, cqrs
Kledex
.NET Standard framework to create simple and clean design. Advanced features for DDD, CQRS and Event Sourcing.
Stars: ✭ 502 (+422.92%)
Mutual labels:  event-sourcing, ddd, cqrs
Ultimate Backend
Multi tenant SaaS starter kit with cqrs graphql microservice architecture, apollo federation, event source and authentication
Stars: ✭ 978 (+918.75%)
Mutual labels:  event-sourcing, ddd, cqrs
Bank api
Code from the Event Sourcing With Elixir blog series
Stars: ✭ 35 (-63.54%)
Mutual labels:  event-sourcing, ddd, cqrs
Equinoxproject
Full ASP.NET Core 5 application with DDD, CQRS and Event Sourcing concepts
Stars: ✭ 5,120 (+5233.33%)
Mutual labels:  event-sourcing, ddd, cqrs
Event Store Symfony Bundle
Event Store Symfony Bundle
Stars: ✭ 93 (-3.12%)
Mutual labels:  event-sourcing, ddd, cqrs
Christddd
🙌 ASP.NET Core 3.1 应用, 包含 DDD、CQRS、EDA 和ES事件回溯
Stars: ✭ 510 (+431.25%)
Mutual labels:  event-sourcing, ddd, cqrs
Pitstop
This repo contains a sample application based on a Garage Management System for Pitstop - a fictitious garage. The primary goal of this sample is to demonstrate several software-architecture concepts like: Microservices, CQRS, Event Sourcing, Domain Driven Design (DDD), Eventual Consistency.
Stars: ✭ 708 (+637.5%)
Mutual labels:  event-sourcing, ddd, cqrs
Event Store
PHP 7.4 EventStore Implementation
Stars: ✭ 505 (+426.04%)
Mutual labels:  event-sourcing, ddd, cqrs
Eventsourcing
A library for event sourcing in Python.
Stars: ✭ 760 (+691.67%)
Mutual labels:  event-sourcing, ddd, cqrs
Akkatecture
a cqrs and event sourcing framework for dotnet core using akka.net
Stars: ✭ 414 (+331.25%)
Mutual labels:  event-sourcing, ddd, cqrs
Resolve
Full stack CQRS, DDD, Event Sourcing framework for Node.js
Stars: ✭ 460 (+379.17%)
Mutual labels:  event-sourcing, ddd, cqrs
Eventhorizon
CQRS/ES toolkit for Go
Stars: ✭ 961 (+901.04%)
Mutual labels:  event-sourcing, ddd, cqrs
Event Sourcing Castanha
An Event Sourcing service template with DDD, TDD and SOLID. It has High Cohesion and Loose Coupling, it's a good start for your next Microservice application.
Stars: ✭ 68 (-29.17%)
Mutual labels:  event-sourcing, ddd, cqrs

pdo-event-store

Build Status Coverage Status Gitter

PDO EventStore implementation for Prooph EventStore

Requirements

  • PHP >= 7.1
  • PDO_MySQL Extension or PDO_PGSQL Extension

For MariaDB you need server version >= 10.2.11.
Performance Impact: see [MariaDB Indexes and Efficiency](docs/variants.md#MariaDB Indexes and Efficiency)

For MySQL you need server version >= 5.7.9.

For Postgres you need server version >= 9.4.

Attention: Since v1.6.0 MariaDB Server has to be at least 10.2.11 due to a bugfix in MariaDB, see https://jira.mariadb.org/browse/MDEV-14402.

Setup

For MariaDB run the script in scripts/mariadb/01_event_streams_table.sql on your server.

For MySQL run the script in scripts/mysql/01_event_streams_table.sql on your server.

For Postgres run the script in scripts/postgres/01_event_streams_table.sql on your server.

This will setup the required event streams table.

If you want to use the projections, run additionally the scripts scripts/mariadb/02_projections_table.sql (for MariaDB), scripts/mysql/02_projections_table.sql (for MySQL) or scripts/postgres/02_projections_table.sql (for Postgres) on your server.

Upgrade from 1.6 to 1.7

Starting from v1.7 the pdo-event-store uses optimized table schemas. The upgrade can be done in background with a script optimizing that process. A downtime for the database should not be needed. In order to upgrade your existing database, you have to execute:

  • MariaDB
ALTER TABLE `event_streams` MODIFY `metadata` LONGTEXT NOT NULL;
ALTER TABLE `projections` MODIFY `position` LONGTEXT;
ALTER TABLE `projections` MODIFY `state` LONGTEXT;

Then for all event-streams (SELECT stream_name FROM event_streams)

ALTER TABLE <stream_name> MODIFY `payload` LONGTEXT NOT NULL;
ALTER TABLE <stream_name> MODIFY `metadata` LONGTEXT NOT NULL,
  • MySQL

nothing to upgrade

  • Postgres

For all event-streams (SELECT stream_name FROM event_streams)

ALTER TABLE <stream_name> MODIFY event_id UUID NOT NULL;

Additional note:

When using Postgres, the event_id has to be a valid uuid, so be careful when using a custom MetadataMatcher, as the event-store could throw an exception when passing a non-valid uuid (f.e. "foo") as uuid.

The migration is strongly recommended, but not required. It's fully backward-compatible. The change on Postgres is only a microoptimization, the change on MariaDB prevents errors, when the stored json gets too big.

Introduction

Prooph Event Store v7

Tests

If you want to run the unit tests locally you need a runnging MySql server listening on port 3306 and a running Postgres server listening on port 5432. Both should contain an empty database event_store_tests.

Run Tests With Composer

MariaDb

$ vendor/bin/phpunit -c phpunit.xml.mariadb

MySql

$ vendor/bin/phpunit -c phpunit.xml.mysql

Postgres

$ vendor/bin/phpunit -c phpunit.xml.postgres

Run Tests With Docker Compose

MariaDb

docker-compose -f docker-compose-tests.yml run composer run-script test-mariadb --timeout 0; \
docker-compose -f docker-compose-tests.yml stop

MySql

docker-compose -f docker-compose-tests.yml run composer run-script test-mysql --timeout 0; \
docker-compose -f docker-compose-tests.yml stop

Postgres

docker-compose -f docker-compose-tests.yml run composer run-script test-postgres --timeout 0; \
docker-compose -f docker-compose-tests.yml stop

Support

Contribute

Please feel free to fork and extend existing or add new plugins and send a pull request with your changes! To establish a consistent code quality, please provide unit tests for all your changes and may adapt the documentation.

License

Released under the New BSD License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].