Tuesday 17 June 2008

Get Talking

I've spent most of today so far working on STAR's new messaging system. The reasons for working on a new one is buzz messages have a tendency to disappear into the spam folder on our e-mail account in the best case. In the worst case, some were being dropped completely.

I've put together a simple PHP application that sends messages to the database rather than /dev/null. These are retrieved via. an AJAX page that fits quite nicely into a popup. New messages are polled for roughly every 15 seconds. I say roughly as the next request will not start until the current one is completed.

One point I thought I would make is over the data format used to get data from the server. Due to the regular updates and amounts of data to be passed, I decided to make use of JSON. It carries less overhead than XML for the data being transferred and is quickly parsed by the Javascript through a simple call to eval(). Although not ideal for most situations, it seemed to make sense to me on this simple project.

Anyway, it's integrated and now up and running. However, I don't think I'll be posting a public URL for this one. Security through obscurity and all that. :)

No comments:

Post a Comment