1 - triagedhelp wanted
Métriques du dépôt
- Stars
- (13 277 étoiles)
- Métriques de merge PR
- (Merge moyen 8j 19h) (10 PRs mergées en 30 j)
Description
Some example projects and also the current style guide recommend using Option for state in event sourced behaviors (entities). This causes two issues:
- Double serialization -
Optionis caught byMiscMessageSerializer, which delegates payload serialization to another serializer based on configuration and then serializes the result again withContainerFormats.Option. - Payload serialization is always synchronous, so this results in blocking IO in a case where state uses
AsyncSerializer.
These issues could be fixed by implementing following changes:
- Altering documentation to suggest using
sealed traithierarchies orcase classeswhich containOptionto express empty state. - Converting
MiscMessageSerializertoAsyncSerializer.
Behavior seems obviously undesirable, so I'm wondering if I am missing something or does this actually need fixing?
I've noticed this issue with Lagom 1.6.4 entities, but since they fallback to Akka actors for everything I assume this is a general Akka issue.