Crowdsourced Live Monitoring of Public Transport with XMPP

I recently stumbled upon a paper by Károly Farkas, a professor from Budapest, Hungary who organized the 2014 PerCom conference in Budapest:

Farkas, Karoly, Nagy, Adam Zsolt, Tomas, Timon, Szabo, Robert: Participatory sensing based real-time public transport information service. In: Pervasive Computing and Communications Workshops (PERCOM Workshops), 2014 IEEE International Conference on, pp. 141–144, IEEE 2014.

They built up a system and an Android app to monitor buses and trams from the public transport system of Budapest. They used XMPP PubSub to realize the reporting and monitoring. A pubsub tree is built which consists of two subtrees: routes and stops. The leaf nodes are the trips which are referenced both from the routes tree as well as the stops tree.

The interesting thing here is that it is possible to assign a leaf node to more than one collection node in XMPP PubSub. This is defined as the optional “pubsub#multi-collections” feature in XEP-0248. This opens up a quite interesting number of use cases especially for collecting sensor information. A sensor normally has multiple fields of meta data where it should be linked from. Thus a matrix-like browsing for sensors is possible.

The general model of using XMPP PubSub in this way is described in an earlier paper by the authors:

Szabo, Robert L, Farkas, Karoly: A Publish-Subscribe Scheme Based Open Architecture for Crowd-Sourcing. In: Advances in Communication Networking, pp. 287–291, Springer, 2013.

The main contribution here is to use a Service Provider entity which collects raw data sent to the PubSub Event Service and adds extra value to it. The value-added information is then published on a topical tree structure using collection nodes as described above.

They did an evaluation in this follow-up paper:

Farkas, Karoly, Szabo, Robert, Wiandt, Bern'at: Performance evaluation of a live, crowdsensing based transit feed service architecture. In: Intelligent Engineering Systems (INES), 2014 18th International Conference on, pp. 251–256, IEEE 2014.

They used ejabberd and a custom-built traffic emulator. They were able to distribute about 150,000 messages per minute which corresponds to about 15,000 simultaneous on-line users with a commodity server.

It would be quite interesting to see the actual protocol they used for the participatory sensing. An application like this could easily be transferred to other cities and shows the potential of XMPP for participatory sensing.