Open GoogleCodeExporter opened 9 years ago
Please find attached the patch against current trunk implementing this feature.
It is not very polished yet, but it is functional. All tests are green. There
is a new unit test for deep nesting. Have a look at the collections serializers
and com.esotericsoftware.kryo.continuations subpackages to get an idea about
how to write serializers using this style.
Any comments and feedback is welcome!
-Leo
Original comment by romixlev
on 12 Mar 2013 at 9:02
Attachments:
Please find attached a newer version of the patch based on the current trunk
(r396).
This version fixes some bugs found in the original patch and contains some
performance improvements.
Continuation-based version passes all unit tests. It also adds a dedicated unit
test called DeepNestingSerializationTest. It shows how very deeply nested
structures (or even endless data structures) can be easily handled by
continuations-based Kryo.
Serializers and Kryo provide now methods setSupportsContinuations and
getSupportsContinuations. If this flag is set, then continuations-based
approach is used. Otherwise, the usual Kryo semantics is used.
Changes in Kryo class are now implemented by changing this class. In principle,
one could implement a derived class ContinuationsBasedKryo which would overload
some of Kryo's methods.
Changes in serializers affect read/write methods. Here one could also implement
serialization specific versions of those classes by deriving from them and
overloading read/write methods.
Such an implementation based on derived classes could be more modular and more
orthogonal to the standard Kryo implementation.
-Leo
Original comment by romixlev
on 22 Aug 2013 at 5:59
Attachments:
Sounds really cool. How is the before and after performance with the JVM
serializers project?
Original comment by nathan.s...@gmail.com
on 22 Aug 2013 at 6:48
Original issue reported on code.google.com by
romixlev
on 9 Mar 2013 at 10:37