Boost logo

Boost Users :

Subject: Re: [Boost-users] [Serialization] [Serialization of stlmapwithpointer to POD type]
From: Denis Gabaidulin (gabaden_at_[hidden])
Date: 2008-12-31 13:17:21


On Wed, Dec 31, 2008 at 20:53, Robert Ramey <ramey_at_[hidden]> wrote:
>>>> Thank u vÅry much.
>>>>
>>>> In regard to const char * type, i use it just a stupid c-strings,
>>>> caz i need maximum performance.
>>>> p.s. In my app keys are immutable.
>>>
>>> Then why are you storing them in a file? That's the red flag.
>>
>> My app is something like memcached daemon, but with addiotional
>> commands flush/load for dumping current state to persistent
>> storage(disk).
>
> Since you're concerned about performance, why
> are you storing immutable data?

I store current state of storage (just serialize all elements of map)
for backup.
If daemon segfaults of even server reboot, daemon lose only data since
last flush commad was.

So, typical usage of daemon:

E.g. Another app(adv. rotation system) have some counters(impressions
today, impressions total, clicks today, etc).
Many process set/get/inc/dec many counters. Each process communicate
with daemon using simple textual protocol(i know that binary faster,
but textual more useful for my purposes).

map[immutable key] = value;

Key never change, but value can.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net