You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directmemory.apache.org by "Raffaele P. Guidi" <ra...@gmail.com> on 2011/10/24 23:14:11 UTC

Fwd: [protostuff] DirectMemory Cache with off-heap storage using Protostuff-runtime serialization

I already opened a jira for the upgrade and I also want to forward to you
David Yu's (of protostuff fame) suggestion to consider switching to Unsafe.
It's a worth voice to listen to :)

Ciao,
    R

---------- Forwarded message ----------
From: David Yu <da...@gmail.com>
Date: Mon, Oct 24, 2011 at 11:07 PM
Subject: Re: [protostuff] DirectMemory Cache with off-heap storage using
Protostuff-runtime serialization
To: "Raffaele P. Guidi" <ra...@gmail.com>


On Tue, Oct 25, 2011 at 1:40 AM, Raffaele P. Guidi <
raffaele.p.guidi@gmail.com> wrote:

> Thanks for the thorough (if late) answer. In the meanwhile I brought the
> project to apache and gained a whole team of great developers

- hope you don't mind if I forward your answer to the projects mailing list
> to start considering a switch to unsafe.

Cool.  I subscribed to the list.  Congrats on getting it accepted, and I'm
expecting it to be a top-level project any time soon :-)

>
> Ciao,
>     R
>
>
> On Mon, Oct 24, 2011 at 12:29 PM, David Yu <da...@gmail.com> wrote:
>
>>
>>
>> On Thu, Sep 8, 2011 at 3:05 PM, Raffaele P. Guidi <
>> raffaele.p.guidi@gmail.com> wrote:
>>
>>> Great, I will upgrade immediately. How is your experience with Unsafe?
>>> Mine not that good but requirements where different, so...
>>
>> Under the hood, java reflections on a sun-jre delegate to Unsafe.  It is a
>> win-win to use it.
>>
>> Btw, please update to 1.0.4.
>> Back when you started testing protostuff (pre 1.0.0), the byte arrays were
>> treated as scalar fields.  Sometime february I made a small change
>> that (accidentally) changed the behavior w/c treated the byte arrays like
>> regular arrays (w/c need extra metadata on serialization).
>>
>> 1.0.4 reverts the behavior, plus (re)optimizing collections like
>> List<byte[]>,Map<byte[],byte[]> as well.
>> The impact is greatly visible in your pert tests.
>>
>> P.S Sorry for the late reply (didn't notice this on my email back then)
>> :-/
>>
>>
>>>
>>> On Thursday, September 8, 2011, David Yu <da...@gmail.com> wrote:
>>> >
>>> >
>>> > On Thu, Sep 8, 2011 at 5:54 AM, Raffaele P. Guidi <
>>> raffaele.p.guidi@gmail.com> wrote:
>>> >>
>>> >> Just a quick note to let you know that I released a new version of
>>> directmemory (give it a try <
>>> https://github.com/raffaeleguidi/DirectMemory/wiki/Using-DirectMemory-with-maven>
>>> if you wish) with protostuff as the default serialization strategy <
>>> https://github.com/raffaeleguidi/DirectMemory/blob/master/DirectMemory-Cache/src/main/java/org/directmemory/serialization/ProtoStuffSerializer.java>
>>> and it is fast as hell, as always.
>>>
>>> >
>>> > Cool.  Btw, in your pom.xml, you're using 1.0.0 runtime with core and
>>> api being 1.0.1.
>>> > Also in 1.0.1, protostuff-runtime can be significantly faster because
>>> it uses sun.misc.Unsafe as the default serialization strategy.
>>> > If you run with your benchmark, you'll notice the difference
>>> immediately.
>>> >>
>>> >> Thanks again for this wonderful product and your support.
>>> >> Ciao,
>>> >>    Raffaele
>>> >
>>> >
>>> > --
>>> > When the cat is away, the mouse is alone.
>>> > - David Yu
>>> >
>>>
>>
>>
>>
>> --
>> When the cat is away, the mouse is alone.
>> - David Yu
>>
>
>


-- 
When the cat is away, the mouse is alone.
- David Yu