2017 © Pedro Peláez
 

library event-store-mongodb-adapter

MongoDB Adapter for ProophEventStore

image

prooph/event-store-mongodb-adapter

MongoDB Adapter for ProophEventStore

  • Sunday, July 8, 2018
  • by prooph
  • Repository
  • 4 Watchers
  • 6 Stars
  • 16,504 Installations
  • PHP
  • 2 Dependents
  • 1 Suggesters
  • 6 Forks
  • 1 Open issues
  • 15 Versions
  • 6 % Grown

The README.md

event-store-mongodb-adapter

Build Status Coverage Status Gitter, (*1)

MongoDB Adapter for ProophEventStore, (*2)

CAUTION: The mongoDB adapter is NOT compatible With prooph/event-store v7. MongoDB has limited ACID support which is not compatible with the new features of prooph/event-store. MongoDB is a great choice for a read model database, but unfortunately it cannot be used as an event-store that requires transactions across documents (events).

Codeliner has published a Gist that shows a custom implementation of a possible mongoDB event store supporting a subset of the v7 features in a very limited way. If you want to try to bring mongoDB back, please get in touch with us and we can discuss it!, (*3)

Support for the adapter will end at 31 December 2017., (*4)

Requirements

  • MongoDB >= 4.0
  • MongoDB PHP Driver >= 1.5.2

Transactions

The transaction write concern for this adapter is majority., (*5)

The transaction read concern for this adapter is snapshot., (*6)

You can disable transactions for this adapter., (*7)

Considerations

This adapter does not use the MongoDB ObjectId for its primary key, instead a UUID (string) is used., (*8)

We recommend the AggregateStreamStrategy as the best strategy to use with this adapter., (*9)

Keep in mind that transaction safety works only for a replica set. Sharded cluster support is planned for MongoDB 4.2. Therefore it's not safe to use this adapter in a sharded cluster environment, as MongoDB can't guarantee transaction safety., (*10)

Stream can not be reset if iteration was started due the MongoDB cursor., (*11)

The Versions