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
Are there any examples on how to use the continuation passing? I am unable to
find any documentation in the READMEs.
Thank you for your time!
Original comment by littledo...@gmail.com
on 8 Jul 2015 at 1:34
First of all, we moved to Github a while ago.
This is the corresponding issue:
https://github.com/EsotericSoftware/kryo/issues/103
It contains a link to a branch of Kryo, which implements this feature. You use
it just as a normal Kryo library. No special setup is required, IIRC. But if
you plan to implement your custom serializers, you may need to write them in a
special way (have a look at the standard ones). There are also a few unit tests
which make use of this feature.
Original comment by romixlev
on 8 Jul 2015 at 6:10
Original issue reported on code.google.com by
romixlev
on 9 Mar 2013 at 10:37