[TransWarp] is there a chance that SEF class-tree's will be pickle-able??
Ulrich Eck
ueck at net-labs.de
Thu Apr 4 08:31:43 EST 2002
Hi Phillip,
i played around with Transarp quite alot and we think about
writing our EMF (Educational Management Framework) with it.
Our needs are:
- Distributed Object System !!!
- LDAP-Server for Storage (ActiveDirectory or OpenLDAP)
- Kerberos integration
- wxWindows or gtk Client
most of the things will work with Transwarp but ..
i have a problem with the Distributed Object System.
I tried Pyro first and it does not coop, because it relies on pickle.
so i started inspecting what's the problem .. here what i found out:
i have a simple test-app:
-------------------------------------------------
from TW.API import *
class App(SEF.App):
title = 'PyroApp'
class MyService(SEF.Service):
title = 'MyService'
def whoIs(self):
print "hi it's me: " + self.title
return self.title
def whoIs(self):
print "hi it's me: " + self.title
return self.title
setupModule()
-------------------------------------------------
this comes out when i try to pickle the App instance:
>>> a = test.App()
>>> a
<test.App object at 0x827097c>
>>> a.MyService
<test.MyService object at 0x8270c94>
>>> a.MyService.whoIs()
hi it's me: MyService
'MyService'
>>> import StringIO
>>> out = StringIO.StringIO()
>>> pickle.dump(a,out)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.2/pickle.py", line 969, in dump
Pickler(file, bin).dump(object)
File "/usr/lib/python2.2/pickle.py", line 115, in dump
self.save(object)
File "/usr/lib/python2.2/pickle.py", line 215, in save
self.save_reduce(callable, arg_tup, state)
[... snip ...]
File "/usr/lib/python2.2/pickle.py", line 515, in save_global
raise PicklingError(
pickle.PicklingError: Can't pickle <class 'test.MyService'>: it's not found
as test.MyService
>>> type(a.MyService)
<class 'test.MyService'>
>>>
so the class MyService (should actually be test.App.MyService) is not found
in module test.
is this a python-problem??
type(<instance>) tells already the wrong thing.
what do you think ??
We initally wanted to use corba (omniORB) for communication,
which is still an option .. but we wanted to minimize the
platform-dependend stuff as far as possible.
This will probably work, but is lots of work writing the interfaces
and client-code as well.
Is there a chance that we can use Pyro with SEF/Transwarp (Class-Trees)
someday?
thanks for your comments.
p.s. have you had a look at the cvs-source of TWGUI ??
Ulrich Eck
---------------------------------------------------------------------------
net-labs Systemhaus GmbH
Ebersberger Str. 46
85570 Markt Schwaben
fon: +49-8121-4747-11
fax: +49-8121-4747-77
email: ueck at net-labs.de
http://www.net-labs.de
More information about the PEAK
mailing list