Tutorial

The following tutorial will teach you how write a BUGswarm application from the ground up. It will take you through the steps of configuring your swarm using the Configuration API and participate in it using the Participation API. If you haven't yet, we would advise that you take a quick look at how these APIs are implemented.

The Application

Uh oh! We're out of cookies here at the Bug Labs office and it's up to either John or Andy to go down to the store to buy some more. To decide who has to go, John and Andy have decided to play a game of tag. In order to help them save some energy and avoid disrupting everyone else at work, we've decided to create a virtual game of tag, and what better way to do so than using BUGswarm!

To create this application, we are going to need the following.

To build our application, we are going to use a set of Python-based development tools. If you haven't already, please go ahead and check out the BUGswarm Tools repository from our github page. Be sure to run the init.py script with your Bug Labs account credentials.

./init.py init Username Password

In addition to BUGswarm Tools, we are going to use our JavaScript library for building our monitoring web application. You can find more information about this library on the Libraries page.

But that's enough talking for now. Let's get to it!

Configuration

Before we can begin producing and consuming information on the platform, we must first create resources to do the producing and consuming, a swarm for them to produce and consume in, and then add those resources to the swarm. You can think of the swarm as a chatroom and the resources as participants in that chatroom.

Participation