You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Kevin Smith <ks...@redhat.com> on 2007/03/12 21:04:14 UTC

Ruby/Python Code

So it looks like I need to prototype some sort of RPC-over-message-bus mechanism 
for my day job and, of course, QPID is my first choice for the message bus :)

I had seen in another mail that there was a Python framework to make writing 
clients and servers easier. Is this the code in python/qpid/peer.py and 
python/qpid/delegate.py? If this is the code, are there any examples using the 
code? If this isn't the code, any pointers would be appreciated.

--Kevin

Re: Ruby/Python Code

Posted by Rupert Smith <ru...@googlemail.com>.
Kevin, not sure exactly what you're after but this might be worth a
look to give you a few ideas:

http://activemq.apache.org/how-should-i-implement-request-response-with-jms.html

The MultiplexingRequestor provides a simple synchronous request over
asynchronous messaging utility.

Rupert

On 3/13/07, Bacon, Stephanos <sb...@iona.com> wrote:
> Take a look at the CXF project, they support WS over JMS and I'm pretty
> sure they've made it work with Qpid in particular.
>
> -steph
>
> > -----Original Message-----
> > From: John O'Hara [mailto:john.r.ohara@gmail.com]
> > Sent: Monday, March 12, 2007 7:37 PM
> > To: qpid-dev@incubator.apache.org
> > Subject: Re: Ruby/Python Code
> >
> > I would avoid re-inventing the marshalling/dispatch wheel another
> time.
> >
> > Choose from ONC IDL, CORBA IDL or WSDL.
> > I'm actually a fan of Web Services over AMQP, but not over HTTP (weak
> in
> > comparison).
> >
> > Use Python to russell up the WS call then send it over Qpid.  Neat and
> > architecturally very sound.
> > John
> >
> > On 12/03/07, Rafael Schloming <ra...@redhat.com> wrote:
> > >
> > > Kevin Smith wrote:
> > > > So it looks like I need to prototype some sort of
> RPC-over-message-bus
> > > > mechanism for my day job and, of course, QPID is my first choice
> for
> > the
> > > > message bus :)
> > > >
> > > > I had seen in another mail that there was a Python framework to
> make
> > > > writing clients and servers easier. Is this the code in
> > > > python/qpid/peer.py and python/qpid/delegate.py? If this is the
> code,
> > > > are there any examples using the code? If this isn't the code, any
> > > > pointers would be appreciated.
> > >
> > > That is the code, however you want the version under here:
> > >
> > >      branches/qpid.0-9/python/
> > >
> > > Look at the server script in the above directory for example server
> > usage.
> > >
> > > I'm not sure this is really what you're looking for though since the
> > > RPC-apis are generated from the AMQP XML spec itself, so you'd
> really
> > > have to write a new version of the XML spec file if you wanted to
> use
> > > custom APIs, i.e. this code is really XML spec based RPC-apis for
> > > *implementing* a message bus, not RPC apis *over* a message bus.
> > >
> > > That said many of the same pythonesque coding tricks for dynamically
> > > generating APIs would probably still apply so it's certainly worth a
> > > look and I'm happy to answer any other questions that may come up.
> > >
> > > --Rafael
> > >
> > >
>

RE: Ruby/Python Code

Posted by "Bacon, Stephanos" <sb...@iona.com>.
Take a look at the CXF project, they support WS over JMS and I'm pretty
sure they've made it work with Qpid in particular.

-steph

