sending an object - twisted or what?

P

Paul Sweeney

I wish to send an object (only one class, but many objects)
from python running on one computer to python on another.
It will be over the internet, so needs to be 'secure'.

Is twisted the only way to go, or is there something
simpler for my app? The code for twisted is fairly simple (I found
http://twistedmatrix.com/documents/current/howto/pb-copyable)
but the library is a bit heavy and I don't want to go through the
hassle of dependencies/compiling etc if there's a simpler way.

thx in advance

Paul
 
M

Mutah

Is twisted the only way to go, or is there something
simpler for my app? The code for twisted is fairly simple (I found
http://twistedmatrix.com/documents/current/howto/pb-copyable)
but the library is a bit heavy and I don't want to go through the
hassle of dependencies/compiling etc if there's a simpler way.


Using only modules shipped with python, a simpler way (in term of
dependencies only) would be to pickle the objects and
then send the result throught a socket.

On the other side, you may need to write more code to do that.
 
L

Lars Heuer

Hi Paul,
I wish to send an object (only one class, but many objects)
from python running on one computer to python on another.
It will be over the internet, so needs to be 'secure'.
Is twisted the only way to go, or is there something
simpler for my app? The code for twisted is fairly simple (I found

I don't know if it's simpler, but there's PyRO:
http://pyro.sourceforge.net/

Best regards,
Lars
 
P

Paul Sweeney

Mutah said:
Using only modules shipped with python, a simpler way (in term of
dependencies only) would be to pickle the objects and
then send the result throught a socket.

On the other side, you may need to write more code to do that.

I was considering that but there is all the associated problems of knowing
when a complete object has been received, guarding against spoof data being
received from the internet etc.

It is a case of balancing "reinventing the wheel" vs getting a pre-built
wheel but with a huge road-train undesirably attached.

Paul
 
P

Paul Sweeney

Lars Heuer said:
I don't know if it's simpler, but there's PyRO:
http://pyro.sourceforge.net/
I meant to say I had looked at that too, but I just want to operate a queue
of objects sent between systems, so the whole name server/URI approach is
quite a lot of unnecessary overhead. Thanks for the post though. :)

Paul
 
K

Kyler Laird

SSH is typically available (and already running as a daemon) on most
computers I touch these days. It would provide for the secure
transport needed. Any reason not to use it?

--kyler
 
P

Paul Sweeney

Kyler Laird said:
SSH is typically available (and already running as a daemon) on most
computers I touch these days. It would provide for the secure
transport needed. Any reason not to use it?

--kyler

It's quite likely this is going the way of xml-rpc over ssh.

Good call, thx

Paul
 
I

Irmen de Jong

Paul said:
I meant to say I had looked at that too, but I just want to operate a queue
of objects sent between systems, so the whole name server/URI approach is
quite a lot of unnecessary overhead. Thanks for the post though. :)

Are you aware that it's not necessary to use a name server/URIs?
Pyro can also work without it. See the example at the top of this
page of the manual: http://pyro.sourceforge.net/pyro-manual/8-example.html
Well, you still have to point your client to the location of the
other computer, so that's where the PYROLOC URI comes in, but
this example works without starting a Name server etc.

Regards

Irmen de Jong.
 
I

Irmen de Jong

Paul said:
It's quite likely this is going the way of xml-rpc over ssh.

I'm sorry I forgot to mention in my other reply, that Pyro
supports SSL by itself (using the m2crypto module). No SSH
needed to set up a secure shell session.

--Irmen de JOng
 
K

Kyler Laird

It's quite likely this is going the way of xml-rpc over ssh.

That seems like a bit of overhead for something that might be simpler.
(I'm making guesses about your situation.) Both sides are running
Python so it could just be a matter of pickling the object, pushing it
to the other side, and unpickling it, right?

--kyler
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
474,189
Messages
2,571,016
Members
47,618
Latest member
Leemorton01

Latest Threads

Top