Giter Club home page Giter Club logo

zestdb's Introduction

ZestDB

For further details please visit here.

zestdb's People

Contributors

jptmoore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zestdb's Issues

Restrict data types allowed in a time-series post

Currently, any JSON can be associated with a timestamp.

I think it makes more sense to restrict to integer and floats as this will allow for more efficient data handling.

Not sure if it makes sense to have a timestamp per data point or allow multiple data points to be associated with a timestamp eg.

[ (1511254543330, 1), (1511254543330, 2), (1511254543330, 3) ]

vs

1511254543330 => [1, 2, 3]

UTF8 in json data

When receiving data from twitter utf8 chars are often present in the JSON this cause the store to return a bad request and the data is not saved.

see https://pastebin.com/BLxMMMk2

The above is an example of one tweet that is successfully saved and one that is rejected by the store.

New KV API needs a list keys

The new KV API needs an endpoint to list all the keys available under a datasource.

/<DsId>/list or something similar would be very useful.

Storage performance enhancements

Currently all data associated with a datasource are written to the same path within the git file store. This can be further divided by another level of key (see #9) but could also internally be divided through time-based buckets/bins to further restrict the amount of data to one path. Needs investigating in terms of performance on a pi3.

Bulk write of time series data

Add support for writing an array of values in a single POST.

This would require a timestamp to be included as part of an individual datapoint e.g. {"timestamp": 11111111, "value": 42}. Currently we support timestamps being defined for a POST via the URI which works for single value POSTs.

Server config file

Currently the server is configured from command line args but this does not scale well as the options increase. Should replace with a configuration file of some standard format.

TimeStamp resolution and fast writes

It is possible to write to the store faster than the smallest resolution of the timestamp in milliseconds.

When this happens the data return by latest, earliest API calls can be out of order causing tests to fail.

Query language

The current API is path based and only operates on a single stream of time series data. This API does not scale well or support joining together and carrying out operations on data from multiple time series streams. I useful addition would be a simple query language to give this type of flexibility.

Supporting out-of-order writing

The current backend log-based storage is suited to in-order time-series writes. Do we need to support out-of-order time-series writes?

Start up time - with data

Once a store has had a reasonable amount of data written to it, there is a delay at startup.

This is fine but calls to the API during this time appear to succeed but return not data.

I'll try and reproduce out of databox so we can test this, and to convince myself that this is whats happening.

I'll update this issue with findings later.

Add server state statistics to hypercat

The hypercat can be used to contain more information on the state of the server. Currently it is just used to log which data sources exist. It could contain more information such as the number of records in the store, read/write access count, details on current observers, uptime etc.

Geotagging

At the moment you can tag a time series value but it is restricted to name and string value. It would be good to extend this to allow some kind of geotagging to then allow data points to be queried on location.

Time series ids

It would be useful to list what time series ids exist in a similar way to listing the keys within the key value store.

Installation on Raspbian OS

ZestDB has a docker build for HypriotOS. Since Raspbian(the official OS) is currently supporting docker, is there any chance to have a docker build for it?

bad requests for/ts sometimes do not respond

For example

A GET request for /ts/foo instead of /ts/foo/latest will hang clients as will /ts/[key]/[any unsupoted string]

To repeat:

docker run -p 5555:5555 -p 5556:5556 -d --name zest --rm jptmoore/zest /app/zest/server.exe --secret-key-file example-server-key --enable-logging

run --network host -it jptmoore/zest /app/zest/client.exe --server-key 'vl6wu0A@XP?}Or/&BR#LSxn>A+}L)p44/W[wXL3<' --path '/ts/foo' --payload '{"name":"dave", "age":30}' --mode post

docker run --network host -it jptmoore/zest /app/zest/client.exe --server-key 'vl6wu0A@XP?}Or/&BR#LSxn>A+}L)p44/W[wXL3<' --path '/ts/foo' --mode get

API extention /ts/[id]/earliest

We have /ts/[id]/latest got get the latest data

/ts/[id]/earliest would be handy for apps so that they know how much historical data is available.

New KV API Observe all keys

Currently, the observe endpoint will allow you to watch for changes on a single key /observe/<DsId>/<keyName>.

It would be useful to be able to watch for changes on any key, using something like this:

/observe/<DsId>

It should send

{"key":"<name of key>","value":"<data stored at key>"}

Move to Reason 3

Need to reformat syntax for Reason 3 (probably in a new branch)

Add extra key level

Both the KV and TS store could use an extra key to allow collections of data.

e.g. post to /ts/[datasource]/[key] => /ts/lightbulb/lounge

API enhancement: support a passthrough store type

This store type allows drivers to publish data without having it written to disk.

It's useful for larger data sources like IP cameras or high-frequency data.

Drivers can only write to the endpoint. (but no data is saved)

Apps can only observe the endpoint to get notification of new data.

Using Aggregation on an empty data source crashes the server

Calls to /ts//last/5/min for example before a driver has written any data will cause the following crash:

server.exe: main: report_error:Opps: (Invalid_argument "index out of bounds")Raised at file "format.ml" (inlined), line 239, characters 35-52
server.exe: main: Called from file "format.ml", line 465, characters 8-33
server.exe: main: Called from file "format.ml", line 480, characters 6-24
server.exe: main:
server.exe: main: report_error:Opps: ZMQ.ZMQ_exception(0, "Operation cannot be accomplished in current state")Raised at file "map.ml", line 122, characters 10-25
server.exe: main: Called from file "src0/sexp_conv.ml", line 149, characters 10-37
server.exe: main:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.