views:

96

answers:

1

Is there library usable from c++ for sharing fairly simple data (integers,floating point numbers, strings) between cooperative processes?

Must be :

  • high-speed (SQL-based methods too slow due to parsing)
  • able to get,set,update,delete both fixed and variable data types (e.g. int and string)
  • ACID (atomic,consistent,isolated,durable)
  • usable under linux
  • usable by processes without a shared parent.
  • highly compatible license: e.g. LGPL,MIT,BSD

For bonus points:

  • ability to work across the network.
  • ability to handle aggregation/composition into more complicated structures
+1  A: 

Take a look at boost::interprocess. For local use, you probably can't beat a map or hash table in shared memory. Allowing networking makes things more difficult, in that case something like memcached or CouchDB might be more appropriate.

Tim Sylvester
There is a discussion of using STL and Boost containers with Boost.InterProcess: http://www.boost.org/doc/libs/1_41_0/doc/html/interprocess/allocators_containers.html#interprocess.allocators_containers.containers_explained
Georg Fritzsche
I was just looking for that, thanks. Being able to use the same classes for shared-memory data structures as in "normal" code is pretty darn slick.
Tim Sylvester