Hey Lance,

Thanks for the detailed response.  I haven't checked out tapestry-cometd yet 
but I certainly will and it would be great to get this integrated as a core 
Tapestry module.  Congratulations on becoming a committer! 

My use case is to create a simple browser-based multiplayer game.  At it's core 
the game is played by 8 people and each person is asked to make a selection 
from 15 choices.  Once each client has sent their selection to the server I'd 
like the server to send an event to each client with a new set of 14 choices.  
This process is called Drafting if you are familiar with card games.  I'm quite 
unfamiliar with this paradigm generally so I'd have to work out how the server 
should main the state of the game and all of the individual client connections. 
 

Do you think this is an appropriate use case for the tapestry-cometd library?

Cheers,
Ben.

> Date: Wed, 4 Sep 2013 08:43:15 +0100
> Subject: Re: Tapestry Server Push/Web Socket/Comet implementation
> From: lance.j...@googlemail.com
> To: users@tapestry.apache.org
> 
> Hi Ben,
> 
> Yes, tapestry-cometd is my creation… have you actually given it a go?
> Is there something you need it to do that it can't?
> I'm interested to hear your use case and if there's something that
> tapestry-cometd can't do, I can help you out.
> 
> I'll give you a bit of a history lesson on how it evolved…
> 
> As a previous committer to DWR, I initially started out integrating
> tapestry with DWR's reverse ajax. After speaking with DWR's lead developer,
> he informed me that DWR's push was not bullet proof and that he himself
> preferred cometd. So, I switched to cometd. I then found that cometd didn't
> work on some older servlet containers but that Atmosphere has cometd
> integration. So, I switched to atmosphere-cometd. So, tapestry-cometd
> currently sits on top of the AtmosphereServlet.
> 
> One of the things that I dislike about CometD is that there is no "core"
> javascript implementation. Instead, you must either choose the jQuery or
> Dojo client libraries. I chose jquery and tapestry-cometd actually requires
> tapestry-jquery (I hate this!). If I had my time again, I would probably
> have written a straight tapestry-atmosphere integration. This seems to be
> the way forward since there is a core javascript implementation which does
> not require jquery / dojo or another "foundation" framework. It seems that
> most of the other java web frameworks out there have atmosphere integration
> so I think it's a safe bet.
> 
> That being said, a rewrite on top of atmosphere would act in a very similar
> way to tapestry-cometd.
> 
> 1. Put a PushTarget on a page
> 2. Give it a "topic" and an "event"
> 3. Publish a message to the "topic"
> 4. Return a "block" from the event (or execute some javascript)
> 5. Push the result to the PushTarget
> 
> Howard has hinted that he'd like to add push to tapestry but I haven't
> heard much lately. I've recently become a tapestry committer and I may even
> provide this module myself in the fuure. As with the other tapestry
> comitters, I have a day job and a social life to juggle with contributing
> to open source. For the moment your options are to use tapestry-cometd or
> to use tapestry and atmosphere side by side.
                                          

Reply via email to