Best practices bayeux/http

Dai Jun guiwuu at gmail.com
Thu Jul 30 10:07:30 EDT 2009


Hi Tom,

Thanks for your patch, I've merge it into latest code and you will see
it in next commit. Currently the codec only support the long polling
connection type using POST method, and callback polling connection
with GET method will be supported in next two days. Here is my plan,
http://guiwuu.blogspot.com/2009/07/bayeux4netty-report-5-new-journey.html.
Please give me some time to finish it, I promise finish it ASAP.

I am very interesting in your own http server and requirment of your
Bayeux application. I am also comfused how to provide a fridenly user
API of Bayeux codec. As you seen, Bayeux is a middle level protocol,
on top of HTTP and below application. In protocol
document,http://svn.cometd.org/trunk/bayeux/bayeux.html, it describes
many default logics as in the chat example. So, I cann't put every
request to high level applications and let themselves response, like
HTTP codec. In another hand, as you said, the codec should also give
applications access to the phase between after receiving request and
before writing response.

Unfortunately, I have not find a right way to solve it and am trying.
Instead of exposing every request directly, I may expose a
BayuexContext with them to applications. It's only a rough idea:). I
have no idea wether it will satisify real requirments. If you have
suggestion please let me know, I am very happy to discus it with all
of you.

Best regards,

Dai Jun or Danny Dai in English, http://guiwuu.googlepages.com
GTalk: guiwuu at gmail.com | QQ: 93409048 | MSN: guiwuu at hotmail.com |
Twitter: guiwuu



On Thu, Jul 30, 2009 at 7:54 AM, Tom Hastjarjanto<tom at intellicode.nl> wrote:
> Hey guys,
> I was just wondering what would be the best way to architect a web
> application using both static, dynamic and bayeux requests. From the sample
> apps I figure I build my own handler extending simpleupstream handler and
> depending on the content of getMessage I serve either the static or dynamic
> content.
> When it comes to the bayeux request I figure this has been processed already
> in the decoder phase, how can I customize the bayeux response, would I need
> to edit the contents of the result I get from getMessage? The sample
> application only shows when messages send by the JS side automatically get
> distributed among the other clients without custom processing of the request
> by the application developer.
> PS: found another bug, when I send a random get query without "message" it
> fails with a nullpointer on line 91 (easy to see why), I supplied a patch to
> fix this problem, however I don't know whether this is protocol or not, but
> with the current code it seems that it is never possible to use the message
> get query parameter for your own application, maybe it would be nice to be
> able to map your bayeux code to only a certain url. I don't have enough
> knowledge about the this though.
> Cheers
> Tom
> _______________________________________________
> netty-dev mailing list
> netty-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-dev
>
>


More information about the netty-dev mailing list