Re: Need help setting up environment

66 views
Skip to first unread message

Abhinav Singh

unread,
Dec 28, 2012, 2:30:11 AM12/28/12
to ja...@googlegroups.com
Hi Mark,

Kindly make use of strophejs or other similar javascript xmpp library for connecting with your bosh servers directly. You can also make use of Jaxl as a middleware: 
browser <---> jaxl <---> bosh <--> jabber server
however I will not recommend this for production (specially high traffic) applications.

Question now in your head might be "then where is Jaxl going to play it's part". Well strophejs will only help in interaction of your browser clients with bosh connection manager, but you still need a place to implement your custom business logic i.e. a component which can implement your gaming (business) logic and stuff. Thats where Jaxl library will help you. So your flow might look like:
browser <---> bosh <---> jabber server <---> jaxl

--
Abhinav

On Wednesday, December 12, 2012 9:16:05 AM UTC+5:30, Mark Murphy wrote:
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?
Reply all
Reply to author
Forward
0 new messages