distributed computing implementations

Martin v. Löwis martin at v.loewis.de
Sun Apr 13 16:35:51 EDT 2003


Robin Becker <robin at jessikat.fsnet.co.uk> writes:

> Well after thinking about it I guess you're right. I guess I'm harking
> back to times when only small numbers of file handles could be held and
> thinking that sockets might be subject to the same kind of limits.

You are right that file descriptors are a limited resource, and any
carefully designed distributed-computing library needs to take this
into account. *However*, if taken into account, you can make good use
of this limited resource by nearly exhausting it:

Allow your library to consume a certain number of file descriptors,
just about as much so that enough are left for local file IO. Then the
library should implement some collection mechanism for unused socket
connections, and shut down anything that has not been used for a
while. The protocol needs to allow shut-downs from either side, as
both partners may experience file descriptor exhaustion.

In CORBA, you need to keep open all connections from which you expect
a response. So if your allocated socket descriptor pool is exhausted,
you first close those connections that have no outstanding requests.
If that is still insufficient, you also close the socket on which you
have been waiting for a response longest, and tell the application
that this connection has timed out.

Regards,
Martin




More information about the Python-list mailing list