Or, you can use something like Kryo which is kind of straight forward and 
very fast compared to Java serialization, for the lazy here is a quick 
snippet for your application conf:

akka {
  extensions = [
"com.romix.akka.serialization.kryo.KryoSerializationExtension$"]

  actor {
    serializers.java = "com.romix.akka.serialization.kryo.KryoSerializer"

    kryo {
      type = "nograph"
      idstrategy = "default"
      serializer-pool-size = 1024
      kryo-reference-map = false
    }
  }
}


For more information on Kryo visit their project 
homepage: https://github.com/romix/akka-kryo-serialization

HTH,

Guido.

On Friday, February 5, 2016 at 2:13:14 PM UTC, Paul Cleary wrote:
>
> Eric,
> The implications of java serialization are the following:
>
> 1. It is slow to serialize and deserialize relative to other means
> 2. You cannot run a mixed bag.  If you have a type User that is version1, 
> and then you change the User to be version2, if you serialize using 
> something like akka persistence, or try to read the byte array into a User 
> instance, your application will break.
>
> For your application, you might not care about either of these.  If you 
> don't have to deserialized from a stored state, then 2 wouldn't be an issue 
> for you.
>
> If you aren't a high throughput type of setup, then 1 may not be a concern 
> as well.
>
> You can quiet that setting `akka.actor.warn-about-java-serializer-use = 
> off` (I think)
>
> On Thursday, February 4, 2016 at 6:57:36 PM UTC-5, Eric Swenson wrote:
>>
>> Since upgrading to akka 2.4.2-RC2, I’m seeing the following warning on 
>> startup:
>>
>> background log: info: [WARN] [02/04/2016 15:21:46.414] 
>> [ClusterSystem-akka.actor.default-dispatcher-25] 
>> [akka.serialization.Serialization(akka://ClusterSystem)] Using the 
>> default Java serializer for class 
>> [org.xxx.eim.ExperimentInstance$RegisterProxySucceededEvent] which is not 
>> recommended because of performance implications. Use another serializer or 
>> disable this warning using the setting 
>> 'akka.actor.warn-about-java-serializer-usage'
>>
>> I’ve looked at the documentation here:  
>> http://doc.akka.io/docs/akka/snapshot/java/serialization.html but can 
>> find no documentation on what serialization implementations are recommended 
>> or what factors to consider when choosing a serialization implementation. 
>> I’m not really keen on having to write my own serializer, nor in adding 
>> serialization methods to each of the objects used in akka-persistence. What 
>> are the recommendations here?  
>>
>> — Eric
>>
>>

-- 
>>>>>>>>>>      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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to