redis - Fastest serialization/deserialization of Scala case classes -


if i've got nested object graph of case classes, similar example below, , want store collections of them in redis list, libraries or tools should @ that give fastest overall round trip redis?

this include:

  • time serialize item
  • network cost of transferring serialized data
  • network cost of retrieving stored serialized data
  • time deserialize case classes

    case class person(name: string, age: int, children: list[person]) {} 

your use case targeted use case scala/pickling (https://github.com/scala/pickling). disclaimer: i'm author.

scala/pickling designed faster, more typesafe, , more open alternative automatic frameworks java or kryo. built in particular distributed applications, serialization/deserialization time , serialized data size take front seat. takes different approach serialization together- generates pickling (serialization) code inline @ use-site @ compile-time, it's fast.

the latest benchmarks in our oopsla paper- binary pickle format (you can choose others, json) scala/pickling consistently faster java , kryo, , produces binary representations on par or smaller kryo's, meaning less latency when passing pickled data on network.

for more info, there's project page: http://lampwww.epfl.ch/~hmiller/pickling

and scaladays 2013 talk june on parley's.

we'll presenting new developments in particular related dealing sending closures on network @ strange loop 2013, in case might pain point use case.

as of time of writing, scala/pickling in pre-release, our first stable release planned august 21st.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -