473,804 Members | 1,999 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sending an object - twisted or what?

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
9 1691
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
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
"Mutah" <mu***@NOSPAM-libertysurf.fr> wrote in message
news:2004042715 2051.50234c65.m u***@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 "reinventin g the wheel" vs getting a pre-built
wheel but with a huge road-train undesirably attached.

Paul
Jul 18 '05 #4
"Lars Heuer" <py****@quixs.c om> wrote in message
news:ma******** *************** **************@ python.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
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
"Kyler Laird" <Ky***@news.Lai rds.org> wrote in message
news:uc******** ****@snout.lair ds.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
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
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
"Paul Sweeney" <re************ *******@nothypg nal.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4157
by: Paul Moore | last post by:
I hit a problem yesterday with my mail connection. In a desparate attempt to understand what was going on, I wanted to log the connection traffic. After a bit of searching, I found a post on c.l.p from Andrew Bennetts explaining how to run a port forwarder in 2 lines using Twisted. $ mktap portforward -p 8000 -h remote -d 20 $ twistd -f portforward.tap This looked brilliant - all I needed to do was add logging. A quick
1
2457
by: Fazer | last post by:
Hello, I am very interested in fooling around with Twisted Matrix's HTTP Web Server. I was thinking if .rpy scripts would run much faster than traditional CGI scripts? After looking how asynchronous Twisted's framework really is, I have been interested in it. Thanks,
2
7952
by: Mark Carter | last post by:
I'm trying to create a mail server in Twisted. I either get SMTPSenderRefused or SMTPException: SMTP AUTH extension not supported by server. What do I need to do to get it to work?
2
1822
by: Taki Jeden | last post by:
Hi Anybody used wxPython with twisted? I started putting together a Twisted-based app with wx GUI, and the widgets just don't work - some controls do not show up etc. - at least on my system. For example, if I just take the wxdemo.py shipped with Twisted, and add to it a static text, it doesn't show - while if I change
2
2382
by: SeSe | last post by:
Hi, I am new to Twisted. I use a Twisted 1.3.0 on MS Windows XP Home Edition, my python version is 2.3 I try the TCP echoserv.py and echoclient.py example. But the client always fail with following message: Unhandled error in Deferred: Traceback (most recent call last): File "D:\PYTHON23\Lib\site-packages\twisted\internet\default.py", line 134, in
2
1913
by: Christopher Subich | last post by:
I'm building an application that makes several user-specified internet connections; twisted meets my needs more or less perfectly. I'm running into a problem, however, in that twisted is not allowing connections (reactor.connectTCP) by hostname, only IP address. From what I can tell, the problem lies in that Twisted simply isn't performing the DNS resolutions. From the connection factory's startedConnecting method, print...
0
1072
by: Matthew Warren | last post by:
Looking through those docs quickly leads me into quite a bewildering maze. As a kind of way to perhaps get me heading in the right direction and understanding how I start to hang all that together to get what I want, I would appreciate it if anyone could look at this little code snippet I have, and illustrate how I can end up doing the same thing with twisted, but end up with an interactive connection that can handle vi... From there I...
1
1228
by: sndive | last post by:
i have a lot of trouble selling twisted a a client lib for network access (on embedded platform) the group i'm a member of wants to write some unmaintainable threaded blocking junk in c--. does anyone can give me an idea how many kilobytes extra would it take to have a pyqt linked in and a running qtreactor? (qtreactor natirally depends on the qt bindings) is there an exaample of going thru a passworded proxy
0
192
by: Jean-Paul Calderone | last post by:
On Wed, 25 Jun 2008 10:28:10 -0500, Larry Bates <larry.bates@websafe.com`wrote: Twisted PB goes out of its way to *not* allow arbitrary code specified by a peer to be executed, actually. :) It is intended to be used when you cannot trust the network (a common scenario) but still want to perform complex operations and pass complex data around. Jean-Paul
0
9711
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9591
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10343
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10331
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9166
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7631
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5529
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5667
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.