Sign in to follow this  

REST and games don't mix

This topic is 2549 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

For those interested, here's a blog entry musing about why web-style REST operations don't work well in a games-centric world. For many games programmers, this is obvious, but for many web programmers, this is apparently news.

REST and games don't mix


Share this post


Link to post
Share on other sites
i dont think the chess example makes too much sense. all you need to send along is the current board position, whether you have castled, and whether pawns have en passented. There is no "wait for response", it is part of the response back when you post the message. When you post a web form, you reload a page. You could easily create a RESTFUL chess game. the idea is simply that the local state is not stored on on server instance, so that the request has enough information to be transfered to another server, or balanced in anyway.

The chess analogy up top was assuming that the game doesn't persist in anyway. If it is being stored in a database, you don't need any game state being sent along (you could as you say, just send deltas). This would be just updating an object in the database which is still RESTful.

Share this post


Link to post
Share on other sites
heh it's funny that you mention this. I've been using Web Sockets for a while waiting for binary protocols to get added (using a 7-bit binary encoding in UTF-8 isn't the same :P). Also I will point out that you can drive how the web works fairly easily. I've had the standard changed in the past by my feedback and talking to the editors and implementers is fairly trivial. Hixie (Ian) used to edit the Web Socket protocol standard, but a new guy controls it now (Dave? Doug? Forgot his name). He's in the IRC channel (irc.w3.org 6665) along with all of the other editors if you want to push change. (I'm currently waiting on some canvas issues I submitted five days ago to get added into the standard >_>)

I completely agree with your article though. Even with the most optimal comet server I still had a little under 100 bytes of overhead per "packet" which ate up a lot of bandwidth. There's a huge difference using Web Sockets. It was also much less code to create the standard compliant socket server.

Share this post


Link to post
Share on other sites

This topic is 2549 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this