socket programming project

Irmen de Jong irmen at -NOSPAM-REMOVETHIS-xs4all.nl
Thu Jun 26 19:07:52 EDT 2003


drs wrote:

> This looks really interesting.  In COM, there is the concept of a single use
> server where every client shares the same instance. Python does not really
> support creating a single use DCOM server, at least not last time I looked
> into it. Is this something Pyro can easily do, or will I need to use a db of
> some sort to keep track of shared data?

It actually is the default in Pyro :-)

You're creating Pyro server object instances. Every object instance can
be referred to by a unique logical name. If your Pyro client connects to the
logical name, it will remotely access the same object instance that all
other clients that requested that object by that name also do.

So, the object's state is always shared in Pyro. This means that your
object's implementation must be able to deal with concurrent /
multithreaded invocations (although Pyro can help you a bit with this).

--Irmen de Jong





More information about the Python-list mailing list