sending executable data over network..

Piyush Anonymous piyush.subscription at gmail.com
Tue Jun 24 15:29:33 EDT 2008


assuming security is not of concern at the moment,

how can i add in update capability? please help me out or show some pointers
to look into.

i wish to change the way the method definition of a class at run time in a
running server (actually i m planning to support many changes at run time).
new code which is to be executed is provided by a client at different
location.
i am receiving the code as a string and compile it on server-side with the
'compile' builtin function or get compiled code using marshal. however i
cannot link it to the running code in server?

for example, i get a new method definition for a method in class and i wish
to change it.
client sent new definition, i compile it in server, getting a code object.
how can i link it to old code?

if it will running in same environment, i could simply write
A.getdata=getdatanew  # A is a class

how should i do it here? should i change the way i am receiving the code?

thanks for help
-piyush

On Wed, Jun 25, 2008 at 12:22 AM, Terry Reedy <tjreedy at udel.edu> wrote:

>
>
> Piyush Anonymous wrote:
>
>> any idea or pointer how i could link it to running code in server?
>> for example, i get a new method definition for a method and i wish to
>> change it.
>> client sent new definition, i compile it in server. how can i link it to
>> old code?
>>
>
> Code to be hot-updated (while running) must have update capability builtin.
>  But please consider security.  If a remote system can log in and *push*
> code, an attacker can potentially do the same.  Notice that self-updating
> programs and systems generally log out to a hardwired location, ask if there
> are updates, and *pull* the new code.
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080625/0e7b12d3/attachment-0001.html>


More information about the Python-list mailing list