using Tugela Cache?
chip at corelands.com
Mon Aug 20 18:17:38 UTC 2007
Jehiah Czebotar wrote:
> Is anyone on this list actively using Tugela Cache?
> (if you are not familiar with it; it follows the memcached api, but
> instead of storing in memory it stores data in a berkeley db file;
> this means you can use all the normal memcached clients)
But uh. It introduces blocking IO into a event based IO program.
BerkeleyDB does NOT have an AIO API -- so you are stuck blocking.
The 'right' way is to have a set of BDB worker threads which do all the
BDB IO in their blocking way, but keeping the event thread handling events.
It would then pass off all the requests to a fifo queue, BDB worker
threads would consume from that.
When a worker thread has a completed request, it pushes the data onto an
event, which the event thread can then write out to clients.
If a pluggable-storage project ever happened, this wouldn't be too hard
More information about the memcached