The idea with this project is to learn how to achieve the effect of real time data appearing on the web browser without the need of refresh the web browser. How does it achieved? with web sockets technology, spring framework and rabbitmq broker message with stomp support and a bit of html5 and jquery.
The example project is based on knowing where are the buses of Dublin city in that moment. Luckily Dublin city has every bus connected to internet in order every customer can connect to internet during the voyage and that bus is connected to a system so that its position is always sent to the system. That system is available through a REST api provided by Dublin city, so, where is the trick? the trick is you need to ask periodically to the system about new data, enqueue the data to the rabbitmq-stomp broker message and with a bit of jquery code the effect is done. I think the code is self explainable, so you can download it.
Enjoy!
https://github.com/alonsoir/dublin-bus-spring-websockets
http://en.wikipedia.org/wiki/WebSocket
http://en.wikipedia.org/wiki/Spring_Framework
http://www.rabbitmq.com/web-stomp.html
Next project is related with the location of the International space station, stay tunned