About web sockets and how to use it in order to get real time data

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

https://www.rabbitmq.com

http://www.rabbitmq.com/web-stomp.html

 

Next project is related with the location of the International space station, stay tunned

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s