On Thu, Nov 1, 2012 at 8:37 AM, Christoph Engelbert <[email protected]> wrote: > Am 01.11.2012 16:35, schrieb Tatu Saloranta: >> On Thu, Nov 1, 2012 at 2:53 AM, Christoph Engelbert >> <[email protected]> wrote: >>> Am 30.10.2012 18:01, schrieb Tatu Saloranta: >>>> You may want to see how serializer/deserializer in >>>> >>>> https://github.com/eishay/jvm-serializers >>>> >>>> is done -- Martin wrote it (or at least modified & has maintained it), >>>> so it should be along best practices. >>>> >>>> -+ Tatu +- >>> This is only best practice for non concurrent access. The unittests >>> are executed one by one so the implementation using one byte array >>> is not a problem but this cannot be threadsafe. >>> >>> This applies to this one as well. Never use this implementation in >>> concurrent environments :-) >>> https://github.com/eishay/jvm-serializers/blob/kannan/tpc/src/serializers/Kryo.java >> Correct. What I meant was it was right way to do it for the use case >> in question. Which granted requires one to understand the use case... >> I forgot that this particular test does not do multi-threaded >> processing like others do. >> >> It actually is one of the things for jvm-serializers to consider; >> efficient reuse techniques vary a lot between codecs. >> >> -+ Tatu +- > > I guess there's still the problem about the kryo instance itself. On > googlecode it is marked that the kryo instance itself is not > threadsafe. Anyone has some more informations about that? Tatu? :-)
No, I have only tried to use it without success once or twice, outside of jvm-serializers. My weapon of choice if Smile+Jakcson. :-D But Kryo author (Nate something?) should know -- I can try to dig contact info, point him to this mailing list. -+ Tatu +-
