Monday, June 8, 2009

Ping

I thought I'd give a quick update on how my work on Jogre is going. I have to admit that I am not putting a lot of effort into it (the weather is just too nice outside), but I have made some nice little progress: today, I was able for the first time to play a game of connect 4 through an http based protocol. The previous version of Jogre used sockets, which is a more efficient way to communicate but does not work on App Engine. Thus, I replaced it with a polling-based mechanism that would pool game messages and exchange them about once a second.

Obviously, I am still far from really running the backend on Google App Engine -- there are many things left to address, such as not storing things in the file system, making sure no threads are created, preventing objects from storing anything in memory. I will have to look into them one by one over time. Still, it is good to see that my initial refactorings on the connection-threads actually worked :-). Gives me hope for the rest of the road ahead.

If anyone is interested in the details of the http protocol, let me know and I'll post something. I do not think that it is all that relevant, except for maybe some nice patterns like the use of an Environment interface to make threading and messaging testable. I'll keep dabbling with the code base until something a bit more interesting (like putting games into the datastore) comes up.

0 comments: