Re: gets, fconfigure question
- From: rugger@xxxxxxxxxxxx (Kip Rugger)
- Date: 19 Apr 2006 15:48:22 -0500
Donal K. Fellows <donal.k.fellows@xxxxxxxxxxxxxxxx> wrote:
Kip Rugger wrote:
I think what you are seeing is that files don't really support the
non-blocking mode -- this is an operating system thing.
It would be more accurate to say that files don't support _blocking_
mode; a read of a plain file should never block for anything. Which
isn't to say that it's instantaneous, but it certainly pretends to be.
Alas, this is true even with networked filing systems, where blocking
most certainly is possible, but that's a real multi-level abstraction
buster of a problem, and not something we can solve.
Indeed, it reminds me of when I worked at a place where the applications
were all served out of a single central NFS server which hadn't had
sufficient investment in hardware support for a few years. One day, it
got hardware hiccups because of overloading, and it took days for things
to be fixed up; large numbers of machines locked solid waiting for
memory (specifically the applications' text segments) to be mapped back
in from the server, the server couldn't stand the load imposed by
serving hundreds of simultaneous requests for the mwm binary (yes, this
was quite a few years ago now) and fell over about 5 seconds after
coming alive each time. To make things even more fun, it insisted on
doing a full fsck every time it booted, so the cycle time wasn't really
5s, but rather about 15 minutes. I was a bit lucky for the first couple
of hours (I used my own custom window manager and application at the
time, and home directories were on a different NFS server) but then the
Xserver got paged and I was stuck for the duration too. Horrible. (The
fix was procured and installed within about two weeks; a distributed
scalable NFS system based on the periodic use of rsync to keep slave NFS
servers - one per ~20 workstations - up to date with a central
application server that did not run NFS. As far as I know, that system
is still in use today.)
Donal (OK, enough off-topic rambling...)
Well, you can certainly get into a situation in which you hate NFS :)
In our organization (as in yours) we use laptops. If the laptop is
not connected to the office network (directly, Internet), then NFS is
totally useless. Instead, you have to rely on a potentially
out-of-date copy of the filesystem in question that is stored on the
laptop.
Our organization may differ from yours in that our primary application
is shareware, and that the work product of our employees is ultimately
the keystrokes they make on their laptops. So the server can be
out-of-date with respect to any laptop (new work, not recorded), while
the laptop copy of the fs may not have the latest updates to the
server or to other laptops.
Rather than NFS, we require a filesystem which is a replicated
database that can survive arbitrary network partitioning.
Now the interesting thing from database theory is that, while general
solutions to the above problem are not theoretically possible, it is
always possible to state what to do in any specific situation -- you
have to add in the business constraints and practices. And this is
how we construct our replicated filesystem.
Because we use a *BSD OS, it is very easy to construct the original
log info that tells what happened to the local filesystem. That part
is easy.
Then there is the logic for re-syncing copies of the filesystem, using
the log files. I do this in Tcl. This is core+tDOM+tclX, or nothing
that readers of this group don't understand. The reason that I use
these tools is that they are *reliable*: I really don't want buggy
software screwing up my distributed filesystem. The special handling
by file type tends to be a few lines of script, and this (I hope) can be
written correctly the first time.
While Tcl cannot be expected to fix NFS, it certainly can be used to
go around the problems that NFS creates.
.
- References:
- gets, fconfigure question
- From: Stuart
- Re: gets, fconfigure question
- From: Kip Rugger
- Re: gets, fconfigure question
- From: Donal K. Fellows
- gets, fconfigure question
- Prev by Date: Re: Summer of Code
- Next by Date: Re: Accessing https URL's through a proxy
- Previous by thread: Re: gets, fconfigure question
- Next by thread: Re: gets, fconfigure question
- Index(es):
Relevant Pages
|
|