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
Persistence "model adapter" for separating models and upcasting #17579
Comments
Could explain a bit what in 'identity pass through by default' the identity is ? |
Is the basic idea to use BSON for the payload serialisation ? It seems that at this moment that protobuf is part of the serialisation. Should that be removed ? |
BSON is just an example, inspired by the issue linked above (the mongodb journal), it could be any format that the journal plugin understands. It could also be that the adapter just passes the object through, and the journal plugin performs the serializaiton inside. |
Closing this ticket, we decided that serializers are powerful enough to express all migrations we need. Will be replaced by:
|
@ktoso I like the ideas you have lined up above. What do you mean by come back of |
+ per plugin scoped adapters + could be swapped during runtime - todo not happy yet with initialization (message)? + adapters work both ways + tests show "tagging"
By Tagger I meant an additional facility which can be asked to extract metadata about a given event. More info on it in #17617. However after a few drafts of adapters and taggers we're back to adapters - they're more powerful and can do the generic "I want to separate data from domain completely" in a nice way, PR coming up right now. |
@ktoso Cool stuff, I think this will make a difference 👍 Secondary indexes by event type / category is probably the most wanted feature in akka persistence and I think this will make it easier for journals like the eventstore to utilize their built-in features, e.g. projections by event type, without workarounds and custom hacks :) |
+ per plugin scoped adapters + could be swapped during runtime - todo not happy yet with initialization (message)? + adapters work both ways + tests show "tagging"
+ per plugin scoped adapters + could be swapped during runtime - todo not happy yet with initialization (message)? + adapters work both ways + tests show "tagging"
+ per plugin scoped adapters + could be swapped during runtime +per EventAdapter now has manifest and is configurable ai la serializers + json examples in docs + including "completely manual" example in case one wants to add metadata TO the persisted event + better error reporting when misconfigured bindings + manifest is handled by in memory plugin - did not check if it works with LevelDB plugin yet > TODO: json example uses Gson, as that's simplest to do, can we use +per allows 1:n adapters, multiple adapters can be bound to 1 class
+ per plugin scoped adapters + could be swapped during runtime +per EventAdapter now has manifest and is configurable ai la serializers + json examples in docs + including "completely manual" example in case one wants to add metadata TO the persisted event + better error reporting when misconfigured bindings + manifest is handled by in memory plugin - did not check if it works with LevelDB plugin yet > TODO: json example uses Gson, as that's simplest to do, can we use +per allows 1:n adapters, multiple adapters can be bound to 1 class
+ per plugin scoped adapters + could be swapped during runtime +per EventAdapter now has manifest and is configurable ai la serializers + json examples in docs + including "completely manual" example in case one wants to add metadata TO the persisted event + better error reporting when misconfigured bindings + manifest is handled by in memory plugin - did not check if it works with LevelDB plugin yet > TODO: json example uses Gson, as that's simplest to do, can we use +per allows 1:n adapters, multiple adapters can be bound to 1 class
+ per plugin scoped adapters + could be swapped during runtime +per EventAdapter now has manifest and is configurable ai la serializers + json examples in docs + including "completely manual" example in case one wants to add metadata TO the persisted event + better error reporting when misconfigured bindings + manifest is handled by in memory plugin - did not check if it works with LevelDB plugin yet > TODO: json example uses Gson, as that's simplest to do, can we use +per allows 1:n adapters, multiple adapters can be bound to 1 class
+ per plugin scoped adapters + could be swapped during runtime +per EventAdapter now has manifest and is configurable ai la serializers + json examples in docs + including "completely manual" example in case one wants to add metadata TO the persisted event + better error reporting when misconfigured bindings + manifest is handled by in memory plugin - did not check if it works with LevelDB plugin yet > TODO: json example uses Gson, as that's simplest to do, can we use +per allows 1:n adapters, multiple adapters can be bound to 1 class
+ per plugin scoped adapters + could be swapped during runtime +per EventAdapter now has manifest and is configurable ai la serializers + json examples in docs + including "completely manual" example in case one wants to add metadata TO the persisted event + better error reporting when misconfigured bindings + manifest is handled by in memory plugin - did not check if it works with LevelDB plugin yet > TODO: json example uses Gson, as that's simplest to do, can we use +per allows 1:n adapters, multiple adapters can be bound to 1 class
+ per plugin scoped adapters + could be swapped during runtime +per EventAdapter now has manifest and is configurable ai la serializers + json examples in docs + including "completely manual" example in case one wants to add metadata TO the persisted event + better error reporting when misconfigured bindings + manifest is handled by in memory plugin - did not check if it works with LevelDB plugin yet > TODO: json example uses Gson, as that's simplest to do, can we use +per allows 1:n adapters, multiple adapters can be bound to 1 class
+ per plugin scoped adapters + could be swapped during runtime +per EventAdapter now has manifest and is configurable ai la serializers + json examples in docs + including "completely manual" example in case one wants to add metadata TO the persisted event + better error reporting when misconfigured bindings + manifest is handled by in memory plugin - did not check if it works with LevelDB plugin yet > TODO: json example uses Gson, as that's simplest to do, can we use +per allows 1:n adapters, multiple adapters can be bound to 1 class
+str akka#17579 akka#17617 EventAdapter
Add a "man in the middle" between PersistentActor and the Journal which can be used to.
No API is yet decided, first we'll need to draft a few example impls.
Use cases this adapter should cover (possibly all, or we split it up, not sure yet):
Domain => BSON
Store journal messages / snapshots in BSON ironfish/akka-persistence-mongo#88bytes => logic => upcasted event
and/orold-model => upcasted-model
ClientDetailsChanged
toAddressChanged
+PersonalDataChanged
The text was updated successfully, but these errors were encountered: