sending an object - twisted or what?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paul Sweeney

    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


  • Lars Heuer

    #2
    Re: sending an object - twisted or what?

    Hi Paul,
    [color=blue]
    > 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'.[/color]
    [color=blue]
    > Is twisted the only way to go, or is there something
    > simpler for my app? The code for twisted is fairly simple (I found[/color]

    I don't know if it's simpler, but there's PyRO:


    Best regards,
    Lars


    Comment

    • Mutah

      #3
      Re: sending an object - twisted or what?

      On Tue, 27 Apr 2004 13:00:17 +0000 (UTC)
      Paul Sweeney wrote:
      [color=blue]
      > 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.
      >[/color]


      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

      Comment

      • Paul Sweeney

        #4
        Re: sending an object - twisted or what?

        "Mutah" <mutah@NOSPAM-libertysurf.fr> wrote in message
        news:2004042715 2051.50234c65.m utah@NOSPAM-libertysurf.fr. ..[color=blue]
        > On Tue, 27 Apr 2004 13:00:17 +0000 (UTC)
        > Paul Sweeney wrote:
        >[color=green]
        > > 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.
        > >[/color]
        >
        >
        > 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.
        >[/color]

        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


        Comment

        • Paul Sweeney

          #5
          Re: sending an object - twisted or what?

          "Lars Heuer" <python@quixs.c om> wrote in message
          news:mailman.45 .1083079451.257 42.python-list@python.org ...[color=blue][color=green]
          > > 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'.[/color]
          >[color=green]
          > > Is twisted the only way to go, or is there something
          > > simpler for my app? The code for twisted is fairly simple (I found[/color]
          >
          > I don't know if it's simpler, but there's PyRO:
          > http://pyro.sourceforge.net/
          >[/color]
          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


          Comment

          • Kyler Laird

            #6
            Re: sending an object - twisted or what?

            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

            Comment

            • Paul Sweeney

              #7
              Re: sending an object - twisted or what?

              "Kyler Laird" <Kyler@news.Lai rds.org> wrote in message
              news:ucj4m1-5a5.ln1@snout.l airds.org...[color=blue]
              > 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[/color]

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

              Good call, thx

              Paul


              Comment

              • Irmen de Jong

                #8
                Re: sending an object - twisted or what?

                Paul Sweeney wrote:
                [color=blue][color=green]
                >>I don't know if it's simpler, but there's PyRO:
                >>http://pyro.sourceforge.net/
                >>[/color]
                >
                > 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. :-)[/color]

                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.

                Comment

                • Irmen de Jong

                  #9
                  Re: sending an object - twisted or what?

                  Paul Sweeney wrote:
                  [color=blue]
                  > It's quite likely this is going the way of xml-rpc over ssh.[/color]

                  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

                  Comment

                  • Kyler Laird

                    #10
                    Re: sending an object - twisted or what?

                    "Paul Sweeney" <reverse.ku.oc. issolok@nothypg nal.delrest.co. uk> writes:
                    [color=blue][color=green]
                    >> 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?[/color][/color]
                    [color=blue]
                    >It's quite likely this is going the way of xml-rpc over ssh.[/color]

                    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

                    Comment

                    Working...