browser <---> jaxl <---> bosh <--> jabber server
browser <---> bosh <---> jabber server <---> jaxl
I want to build a website with multi-player turn based games like chess or checkers. I also want to have group chat available on the website. My website will be built using PHP and MySQL on the back end, and jQuery on the UI. After doing research on various messaging techniques I believe that XMPP-MUC should serve as a good base to build the chat portion and the messaging behind the multi-player games. I am looking at Openfire as an XMPP server, and JAXL as the PHP library to provide the XMPP processing, but I really don't know how to go about setting these things up, or even what things I need. I know I need something on the browser side to act as an XMPP client, and I haven't found anything to provide that functionality. I believe I need a way to pass XMPP through HTTP, and I believe that is BOSH, but I cannot find out how that works. I believe that BOSH should somehow connect to the Openfire server, or a connection manager, but I am unsure what place JAXL plays.
So the architecture I envision is something like this:
Openfire Apache
XMPP <<<---------->>> HTML <<<------------------>>> Browser
Server PHP
I am guessing that JAXL sits on Apache, and passes XMPP from the browser to Openfire, and from Openfire back to the browser. I need something on the browser to talk to JAXL, is that through Ajax, or some other process? I am hoping some other process because Ajax is a polling technology, and I am hoping for something that is more on the line of pub/sub. At this point I am just trying to create a proof of concept game of tic-tac-toe. This would be played by two people on different browsers. If I can work out the architecture for this, I can move on to a more substantial game. Right now I have a static page of HTML, css, and javascript to play the game. I want to make it multi-player., and I want to provide an inline chat channel.
This has been fairly disjointed, so I guess the main question before I get to anything else is how do I set up the servers to deal with this? Do I need the Openfire connection manager module? I am guessing no until I have a lot of traffic. Do I need JAXL on my app server (Apache)? What is it's function? Is there a decent plugin to jQuery to serve as the browser client library?