Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm starting a new game website. This is a project to help me learn additional technologies. My background is very much Microsoft and Apple technologies / languages / IDEs.

This project I would like to use some Google technologies. The game website will be a simple site; html5 game board; muliplayer; for the sake of simplifying my example let's just say it is a poker game. Everyone sits at the table and the game begins; it is turn based etc.

I've been thinking that the best route to go would be html5 w/ websocket communication back to the server. I'm also very interested in using GWT. So I figured a website built using GWT + HTML5 Gameboard would be the client side.

Now for the server side; I did some research and I found a bunch of things like Jetty, jWebSockets, Atmosphere; etc. My thinking at the moment is that the server side would be hosted on Jetty (is Atmosphere worth using for server encapsulation?) and would basically be a WebSocket server.

Does all this stuff make sense? Am I completely off base here?
Are there examples of this out there to help me along the way? I'm also interested in gaining information about how to host something like this? Any services out there that would host both the socket server and the website on one box? Is this the right thing to do?

Anyway definitely looking for experienced knowledge on this topic to help my studies into this new area (google technologies).

share|improve this question

migrated from Jul 20 '11 at 7:57

This question came from our site for professional and enthusiast programmers.

closed as not a real question by Mark Trapp Jul 20 '11 at 18:09

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

You have the option of not using Java ;) – Raynos Jul 20 '11 at 16:14

This question is rather broad for stackoverflow terms and will probably be closed. But you might lookup the anwsers to this quora question on how Angry Birds for Chrome was build: See It contains some links to usefull information on HTML5/GWT Game Building.

share|improve this answer

All you are saying (GWT/html5/websockets with Jetty) makes perfect sense.

GWT/html5/canvas is a great solution for rich web applications:,

Also, if you are targeting high-scalability and do not want to pay upfront for servers and admins than you might want to look at cloud solutions that give you instant scalability. Most notably Google AppEngine with Channel API (as a replacement for WebSockets). There is a GWT wrapper for Channel API.

share|improve this answer

I would recommend Raphael JavaScript library for the graphics, it uses SVG if possible or VML in older IE browsers and is very easy to use for this kind of game graphics.

You are right that HTML5 WebSockets are good for communication.

I would recommend to use Play Framework for the server, it is easy to use and have web sockets built in, with high performance.

share|improve this answer
paper.js is a solid alternative to raphael. – Raynos Jul 20 '11 at 16:14
@Raynos: But paper.js doesn't seem to support IE 8 and below. – Jonas Jul 20 '11 at 16:18
just use the IE canvas shim. There's no need for the canvas shim to be included in the paperjs codebase. – Raynos Jul 20 '11 at 16:21

If you want lots of realtime / asynchronous communication it's well worth looking at Netty - this would probably be my first choice if I was building a high throughput game server and wanted detailed control over the protocols used.

I think Netty is a bit lower-level than jWebSockets (which might be easier if you are purely interested in JSON-based communications).

share|improve this answer