Author: Jason SJason S
Date: Feb 14, 2008 08:00
I have a win32 application (win2k or winxp) where I am logging non-
permanently-persistent data that must be available to multiple
applications -- at most 1 producer to write, several consumers to read
-- & am trying to rethink my implementation of the lower-level
storage, & could use some help understanding some of the gory details
of what Windows does and does not offer.
Basically the producer produces an infinite stream of (raw bytes +
metadata) in a series of chunks, but because of practical storage
concerns, the chunks need to disappear when no one "cares" about them
any more -- e.g. I plan to reference count the chunks with "claims"
from either the producer or the consumers, & when the reference count
reaches 0, they deallocate. Producer typically puts a claim on only
the last 64K or so of data; consumers may hold random individual
chunks for longer.
I need to support both using shared memory and disk, and I need to be
robust against application crashing so that if any of the producer or
consumers die, the shared storage needs to be left in a consistent
state. All producer/consumers are on the same CPU.
|