By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,235 Members | 1,057 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,235 IT Pros & Developers. It's quick & easy.

sending an object - twisted or what?

P: n/a
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/c...to/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
Jul 18 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
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
Jul 18 '05 #2

P: n/a
On Tue, 27 Apr 2004 13:00:17 +0000 (UTC)
Paul Sweeney wrote:
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/c...to/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.

--
mutah
Jul 18 '05 #3

P: n/a
"Mutah" <mu***@NOSPAM-libertysurf.fr> wrote in message
news:20040427152051.50234c65.mu***@NOSPAM-libertysurf.fr...
On Tue, 27 Apr 2004 13:00:17 +0000 (UTC)
Paul Sweeney wrote:
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/c...to/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.


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
Jul 18 '05 #4

P: n/a
"Lars Heuer" <py****@quixs.com> wrote in message
news:ma*************************************@pytho n.org...
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/

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
Jul 18 '05 #5

P: n/a
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
Jul 18 '05 #6

P: n/a
"Kyler Laird" <Ky***@news.Lairds.org> wrote in message
news:uc************@snout.lairds.org...
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
Jul 18 '05 #7

P: n/a
Paul Sweeney wrote:
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. :-)


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.

Jul 18 '05 #8

P: n/a
Paul Sweeney wrote:
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
Jul 18 '05 #9

P: n/a
"Paul Sweeney" <re*******************@nothypgnal.delrest.co.uk> writes:
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?
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
Jul 18 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.