qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carl Trieloff <cctriel...@redhat.com>
Subject Re: Routing with Google Protocol Buffers
Date Tue, 17 Feb 2009 16:54:22 GMT
Joshua Kramer wrote:
>
> Howdy Folks,
>
> I wanted to throw out an idea.  Is anybody using QPid to pass messages 
> based on Google's Protocol Buffers (PB)?  Would it be beneficial to 
> write an exchange that routes messages based on something like a 
> jquery, only on PB messages instead of XML?
>
> I am using Protocol Buffers in a blog I'm creating.  The front end, 
> based in Django, sends requests via PB through Qpid to some 
> Rpython-based modeling software I wrote.  PB took less time to 
> implement in Python than a comparable XML solution would have taken.
>
> From the PB site:  "Protocol buffers are what you use if your network 
> link is already saturated and your CPU's are already overused."  They 
> are 3 to 10 times smaller, and 20 to 100 times faster than XML.  You 
> write a definition of your data's structure, then the PB compiler will 
> give you objects in Java, Python, or C++.  Far easier to use than XML.
>
> http://code.google.com/apis/protocolbuffers/
>
> Cheers,
> -Josh
>

Josh,

I expect it would be quite easy to do, I have skimmed the PB stuff. The 
XML XQuery exchange is a plugin to the broker which is much
the same pattern and can be found here

https://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/src/qpid/xml/

As you can see, it subclasses the exchange, and when the plugin loads it 
registers the XQuery exchange. This part would be 90%
the same for PB plugin.

In 
https://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/src/qpid/xml/XmlExchange.cpp 
you would have to re-implement specifically for PB,
i.e. how you want binding specified, and what lib to call on the PB 
side, or code the routing part.

I would copy the xml dir to protocolBuffer dir and use these 4 files as 
the starting point for a PB exchange plug-in.

Finally, there is a .mk one level up that will need the PB plugin added 
to the make process. If you do the PB stuff etc, I'll be glad to help
with the project integration stuff.

regards
Carl.






---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Mime
View raw message