ajax server design question

J

Jimmy

I am going to write a multi-player board game (I've actually already
written one version, with a java server and VB client). I'd like the
players to be able to play over the web, through an ajax client. I
don't know much about ajax yet. It appears that the XMLHttpRequest (or
whatever it is called) can only generate GET and POST requests through
the http protocol. In that case, I am going to have to either
a) write a server that understands http (maybe not too hard with java's
built-in classes)
or
b) use servlets w/tomcat or some other framework that will handle the
http for me and have the servlet keep a socket connection to the game
server, which speaks its own protocol.

Which should I go for? Also, I am concerned about losing some power by
going to http - like the server is not able to initiate contact with
the client (to notify it of moves made by the other player), and there
is no notification if the client shuts down their window (is that
true?). Is there any better way to accomplish these things than just
having the clients poll the server every 500ms or so?

Thanks for any advice.
 
K

khakman

Re: Keeping alive the HTTP connection, see http://www.pushlets.com.
Developers have used this and similar approaches in concert with
TIBCO's AJAX framework called TIBCO General Interface to create a
persistent HTTP connection.

Kevin Hakman,
TIBCO
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,610
Members
45,255
Latest member
TopCryptoTwitterChannels

Latest Threads

Top