Open alkampfergit opened 9 years ago
why
?better
compared to what
?Instead of persisting Serialized object, it is related to Slack discussion, the long list of pain point from Damian, point 6. I'll report here for completeness.
Byte[] can be too low level, but it could be nice to have a pipeline and letting the user choose format for their Events.
+1, got it. Thanks
On Fri, Jun 5, 2015 at 9:49 AM, Gian Maria notifications@github.com wrote:
Instead of persisting Serialized object, it is related to Slack discussion, the long list of pain point from Damian, point 6. I'll report here for completeness.
- Pure OO api abstracts data to far away from the user. In comparision, EventStores byte[] based API may be too low level. I want (and I want people to want) to work with events as data . Having them expressed as objects should only be a convenience.
Byte[] can be too low level, but it could be nice to have a pipeline and letting the user choose format for their Events.
— Reply to this email directly or view it on GitHub https://github.com/NEventStore/Discussions/issues/3#issuecomment-109193978 .
Mauro Servienti Microsoft MVP - Visual C#
this way we can handle better upgrading / transformation because we are not forced to rely on class serialization (easy to broke).
With opaque serialization in place we can configure any pipeline
Commit => byte[]
Commit => plain text => byte[]
Commit => Json => byte[]
Commit => Json => Zip => Crypt => byte[]
We could add as a contrib project a simple denormalizer to write recombined streams (read model for the consumers)
It would be probably better to handle persistence of events with low level format, such as byte[], but support a pipeline where the user can inject stages if needed (es. serialization, upgrading events, etc).