Past couple of weeks have seen me getting friendly with HTML5 web-sockets and a rewrite of some core EMDR market based features. The result is that I’ve completely rewritten the method that mineral index price charts on the home page get updated. Previously, the delay between price data being accepted by the site’s consumer, getting bulk inserted into the database and displayed into the front page could take as much as 4 or 5 minutes. Ok that’s not a massive amount of time but I find that nothing is as good as hot off the press live as you can get it market data. The consumer has been tweaked to broadcast mineral prices at the 4 main racial trade stations to any connected client sockets the moment they arrive. The previous ajax pod update method is still available as a fall back for non web-socket browsers such as the IGB and some tablet browsers.

This is not by any means the end of it. I’m currently developing my own customized web-socket framework that will be incorporated into other areas of the site. I can see for instance a massive advantage in the project section where an enormous amount of information and calculations need to be carried out before the final data set is presented to the client as a JSON object. A webs-socket will enable smaller chunks of data to be passed on an event driven model as and when you request. With the correct authorization security between socket and session, any API updates could be presented the moment it’s completed and this is just the start.

I’m also planning a cache model to store some price information using mongo. There is a lot of price lookups on the site so to be able to cache the most frequently requested items (such as minerals) will save further work on the mysql database resulting in a faster responding site.

If you want to see the feed in action simply open the home page and wait for the magic to happen. It won’t take long. Registered users can add the other 3 main trade hubs to your homepage dashboard as a configurable pod so you can watch the whole market. This weekend I’ll be working on a market information page to properly display the current market, updated in real time with graphs, useful info etc.