Re: Socket holding pattern
From: Anno Siegel (anno4000_at_lublin.zrz.tu-berlin.de)
Date: 09/09/04
- Next message: Morten Reistad: "Re: Xah Lee's Unixism"
- Previous message: Stephen Jeffrey: "Plotting into XML pages"
- In reply to: Gordon: "Re: Socket holding pattern"
- Next in thread: Uri Guttman: "Re: Socket holding pattern"
- Reply: Uri Guttman: "Re: Socket holding pattern"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 9 Sep 2004 10:07:25 GMT
Gordon <clemmons@gmail.com> wrote in comp.lang.perl.misc:
> > If the duration of each connection is limited, an "overlapping restart"
> > is a possibility.
> >
> > On a signal (or something), the server forks and execs a new copy.
> > It also ceases to accept new connections, but continues serving
> > the old ones. When the last connection is gone, it dies. All
> > new requests are served by the new process.
> >
> > If you have unlimited connection time, and can't afford to break
> > long-lasting ones, this simple scheme won't work. Sketchy as it
> > is, it may well not work for other reasons.
> >
> > Anno
>
> Thanks for the message, it's actually for unlimited connections
> though. It's a mud / online game server.
I'd still go a long way to avoid having to hand over multiple
connections from one process to another. Apart from the technicalities
of doing that, you may run into compatibility problems when the
new server must handle connections that were established under the
old one.
You could just leave the old server running (until the next
system reboot -- nothing survives that anyway). Bug the players
still logged in on the old server with messages ("New features!
Log out and back in to use them!") until they do.
Another possibility is to open the relevant file handles (sockets)
so that they are immune to close-on-exec. (Set $^F to something
huge while they are opened). The old server process would have
to tell the new one which file descriptors are in use, so the new
one can take them over. Besides the compatibility issues already
mentioned, there may be synchronization problems when both processes
hold file handles to active connections.
Anno
- Next message: Morten Reistad: "Re: Xah Lee's Unixism"
- Previous message: Stephen Jeffrey: "Plotting into XML pages"
- In reply to: Gordon: "Re: Socket holding pattern"
- Next in thread: Uri Guttman: "Re: Socket holding pattern"
- Reply: Uri Guttman: "Re: Socket holding pattern"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|