Respawn is a distributed time-series datastore which enables multi-resolution browsing and querying in More information about Respawn and its performance can be found in the following paper: Respawn: A Distributed Multi-Resolution Time-Series Datastore.


Respawn requires the SleekXMPP Python library to be installed:

wget -O
cd fritzy-SleekXMPP
sudo python install

Running Respawn with a Virtual Sensor

This section explains how to start a Respawn instance and have it store a time-series stream from a virtual sensor. The code necessary for building and running Respawn can be found in the mio repository under the ~/mio/services/datastore directory. To deploy Respawn in a distributed storage configuration, simply repeat these instructions on multiple machines and use a shared XMPP server.

Building Respawn

Note it may be necessary to change your platform from linux-gcc in the last line of

cd ~/mio/services/datastore/bt_datastore
cd ../

Running Respawn

Respawn requires access to an account on an XMPP server. Edit (uncomment the third line and add your XMPP login information). Then start the storage daemon.


Running Virtual Sensor

Create an event node with name fakenode and subscribe to it.

cd ~/mio/tools/py-tools/
./ -j [USER]@[HOST] -p [PASSWORD] create fakenode
./ -j [USER]@[HOST] -p [PASSWORD] subscribe fakenode

Start the dummy publisher, which will publish simulated sensor values to fakenode.

./ [USER]@[HOST] -p [PASSWORD] -m data fakenode

Browsing Data

Using a web browser (Firefox recommended for Respawn), navigate to port 4720 on the machine running Respawn and click Go button. (For example: http://localhost:4720)

Querying Respawn Meta-Information

Distributed storage in Respawn makes full use of the flexibility offered by the XMPP event node model. Multiple Respawn daemons, running on one or more machines are managed through the storage items of event nodes. The storage items can be queried directly for the addresses of active Respawn instances.

cd ~/mio/tools/py-tools/
./ -j [USER]@[HOST] -p [PASSWORD] get fakenode storage
<item id="storage">
      <address link="http://localhost:4720"/>
      <address link=""/>

The addresses in the storage item can be used to retrieve datastore meta-information in each instance's info.json file.

curl http://localhost:4720/info.json

Querying Data

Using channel bounds as a guide, data can be retrieved from a channel by requesting data tiles. A tile is uniquely addressed by the tuple (level, offset). The two values can be calculated from a desired Unix timestamp and a desired down-sampling period (in seconds).

level = log2(period)
offset = timestamp / (512 * period)

The level and offset must be integers. To retrieve the tile starting at timestamp=1415823360 and down-sampling-period=16 seconds, for example, one must request the tile with level=4 and offset=172830. This request is shown below.

curl http://localhost:4720/tiles/1/fakenode.sine/4.172830.json

dummynode.png (65.2 KB) Max Buevich, 11/12/2014 09:48 PM