Hi, On Wed, Apr 29, 2015 at 9:01 AM, <[email protected]> wrote:
> We have an Akka application, written in Java, and some of our domain > classes have fields that are of type java.util.Optional. Optional is, as > you probably know, not Serializable, and I'm aware of the reasoning of why > it was decided not to be made Serializable. Hence, some of our messages > that contains domain objects with optional cannot be serialized across the > cluster. I looked at custom serialization, but that seems to apply only to > top level classes, > Yes, and then it expects you to handle the serialization of those top-level classes as you feel fit, *including* the serialization of its fields. Protobuf is one option here. I.e. if you have a domain object Foo, which has a field bar which is an Optional, then it is your task to map it to some serialization format, for example a protobuf message. Auto-magical serialization like the default Java serialization is not a good choice in the long-term anyway, since you cannot control forward-backward compatibility of the messages. -Endre > and is not applied to all classes that has an Optional field within it. So > I was wondering if anyone have had the same issue and found a solution to > it? > > Regards, > > Nils-Helge Garli Hegvik > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: > http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Akka Team Typesafe - Reactive apps on the JVM Blog: letitcrash.com Twitter: @akkateam -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
