Windows-like registry for Linux?

Jerry Feldman gaf at blu.org
Tue Feb 14 15:19:00 EST 2006


On Tuesday 14 February 2006 2:46 pm, Steven W. Orr wrote:
> Jerry, I'll disagree with you on this one. Use of System V ipc is highly
> deprecated. I did a big project back in '90 that was a heavy user of
> semaphores and msgqueues. It was the right thing to do back then but
> today it's dead wrong. Today, if you are writing interprocess
> communication within one machine, you should look at the socketpair call.
> (Under SVR4 we used something called STREAMS pipes which provided
> similiar
> functionality.) The idea is to write one process to be the keeper of the
> holy data and to make him a server process that people can connect to
> using socketpair. It's sort of like a pipe that is allowed to be used to
> connect two unrelated processes. One of the things about ipcs is the
> error recovery needed to ensure they work properly. e.g., I have a msgq
> that has a limit of X nr of messages. What are the clients supposed to do
> if the enqueue fails? All of those class of problems go away if you use
> the correct architecture.
I have no qualms on this, but I also don't think that socketpair(2) is the 
answer per se., but the issue is more in the detail. If all that is needed 
is a common lookup table and a place to register a service, then possibly 
mmap(2) in combination with socketpair(2) and some of the other socket 
oriented calls would work fine. Possibly even fifos.  I'm advocating more 
of an in-memory approach rather than a database approach. 
-- 
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