> -----Original Message-----
> From: John O'Hara [mailto:john.r.ohara@gmail.com]
> Sent: Monday, March 12, 2007 7:37 PM
> To: qpid-dev@incubator.apache.org
> Subject: Re: Ruby/Python Code
> 
> I would avoid re-inventing the marshalling/dispatch wheel another
time.
> 
> Choose from ONC IDL, CORBA IDL or WSDL.
> I'm actually a fan of Web Services over AMQP, but not over HTTP (weak
in
> comparison).
> 
> Use Python to russell up the WS call then send it over Qpid.  Neat and
> architecturally very sound.
> John
> 
> On 12/03/07, Rafael Schloming <ra...@redhat.com> wrote:
> >
> > Kevin Smith wrote:
> > > So it looks like I need to prototype some sort of
RPC-over-message-bus
> > > mechanism for my day job and, of course, QPID is my first choice
for
> the
> > > message bus :)
> > >
> > > I had seen in another mail that there was a Python framework to
make
> > > writing clients and servers easier. Is this the code in
> > > python/qpid/peer.py and python/qpid/delegate.py? If this is the
code,
> > > are there any examples using the code? If this isn't the code, any
> > > pointers would be appreciated.
> >
> > That is the code, however you want the version under here:
> >
> >      branches/qpid.0-9/python/
> >
> > Look at the server script in the above directory for example server
> usage.
> >
> > I'm not sure this is really what you're looking for though since the
> > RPC-apis are generated from the AMQP XML spec itself, so you'd
really
> > have to write a new version of the XML spec file if you wanted to
use
> > custom APIs, i.e. this code is really XML spec based RPC-apis for
> > *implementing* a message bus, not RPC apis *over* a message bus.
> >
> > That said many of the same pythonesque coding tricks for dynamically
> > generating APIs would probably still apply so it's certainly worth a
> > look and I'm happy to answer any other questions that may come up.
> >
> > --Rafael
> >
> >

Re: Ruby/Python Code

Posted by John O'Hara <jo...@gmail.com>.
I would avoid re-inventing the marshalling/dispatch wheel another time.

Choose from ONC IDL, CORBA IDL or WSDL.
I'm actually a fan of Web Services over AMQP, but not over HTTP (weak in
comparison).

Use Python to russell up the WS call then send it over Qpid.  Neat and
architecturally very sound.
John

On 12/03/07, Rafael Schloming <ra...@redhat.com> wrote:
>
> Kevin Smith wrote:
> > So it looks like I need to prototype some sort of RPC-over-message-bus
> > mechanism for my day job and, of course, QPID is my first choice for the
> > message bus :)
> >
> > I had seen in another mail that there was a Python framework to make
> > writing clients and servers easier. Is this the code in
> > python/qpid/peer.py and python/qpid/delegate.py? If this is the code,
> > are there any examples using the code? If this isn't the code, any
> > pointers would be appreciated.
>
> That is the code, however you want the version under here:
>
>      branches/qpid.0-9/python/
>
> Look at the server script in the above directory for example server usage.
>
> I'm not sure this is really what you're looking for though since the
> RPC-apis are generated from the AMQP XML spec itself, so you'd really
> have to write a new version of the XML spec file if you wanted to use
> custom APIs, i.e. this code is really XML spec based RPC-apis for
> *implementing* a message bus, not RPC apis *over* a message bus.
>
> That said many of the same pythonesque coding tricks for dynamically
> generating APIs would probably still apply so it's certainly worth a
> look and I'm happy to answer any other questions that may come up.
>
> --Rafael
>
>

Re: Ruby/Python Code

Posted by Rafael Schloming <ra...@redhat.com>.
Kevin Smith wrote:
> So it looks like I need to prototype some sort of RPC-over-message-bus 
> mechanism for my day job and, of course, QPID is my first choice for the 
> message bus :)
> 
> I had seen in another mail that there was a Python framework to make 
> writing clients and servers easier. Is this the code in 
> python/qpid/peer.py and python/qpid/delegate.py? If this is the code, 
> are there any examples using the code? If this isn't the code, any 
> pointers would be appreciated.

That is the code, however you want the version under here:

     branches/qpid.0-9/python/

Look at the server script in the above directory for example server usage.

I'm not sure this is really what you're looking for though since the 
RPC-apis are generated from the AMQP XML spec itself, so you'd really 
have to write a new version of the XML spec file if you wanted to use 
custom APIs, i.e. this code is really XML spec based RPC-apis for 
*implementing* a message bus, not RPC apis *over* a message bus.

That said many of the same pythonesque coding tricks for dynamically 
generating APIs would probably still apply so it's certainly worth a 
look and I'm happy to answer any other questions that may come up.

--Rafael