-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add support for user defined message serialization #154
Comments
@TobiasPfeifer Hi, thanks for creating issue for that and ideas! There's also a project within ZIO ecosystem (https://github.com/zio/zio-codec) that in the future will address issue of serialization. But for now we can try to do our serialization with e.g. Jackson as mentioned. Yup, internally messages are sent as Feel free to start and share your findings, I will also try to spend some time on it next week 🙂 |
I don't like the 'akka approach': serialization has to be provided by configuration and there is no way to utilize a more type safe approach. I would argue for a more generic approach and use the 'akka approach' as default implementation: given the trait
on actor creation a for creating an |
@TobiasPfeifer Thanks for working on this. OK, so as I understand you think of passing a Serializator to each actor on creation? actor <- system.make("actor1", Supervisor.none, state, stateful, serializer) to make it type safe? |
Why don't we provide a well-defined Environment in the Actor System? Since Environments are extensible in ZIO; the developers themselves could provide their own implementation for the Environment that zio-actors require innately. |
Java object serialization isn't a good default for message serialization. Users should be able to provide their own serializer and deserializer for their messages.
@mtsokol Can you help come up with a way to implement this?
I see two ways of doing it:
Serialization[Envelope]
to an ActorSystem. The problem I have is that Command message type isany
and the response A must be wrapped in an Envelope as well when send over the wire.Serialization[F[A], A]
each time creating anActor[F[A]]
that can serialize and deserialize the DSL for this ActorThe text was updated successfully, but these errors were encountered: