Friday, December 05, 2008

remote execution

So I am working on this project where the code runs in a virtual machine using python. To make some of the code faster, we could pass it "outside" of the VM and let it run natively.

I was just musing and asked, can you get an object that is a python closure. Then, we could serialize the object, send it out, and execute it on the outside?

I doubt its possible, but its interesting.

A quick look at google suggests that you can not pickle a closure. (Assuming that you dont want to follow Greenspun's 10th Rule expanded to include python)
Heh, I can't imagine writing the code to pickle something like a closure.

gah, I have been infected! is there no cure?

No comments: