Prerequisites for Wiera:

  • Unix-like environment (Wiera has been built on Ubuntu 14 and 16)
  • git
  • Python 2.7.6
  • Maven (we recommend version 3.3.9)
  • Java 7
  • Thrift v.0.10.0 (for Python and Java)
  • Redis

Download

In order to use Wiera, you first need to download Wiera souce code.

Download Wiera from Github

  • git clone https://github.com/dcsg-umn/wiera.git

Building

Wiera is comprised with two main components 1) Wiera Central and 2) Local Server (Tiera).

Building Wiera Central

Wiera Central is written in Python and can be executed without building. But you will need to install python packages before you execute it.

  • sudo apt install python-pip
  • sudo pip install thrift
  • sudo pip install pygeoip
  • sudo pip install pulp

Building Local Server

Local Server is built using Apache Maven. To build Wiera and its examples, run:

  • cd wieralocalserver
  • mvn clean compile package dependency:copy-dependencies

How to run

Wiera Central

Wiera Central can be execeuted as below.

  • cd wieracentral
  • python wiera.py

Local Server

Local Server can be executed as below. (Note, Local Server should run in multiple DCs as specified in policies)

  • cd wieralocalserver
  • ./run_server -wWieraIP [-pWieraPort]

Test Client

To deploy wiera local instances on mulitple DCs, you need to send a policy to Wiera Central in your application. You can test Wiera with Test Client that provides a simple command UI. The client simply uses the API exposed by Wiera and Local instances as your application will do. For testing purpose, you can use policy example that can be found here. Test Client can be executed as below (Note, low_latency policy example will be used in this example).

  • cd wieralocalserver
  • ./run_client -wWieraIP -pWieraPort -fpolicy_example/low_latency.json

Supported Commands by Test Client

Command (Abbreviation) Parameters Exaplanation Example
start (s) None Start (deploy) Wiera instance as specified in the policy given :> s
stop (st) String: Wiera ID Stop Wiera instance :> st low_latency
showlist (list) None Show current available local instnace list in current connected Wiera instance :> gil
connect (c) String: HostName Connect to the instance to send Get/Put requests. :> c aws-us-east
getinstnacelist (gil) String: Wiera ID Retrieve (and update) instance list in Wiera instance with given ID :> gil low_latency
set String: Key, String: Value Put object into a connected local instance :> set test_key test_value
get String: Key, [Integer: version] Gut object (specific version if specified) from a connected local instance :> get test_key [1]
getvl (gv) String: Key Get version list of key. :> getvl test_key