Retrieving Data from the Periscope Supported Backend

Overview

In the previous exercise, you may have already configured measurement probes via the GENI Desktop GUI. Here we are going to show you what happens in UNIS, which is the topology service that actually supports and directs the measurements.

How the Components are Connected

The above diagram shows the components of the GEMINI framework. When a user reserves a slice, along with the slivers on that slice, hosts are created and connections between these hosts are built as well. Next step is to Initialize and Instrumentize these raw resources, which will install the tools that the GEMINI framework uses. BLiPP is the probe agent that is installed at each measurement point. The major task that BLiPP carries out is running various types of probes including ping, iperf, traceroute, etc. A user can either let these agents run a default probe or manually start the probes at selected times.
Here's the link ​https://github.com/periscope-ps/blipp to the BLiPP code repository and here's the wiki page ​https://github.com/GENI-GEMINI/GEMINI/wiki/BLiPP-Documentation where you can investigate more about using BLiPP for your custom probes.

BLiPP Generates Metadata and Data from Measurements

BLiPP runs user measurements via probes, parses the command line output, and once completed BLiPP uploads the result data to the Measurement Store (MS). The MS is running on the Global Node which will act as a collection point for the data generated on the user slice. Due to the fact that there could be many different kinds of measurement data collected at different periods in the experiment, we separate the data into Metadata and Data. The Metadata will describe which particular Measurement Event Type a real data set belongs to and this is stored in UNIS for bookkeeping and for easy retrieval of the desired information. The actual data, will be stored on the Global Node via the Measurement Store on a per user slice basis, this allows us to tie data to a slice instance. The three UNIS objects you need to be familiar with for getting a full picture of your experiment: the measurement, the metadata of the measurement and the data of the metadata.

The Measurement object: A measurement object depicts what probe the user want to use and how that probe will run. For example, probe command line arguments for user preference (e.g. how many times to repeat? and at what interval?).

The Metadata object: Is a handle stored at UNIS to retrieve the actual data on a users Global Node, per slice. Also, this is the key information a user should specify should they need access to the raw data.

The Data object: Is a series of key value pairs in JSON format.

How to Access Data from UNIS and the MS

Before we provide a step-by-step guide to retrieving data, lets go more in depth with these components. UNIS is a topology service that is used to describe a network but underlying this concept is a RESTful API. As you might expect UNIS supports the standard HTTP Verbs: GET, POST, PUT, and DELETE.

if we wanted to query all the nodes on our slice we could: GET unis_host:port/nodes

if we wanted to query one particular node on our slice we could: GET unis_host:port/nodes/:id

Above is a sample server topology that will be used in this example. The GN0 node represents the Global Node and is where the MS runs and where data is collectioned. VM and VM-0 are the Measurement Points where BLiPP executes the probes we supply.

Your command prompt should be similar to "[username@GN0]" for confirmation. There are a few important files to note on this machine.

The file /usr/local/etc/node.info contains information about your slice and what services it's using. This file can be found on any Global Node as it is created during the Instrumentation process.

The file /usr/local/etc/certs/unis-proxy.pem is the key, cert used to query the UNIS API, which is also created during the Instrumentation process.

When making a request to the UNIS API you will need to supply your key, cert and also the UUID of your slice so that you only see your subsection of UNIS. The slice UUID can be found in the "node.info" file with the following format, "auth_uuid=fc028e53-cfbf-463d-9bf3-d26c35333b10".

query all the nodes on your slice: GET /nodes?properties.geni.slice_uuid=fc028e53-cfbf-463d-9bf3-d26c35333b10

If you would like to try a periscope tool that handles your key, cert and slice uuid for you, then you will need to install a dependency on the Global Node. For this example my Global Node is Fedora 15 but if you're using another image you can see more installation instructions here ​https://github.com/periscope-ps/periscope/tree/master/peri-js.

Test Dependencies

Clone Periscope Tool

Install Peri-JS Dependencies

$ sudo npm install
$ sudo npm install -g bower
$ bower install

Start Peri-JS

$ sudo npm start

Upon starting this tool you will see the UNIS instance you are connecting to, the MS store instance, and various information about the Global Node. The Peri-JS tool provides a RESTful API that represents your subsection of UNIS. You can query this tool using the browser or command line.

Either way, when you request this URL you will see a list of routes you can query. These routes accept the same HTTP verbs as the UNIS and MS API's but Peri-JS only displays the data for your slice.

Routes

GET /api/slice
GET /api/nodes
GET /api/nodes/:id
GET /api/services
GET /api/services/:id
GET /api/measurements
GET /api/measurements/:id
POST /api/measurements/:id
PUT /api/measurements/:id
DELETE /api/measurements/:id
GET /api/data/:id
GET /api/links
GET /api/links/:id
GET /api/ports
GET /api/ports/:id
GET /api/domains
GET /api/domains/:id

Once some measurements have been posted and executed by BLiPP, metadata will be generated. Every measurement object has a list of event types associated with it and you will use this event type of find the data you desire. For example, if you were to schedule a throughput test you could expect an event type for bandwidth. BLiPP executes a few measurement probes directly after Instrumentation, such as cpu, mem, and net.

Now you will see all your data in JSON format. To reiterate, each metadata object represents an event type for a particular measurement. Navigating to a particular event type/metadata object by the metadata ID will get the single metadata object. Using that metadata ID, you can query the data route to get the data associated with that event type.