historical-datastore

command module
v1.0.0-beta.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2020 License: Apache-2.0 Imports: 42 Imported by: 0

README

Historical Datastore

GoDoc Docker Pulls GitHub tag (latest pre-release) Docker Build

LinkSmart Historical Datastore is a modular service for time-series data storage. It is designed to store timeseries data on low powered devices and single board computers. It uses Sensor Measurement Lists (SenML) as the data format for storage and retrieval. Metadata related to the series is stored in Historical Datastore's registry.

Running the binary

The binaries can be found in the release.

Use -conf flag to set the config file path. If not set, ./conf/historical-datastore.json will be used.

./historical-datastore -conf historical-datastore.json
Docker

amd64 images are built and available on Dockerhub. To run the latest:

docker run -p 8085:8085  linksmart/hds

Measurements and the registry data is stored by default in /data directory of the container. To make it persistent across multiple docker runs, the container directory /data must be mounted to a host directory (e.g. /data/hds in the host) as shown below:

docker run -p 8085:8085 -v /data/hds:/data linksmart/hds

Images for other architectures (e.g. arm, arm64) can be build locally by running:

git clone https://github.com/linksmart/historical-datastore.git
cd historical-datastore
docker build -t linksmart/hds .
Demo mode

To run Historical Datastore in demo mode (with continuously growing dummy senml data)

docker run -p 8085:8085  linksmart/hds -demo 

Development

The dependencies of this package are managed by Go Modules.

Code structure

The code consists of four packages locate at:

  • / - implementation of a standalone service providing full API.
  • /registry - implementation of Registry API
  • /data - implementation of Data API
Compile from source
git clone https://github.com/linksmart/historical-datastore.git
cd historical-datastore
go build -mod=vendor -o historical-datastore

Contributing

Contributions are welcome.

Please fork, make your changes, and submit a pull request. For major changes, please open an issue first and discuss it with the other authors.

Documentation

Overview

Copyright 2016 Fraunhofer Institute for Applied Information Technology FIT

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
Package data implements Data API Package senmltest implements senml testing utilities
Package data implements Data API Package senmltest implements senml testing utilities
The initial code taken from : @Shaneutt.
The initial code taken from : @Shaneutt.
protobuf
go
Package registry implements TimeSeriesList API
Package registry implements TimeSeriesList API

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL