[Twisted-Python] Mobile code using PB
Tzahi Fadida
Tzahi.ML at gmail.com
Tue Jun 27 17:51:21 MDT 2006
Hi,
I am looking for a way to have a mobile code feature using PB very similar to
pyro. The idea is like this: There is a server and a client.
The client trust the server completly.
The server does not trust the client.
The client gets arbitrary classes from the server and if a module
of the class is missing it raises an exception that will ultimately
result in downloading the module and injecting it.
If the module exists locally (same ver or something like that)
do not download it.
Basically i can override the security options like so:
pb.globalSecurity.isModuleAllowed=\
jelly.DummySecurityOptions().isModuleAllowed
pb.globalSecurity.isClassAllowed=\
jelly.DummySecurityOptions().isClassAllowed
pb.globalSecurity.isTypeAllowed=\
jelly.DummySecurityOptions().isTypeAllowed
If i call a remote method and the returned value is an unknown class,
i recieve importError as "failure" which i can handle and
send the module to the client
However, if i send an unknown class as a parameter for a remote
method, the exception at the remote side is handled behind the scene
and i can't seem to trap it. Though, i am getting the importError
failure message on the calling side (so it is somehow manageable).
Is there something that already exists so i won't have to reinvent the wheel?
using this trust model, do i really need pb.copyable and pb.remotecopy?
I.e. i want to replace these with custom isModuleAllowed isClassAllowed,
etc...
10x.
--
Regards,
Tzahi.
--
Tzahi Fadida
Blog: http://tzahi.blogsite.org | Home Site: http://tzahi.webhop.info
WARNING TO SPAMMERS: see at
http://members.lycos.co.uk/my2nis/spamwarning.html
More information about the Twisted-Python
mailing list