Passing ruby literals over TPC as an alternative to Xml-Rpc

Discussion in 'Ruby' started by Dolazy, Jan 8, 2007.

  1. Dolazy

    Dolazy Guest

    Passing ruby literals seems an easy way to let programs communicate
    with each other.. And it eliminates the verbosity of XML.

    I'll give an example for those not familiar with literals or xml-rpc:
    Instead of sending:
    <array>
    <data>
    <value><i4>1404</i4></value>
    <value><string>Something here</string></value>
    <value><i4>1</i4></value>
    </data>
    </array>

    you would be sending:
    [ 1404, "Something here", 1 ]

    Do you think it could be a valid alternative to Xml-Rpc?

    I would love to hear your insights :)

    Kind regards,
    Francis
     
    Dolazy, Jan 8, 2007
    #1
    1. Advertising

  2. Dolazy wrote:
    > Passing ruby literals seems an easy way to let programs communicate
    > with each other.. And it eliminates the verbosity of XML.
    >
    > I'll give an example for those not familiar with literals or xml-rpc:
    > Instead of sending:
    > <array>
    > <data>
    > <value><i4>1404</i4></value>
    > <value><string>Something here</string></value>
    > <value><i4>1</i4></value>
    > </data>
    > </array>
    >
    > you would be sending:
    > [ 1404, "Something here", 1 ]
    >
    > Do you think it could be a valid alternative to Xml-Rpc?
    >
    > I would love to hear your insights :)
    >
    > Kind regards,
    > Francis
    >
    >
    >
    >

    But if you are using an XML-RPC library you will never see the XML. How
    is this a problem?

    What you are suggesting would work but then you could also use bencoding
    (as used in torrent files), which has a smaller overhead than XML but is
    quite flexible.

    Sure passing stuff over sockets would work :) but why do you feel the
    need to replace XML-RPC? There is a little more to XML-RPC than the XML
    encoding, ok not much more but it is more than just stuffing things into
    XML. The advantages of using XML-RPC is that it will allow other
    programming languages to communicate with you without having to write
    libraries for your new protocol for half a dozen languages.

    Now SOAP, that's an abomination!
     
    Peter Hickman, Jan 8, 2007
    #2
    1. Advertising

  3. Dolazy

    Alex Young Guest

    Peter Hickman wrote:
    > Dolazy wrote:
    >> Passing ruby literals seems an easy way to let programs communicate
    >> with each other.. And it eliminates the verbosity of XML.
    >>
    >> I'll give an example for those not familiar with literals or xml-rpc:
    >> Instead of sending:
    >> <array>
    >> <data>
    >> <value><i4>1404</i4></value>
    >> <value><string>Something here</string></value>
    >> <value><i4>1</i4></value>
    >> </data>
    >> </array>
    >>
    >> you would be sending:
    >> [ 1404, "Something here", 1 ]
    >>
    >> Do you think it could be a valid alternative to Xml-Rpc?
    >>
    >> I would love to hear your insights :)
    >>
    >> Kind regards,
    >> Francis
    >>
    >>
    >>
    >>

    > But if you are using an XML-RPC library you will never see the XML. How
    > is this a problem?
    >
    > What you are suggesting would work but then you could also use bencoding
    > (as used in torrent files), which has a smaller overhead than XML but is
    > quite flexible.
    >
    > Sure passing stuff over sockets would work :) but why do you feel the
    > need to replace XML-RPC? There is a little more to XML-RPC than the XML
    > encoding, ok not much more but it is more than just stuffing things into
    > XML. The advantages of using XML-RPC is that it will allow other
    > programming languages to communicate with you without having to write
    > libraries for your new protocol for half a dozen languages.
    >
    > Now SOAP, that's an abomination!
    >

    I'm sure YAML-RPC's been suggested before, if XML verbosity makes the
    hairs on the back of your neck stand on end, and if cross-language
    compatibility isn't an issue, DRb's the way to go, surely...

    --
    Alex
     
    Alex Young, Jan 8, 2007
    #3
  4. Dolazy

    Luis Guest

    Luis, Jan 8, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Goche
    Replies:
    8
    Views:
    16,546
  2. Pere Montolio

    XML RPC to ONC XDR RPC

    Pere Montolio, Aug 11, 2004, in forum: XML
    Replies:
    0
    Views:
    757
    Pere Montolio
    Aug 11, 2004
  3. Ymtrader
    Replies:
    1
    Views:
    605
    Adam Tauno Williams
    Mar 15, 2011
  4. Shirish Joshi

    Ruby and Sun-RPC or ONC-RPC ?

    Shirish Joshi, Apr 7, 2004, in forum: Ruby
    Replies:
    0
    Views:
    219
    Shirish Joshi
    Apr 7, 2004
  5. Vladimir Konrad

    rpc (not xml-rpc)

    Vladimir Konrad, Sep 2, 2005, in forum: Ruby
    Replies:
    5
    Views:
    149
    Austin Ziegler
    Sep 3, 2005
Loading...

Share This Page