Skip to content

Nimbits Server is a web portal and Rest API (json+hal) designed to store and process time and geo stamp data, filter incoming data and trigger events based on rules. It stores data in a way that makes it easy to retrieve chucks of data sets using date ranges or gps coordinates.

cloudstrifexx/com.nimbits

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Wiki | Community Forum | Bug Report

please be aware of a recent breaking change when uprading to 3.9.55 and above. We consolidated the multiple unique keys for entities into one database id (id, uuid, key are now just id). New installs of nimbits server will setup a new empty database.

About

nimbits server is a web portal and API designed to store and process time and location stamped data, filter incoming data and trigger events based on rules. It stores data in a way that makes it fast and easy to retrieve chunks of data sets using date ranges or gps coordinates.

Further, it is designed to run on small java embedded devices like a RaspberryPi, J2EE servers like Apache Tomcat and finally on clouds like Google App Engine and Amazon EC2. This lets you build a topgraphy of servers all connected to each other. Small instances can filter noise from sensors and relay data up to larger servers for display on a website, for example.

nimbits.io is a java client that wraps the api to make it easy to automate the server and log data from a java or android app. Part of the maven central repository and JCenter, it's easy to import it into your projects.

Basic Concept

Nimbits is structured as a tree of entities. All entities have a name, unique id and a parent. The top level entity is you. Entities are data points, rule triggers, calculations, alerts or anything else. Data Points are buckets that contain many values. Values are structured like this:

points

{
   long timestamp: unix time in ms
   double value: a number value, current sensor reading, or a tempurature etc
   latitude, longitude: gps coords
   String text data: any string, JSON or XML payloads for example.
   String meta data: another handy string field for filtering data

}

All fields are optional except the timestamp. You record many Values into a Data Point where they are stored. Based on rules you configure, incoming values may be ignored (such as noise from a sensor), trigger calculations, relayed to other servers etc.

With the API, you POST value objects that can trigger events like high alters, or run a rule like a webhook based on the incoming data. You can then perform GET requests to download a series of data based on filter criteria such as a date range.

Project Structure

  • nimbits_core: core project containing the guts of nimbits server
  • nimbits_server: an implementation of nimbits_core for J2EE servers like jetty or tomcat with an embedded H2 Database
  • nimbits_gae: an implementation of nimbits_core for Google App Engine
  • nimbits_io: the java client and wrapper for the API and the object model
  • samples - various samples that use nimbits io or other clients to interact with the server

nimbits server

Understanding the API

The API is a restful web service that uses HAL standards. This means that API responses include self links and navigatable links that allow you to browse the api as if it was a web site. One of the best ways to understand the api is to:

The response will be your user entity and you'll be viewing the top level of your entity tree.

You can install plugins in your browser for formatting json and adding authentication headers.

The API uses basic authentication, so you should also use a browser plugin to add a header like this:

Authorization: Basic username:password

or you can base64 encode your user name and password for added security:

Authorization: Basic dm9yZGVsOnZvcmRlbA==

You can then browse the api and see how every object can be represented by it's unique ID:

http://localhost:8080/service/v3/rest/uuid

You can PUT updated to the object, post data values and get a series of data

For more on what you can do with the API, reference the WIKI

Install debian linux (ubuntu etc)

Add the debian repository to your sources.list file

echo "deb https://dl.bintray.com/bsautner/nimbits.deb wheezy main" | sudo tee -a /etc/apt/sources.list

then run

apt-get update
apt-get install nimbits

Your server will be running on localhost:8080 and you can configure it like any jetty based server in /opt/nimbits

please be sure to check this readme before upgraded to be notified of breaking changes

Install from source

Clone this repository and compule using maven

mvn clean package

copy the resulting war file in nimbits_server/target/nimbits_server.war to the webapps directory of a jetty or tomcat web server or any other J2EE server such as jboss. Rename the file to root.war if you want to load it in the root context.

nimbits.io client

The nimbits.io client library is a wrapper for the nimbits server API and provides deep automation of the server and methods for reading and writing data

You can import the library into your java or android project from the jcenter public repository.

Browse bintray Repository

Maven

<dependency>
  <groupId>com.nimbits</groupId>
  <artifactId>nimbits_io</artifactId>
  <version>3.9.56</version>
  <type>pom</type>
</dependency>

Gradle

compile 'com.nimbits:nimbits_io:3.9.56'

Licence

Copyright 2016 Benjamin Sautner

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.

About

Nimbits Server is a web portal and Rest API (json+hal) designed to store and process time and geo stamp data, filter incoming data and trigger events based on rules. It stores data in a way that makes it easy to retrieve chucks of data sets using date ranges or gps coordinates.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 55.4%
  • CSS 27.9%
  • JavaScript 11.1%
  • HTML 3.0%
  • Shell 2.6%