Windows-like registry for Linux?
Jerry Feldman
gaf at blu.org
Tue Feb 14 14:35:01 EST 2006
On Tuesday 14 February 2006 1:24 pm, Michael ODonnell wrote:
> A cow-orker is tasked with implementing a lean-
> and-mean registry thingy that's maybe similar
> to the Windows registry, or maybe not. The real
> goal is for multiple processes/threads to be able
> to perform attribute lookups cheaply and reliably
> and possibly VERY frequently (many thousands/sec)
> with updates possible but very infrequent.
Actually, a Windows style registry is a very bad thing as it not only
represents a single point of failure that could render a system unusable,
but also is a tool that is used by hackers.
In addition to a database, like Berkeley DB, I have seen message queues and
shared memory, or more generally ipc(5). Much depends on whether you want
to maintain the data between boots, but since Linux systems tend to stay up
for many (hundreds of) days, it is sometimes cheaper to reinitialize on a
boot. Additionally, you may want to consider the possibility that the
system may use more than one computer. In any case, ipc(5) contains most of
the tools you need (shared memory, semaphores, messages). Also look at
mmap(2). With mmap(2) you can open a file that can be shared between
processes. What you are doing in the case of a file is simply mapping that
file into virtual memory.
On the other hand, if you need a very fast database, Berkeley is probably
one of the fastest and most reliable. On the downside of Berkeley, I was
working on a driver's license system where we had a home-grown database. I
was asked to check out Berkeley, and it failed on my benchmark with was a
simulation of data from all the drivers license offices based on an average
transaction rate, but that was 5 years ago.
--
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
More information about the gnhlug-discuss
mailing list