Return-Path: X-Original-To: apmail-directmemory-dev-archive@www.apache.org Delivered-To: apmail-directmemory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 662D5D3E5 for ; Thu, 1 Nov 2012 15:46:07 +0000 (UTC) Received: (qmail 28870 invoked by uid 500); 1 Nov 2012 15:46:07 -0000 Delivered-To: apmail-directmemory-dev-archive@directmemory.apache.org Received: (qmail 28828 invoked by uid 500); 1 Nov 2012 15:46:06 -0000 Mailing-List: contact dev-help@directmemory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directmemory.apache.org Delivered-To: mailing list dev@directmemory.apache.org Received: (qmail 28813 invoked by uid 99); 1 Nov 2012 15:46:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2012 15:46:06 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tsaloranta@gmail.com designates 209.85.215.178 as permitted sender) Received: from [209.85.215.178] (HELO mail-ea0-f178.google.com) (209.85.215.178) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2012 15:46:00 +0000 Received: by mail-ea0-f178.google.com with SMTP id d13so1231761eaa.37 for ; Thu, 01 Nov 2012 08:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=V+8D1I2IMZwGGJ/lnMQ2Wf08Jga55n5poM4QZpBazXk=; b=B/vFXZw0mi5ackV9m5X3iniYD4q0wt3PEaSpZQ0hBE3weB3b0n76JOH9K952u67eQZ X8gm//8muCUgX6ax5E5K0FdwKey4r95Ct1F4pFn67T5+4cMP8AQsBK4Sclbaz/AYA/bx wbsq6odyRje/FglmVFxmd4tt+lCJHYrLcxXytGZE05j7KMvI4uFzauM6ax/5edElhpB9 DN1QK+Qp0L1kNkHoNddu2TrfkRADQKAur1a3X/i2xYIAWQ94/eDhUIv7hgpkHOLLSQBm 150srra6y5DCrD0dJ5Txfp43TcO59x5TtqelVZLn+RJjKloxgyexmciAiCZSVYQWeWln 8SCA== MIME-Version: 1.0 Received: by 10.14.203.65 with SMTP id e41mr99165781eeo.34.1351784739910; Thu, 01 Nov 2012 08:45:39 -0700 (PDT) Received: by 10.14.221.67 with HTTP; Thu, 1 Nov 2012 08:45:39 -0700 (PDT) In-Reply-To: <50929720.9050008@apache.org> References: <508EDF64.2050602@apache.org> <509246A9.4010207@apache.org> <50929720.9050008@apache.org> Date: Thu, 1 Nov 2012 08:45:39 -0700 Message-ID: Subject: Re: KryoSerializer From: Tatu Saloranta To: dev@directmemory.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Nov 1, 2012 at 8:37 AM, Christoph Engelbert wrote: > Am 01.11.2012 16:35, schrieb Tatu Saloranta: >> On Thu, Nov 1, 2012 at 2:53 AM, Christoph Engelbert >> 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 +-