forestphoenix / EventSpring

Eventsourcing for Haskell, done slightly differently.
MIT License
0 stars 0 forks source link

Implement function to extract serialization for the events from a Projector #5

Closed forestphoenix closed 4 years ago

forestphoenix commented 4 years ago

See Issue #2

forestphoenix commented 4 years ago

Part of this was done in #4, but there is still need for a structure that can be expected to scale reasonably with many event types.

In addition, it would be nice if duplicate types (i.e. two deserializers for MyEvent) were reported somehow, ideally at compile time. --> Check OverloadedLists for this

forestphoenix commented 4 years ago

Hrm, when we re-use the projector to look the deserialization up, the risk of duplicate types will be very slim.

What is going to be much more interesting is how the deserialization of the projections can be found.

forestphoenix commented 4 years ago

The deserialization on the projections could be done when reading the projection. This would be an effective means to guarantee the deserialization is present when reading a projection. It would also remain an effective method when projections are stored/cached on a medium that cannot be deserialized entirely (such as a redis cluster)

However, this would pose a disadvantage in

forestphoenix commented 4 years ago

Current plan of action: