I recently stumbled upon a paper by Károly Farkas, a professor from Budapest, Hungary who organized the 2014 PerCom conference in Budapest:
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:
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:
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.