Skip to content

dergraf/whisbert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Whisbert - A BERT-RPC Interface for Round Robin DB Whisper

Whisbert uses the Ernie BERT-RPC Server together with the python-ernie connector.

Installation

In order to use Whisbert you need to install Ernie first. Have a look at the Ernie Project for the installation requirements and instructions. Once Ernie is installed, you are able to install Whisbert:

You can either clone this repository and installing the dependencies, eventlet, python-bert, and python-ernie by yourself, or use pip which will fetch and install all the dependencies.

pip install git+git://github.com/dergraf/whisbert.git

This will also install example.ernie.config which is needed to run Ernie:

ernie -c /path/to/example.ernie.config

Exported BERT Remote Procedure Calls (RPC)

###hisbert.create(binary(), list(tuple(int(), int())), bool(), float(), atom()) whisbert.create(path, retentions, overwrite=False, xFilesFactor=0.5, aggregationMethod='average')

####path: Absolute Path to the whisper file being created. One whisper file contains all the metrics and aggregates them according to the specified retentions.

####retentions List of retention tuples (timePerPoint, timeToStore). In order to store some metric with minutely precision for 30 days, then at 15 minute precision for 10 years, we need to specify the following retention list: [(60,43200), (900, 350400)]

####overwrite=False Specifies if we are allowed to overwrite an existing whisper file.

####xFilesFactor=0.5 Specifies the fraction of data points in a propagation interval that must have known values for a propagation to occur.

####aggregationMethod='average' Specifies the function to use when propagating data. Takes either 'average', 'sum', 'last', 'max', or 'min'.

###whisbert.update(binary(), list(tuple(time(), int() | float()))) whisbert.update(path, datapoints)

####path: same as above

####datapoints List of datapoint tuples (timestamp, value)

###whisbert.fetch(binary(), time(), time()) whisbert.fetch(query, fromTime, untilTime=Now)

####query: Specifies the path to the whisper file. The difference to the path parameter seen above , the query may contain wildcards resulting in more than one whisper file. These files are concurrently fetched (eventlet) and the results are cumulated.

####fromTime: Starttime for the range-query

####untilTime: Endtime for the range-query, defaults to Now

Advanced Topics

Ernie does not support persistent connections at the moment, which can really slow down the whole system if you have many update and fetch requests for Whisbert. I provide a fork of Ernie that should solve this problem.

About

A BERT-RPC Interface for the Round Robin DB Whisper. Whisbert uses the Ernie BERT-RPC Server together with the python-ernie connector.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages