Comet with MooTools 1.3 (Joomla)?

60 views
Skip to first unread message

Mike

unread,
Aug 21, 2011, 11:23:53 AM8/21/11
to mootool...@googlegroups.com
I'm working on an interactive, multiplayer game for a Joomla site.  MooTools 1.3 is integrated into Joomla by default so it makes sense to use it if possible.  The game, though, includes chat and I would like to emulate server-push or keep some sort of open socket so the game and chat move along as remote players make their moves.

Is there some way to do this with MooTools 1.3?  Can you point me to any sample code or examples?

Thanks!

Aaron Newton

unread,
Aug 21, 2011, 2:30:11 PM8/21/11
to mootool...@googlegroups.com
You might check out the APE project: 

Martin Hewitt

unread,
Aug 21, 2011, 2:42:52 PM8/21/11
to mootool...@googlegroups.com
Cometd only ships with jQuery and Dojo bindings by default. Our UI is solely MooTools-based, so I have knocked up a wrapper for the generic Cometd function.

It's only been subject to my own scrutiny, and I don't think it implements the full gamut of Cometd methods, but I'm happy to put it somewhere if you feel it may be useful.

Martin

Mike

unread,
Aug 21, 2011, 3:48:47 PM8/21/11
to mootool...@googlegroups.com
Aaron,

thanks, this looks promising... any info on scalability and resources needed?

Mike

Mike Pearl

unread,
Aug 21, 2011, 3:46:47 PM8/21/11
to mootool...@googlegroups.com
If you don't mind, I'd love to play around with it and see if it'd do the trick.

Mike

Aaron Newton

unread,
Aug 21, 2011, 4:32:31 PM8/21/11
to mootool...@googlegroups.com
I haven't used it. I do know that it's been around for a while and seems to be pretty stable.

Martin Hewitt

unread,
Aug 21, 2011, 4:43:20 PM8/21/11
to mootool...@googlegroups.com
Let me chat to the Cometd maintainers and see where they'd want it to go, will be in touch!

Martin

Sent from my iPhone

verylastminute

unread,
Aug 21, 2011, 6:16:35 PM8/21/11
to mootool...@googlegroups.com

piotr_cz

unread,
Aug 22, 2011, 4:55:44 AM8/22/11
to MooTools Users
Hey Mike,
I've been evaluating different solutions for similar task (Comet in
Joomla Platform) for ongoing project and Ape project seems like the
winner at the moment, Socket.io would be on second place. Anyway
you'll need to deploy Python for server-side part (see
http://www.ape-project.org/wiki/index.php/Setup#Requirements_2) or
Node.js for socket.io.
I haven't designed complete integration for Joomla yet (not required
at this point), but most probably it will act only as a wrapper for
the view.

There are some projects that try to bring comet solely using PHP
(www.spoutserver.com) but even that it's possible, I think it won't
ever be so scalable as in Python on Node because of nature of PHP.

On Aug 22, 12:16 am, verylastminute <cgp...@gmail.com> wrote:
> http://socket.io

Mike

unread,
Aug 25, 2011, 11:07:36 AM8/25/11
to mootool...@googlegroups.com
I'm not familiar with Python.  Do you think it's possible to have ape-server or socket.io make calls to php scripts?  Any suggestions on how to do that?

Mike

Martin Hewitt

unread,
Aug 25, 2011, 11:52:04 AM8/25/11
to mootool...@googlegroups.com
Mike,

I've put my MooComet class up on gist: https://gist.github.com/1170999

Let me know if you have any trouble with it - the config object is the same as that documented in the Cometd-javascript documentation.

Martin

verylastminute

unread,
Aug 25, 2011, 3:40:21 PM8/25/11
to mootool...@googlegroups.com
'make calls to php scripts'

You are always going to have the same bottlenecks if you use the same approach + NodeJS. In this case, your PHP scripts will still not provide a higher (event-based) concurrency just because you are using socket.io...In fact, if you are making a request to a PHP script for each request you receive with NodeJS, it can only be just as fast or slower than using plain-old-PHP.
Reply all
Reply to author
Forward
0 new messages