-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
initial mongo db adapter #4
Conversation
@codeliner This is the first intial commit. Should be working for payloads smaller than 16 MB. More to come these days... ;) |
'version' => $e->version(), | ||
'event_name' => $e->messageName(), | ||
'event_class' => get_class($e), | ||
'payload' => Serializer::serialize($e->payload(), $this->serializerAdapter), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the serializer for mongoDb? DomainEvent::payload must only contain scalar types and arrays so we can persist the payload as is. This would allow querying events with specific payload. Something that is not supported by the event store but custom "event replay scripts" may want to make use of such a feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@prolic Many thanks for the PR. Great work! 👍 Currently, I'm thinking about how to better support custom domain events with prooph/event-store 5.x. See prooph/event-store#49. What do you thing about the idea? It would have a high impact on the ES adapters because they would no longer handle DomainEvent objects but instead plain arrays. |
use mongodate for createdAt
The MongoCursor implements the Iterator interface and therefore has a rewind() method. |
tests this evening ;) |
If you got time, let's meet in IRC (zftalk.dev) or skype, if you have. |
@prolic zftalk,dev is maybe not the right place because prooph/event-store is not a zend component but I set up gitter a few hours ago :) |
@codeliner I implemented transaction handling and made some additional changes, too. Please check and tell me what you think of it. |
Question: Do we need support for nested transaction? |
Next trouble I see coming: The backend should treat all Dates as UTC. The frontend is required to set the appropriate timezone. |
100% coverage done. |
@prolic 👍 great implementation. I like the transaction handling + TTL. I merge the PR and create new issues for your and my questions. Thanks for the great work. |
No description provided.