[LWN Logo]

From: David Miron <david.miron@dsto.defence.gov.au>
Subject: Serialization in Python
Date: Wed, 16 Sep 1998 15:34:08 +1000

Hi again guys,

Firstly thanks for your response on my prior email "Using sockets within
threads".

You have reassured me my code was okay however the code does hang
on the odd occasion even though it has been connected to.  Perhaps NT
is the problem.  If I find out more I shall let you know.

Another question re python has to do with serialization.  Lets say I
have an instance of a class X on machine A.  But I want an instance of X
on
machine B.  Can X pack itself up (methods and attributes) and send it
self from A to B.  Of course you need a socket connection and a process
on B
to unpack and instantiate X and  X should also run in its own thread.

These questions are driven by Guidos work with Jeremy Hylton at CNRI in
the field of Knowbots.  The idea is that X can perfrom some function on
B
and then pack itself up again and send itself to a machine C for
example.  Where C has no apriori knowledge of class X.

This question is also driven out of OO techniques and I use the baseball

analogy as an example.   When a baseball struck by a bat it takes the
input from the bat and says "Oh my gosh I have been hit I maust send
myself across the earth".  So it is the baseball that knows how to send
itself.


Thanks Guys

David


Dr David Miron
Research Scientist
C3I Research Centre
Defence Science and Technology Organisation
FernHill Park
Canberra ACT Australia 2600

Phone 02 62658005