October 31, 2006

Hanging HTTP Connections

Gpokr was running for about 3 months before I realized that IE’s 2 connection limit per hostname and a hanging HTTP connection is a risky situation.A hanging connection is when the Ajax application makes a request for data and the server waits with an open connection until data is avaialble. When data is available it is returned immediatly simulating an instant notification from the server.

This is why gpokr seems to always be moving. Cards are dealth, bets are placed, and chat happens seemingly instantly.

It seems like a hack but there are not many options to out there that give Ajax applications the ability to receive data asynchronously from the server. Yes asynchronous is part of the Ajax achronym but this is just asynchronously getting data from the server. For an event driven application like poker the client needs to get data only when it is available. Of course it could check the server every few seconds but this can be a massive overhead. A hanging connection lets the client idle until there is something to do.

The problem is that it takes up a connection. I’m ok with this on the server but the browser limits 2 connections per hostname. Thats one to hang for events, and another to send a chat message, but what if a picture needs to be downloaded at the same time. It needs to wait. Or, in the case with gpokr, what if one connection is hanging for events, the other is downloading a large image, and you only have three seconds left to make a call on pocket Aces or you’ll be folded by the server. The server folds you and you get very mad.

It doesn’t seem like this issue is talked about much within Ajax development circles. Although I ran into this article that measures the use of multiple hostnames to improve performance of a web page - essentially making more connections available to load the page in parallel.

Now, for gpokr, I use one hostname for hanging calls and another for HTTP objects so that the hanging call never slows down the sites action.

Filed under: ajax, gpokr
October 30, 2006

A No Click Interface?

How long can you go without clicking on a website interface is the question asked by this user interface experiment posted today on Ajaxian. The website experiments with building a clickless interface and it pulls it off fairly well. It doesn’t take long to figure out how to navigate menus pages with only movements of your mouse. Thier idea comes from the fear of a mouse with ever an increasing number of buttons. They have clickless experiments and and games to show that mousless interfaces are functional and even suggest a humorous product that would help ween you away from clicking a mouse:

mouse.png

The site is fun although its less of an academic experiment and more of an art exibit trying to make a point. It looks like click statistics are measure possibly to come to some type of conclusion but the experiment is presented almost like a game: see how long you can go without clicking. Of course, when there is a button that your told not to push we tend to have an urge out of curiousity and defiance to push it to see what happens.

My mouse has four buttons and a scroll wheel that clicks like a button. I’ve actually have grown accustomed to using all of them but think that any more would be excessive.

Interfaces should always be simplified, but I doubt the definitive action of a click can be fully replaced by mouse movements. However, after playing with this site I can see how interfaces could be simplified by using less mouse clicking.

Filed under: user experience, UI
October 16, 2006

New Podcast About GWT

I had the opportunity to join in on a round table discussion podcast with Bruce Johnson, technical lead of the GWT project at Google, and Robert Hanson, keeper of the GWT widget library, hosted by Java Posse.

GWT Round Table

Filed under: ajax, java, gwt, google web toolkit, gpokr