基于Java的传感器数据收集库 [英] Java based library for sensor data collection

查看:502
本文介绍了基于Java的传感器数据收集库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个适用于以通用方式收集实时传感器数据流的可嵌入Java库。我计划使用它来开发一个集线器应用程序,用于报告在基于JVM的服务器上运行的多个不同的传感器流(也将使用Clojure)。



它需要的关键事项:




  • 各种常见传感器类型/ API的接口。我很高兴能够自己构建我需要的东西,但是如果有一些标准的东西是开箱即用的话会很好。

  • 适合软实时使用,即相当低的延迟并且开销很低。

  • 能够在运行时监控和管理流,收集统计信息等。

  • 在合理宽松的许可下开源,以便我可以将其与其他代码(Apache,EPL,BSD,LGPL都很好)

  • 一个相当活跃的社区/开发者生态系统



有什么东西适合你可以推荐的这个档案吗?

解决方案

1。循环数据库(:


RRD4J是用于时间
系列数据的高性能数据记录和绘图系统,在Java中实现RRDTool的功能。它遵循
大部分相同的逻辑,并使用相同的数据源,存档类型
和RRDTool的定义。 Apache 2.0许可下的开源。


更新



忘记提及有Clojure RRD API(示例)。



2。对于一些实时数据的实验,我建议考虑 Perst



它足够小,快速和可靠,但在GPLv3下分发。 Perst提供了几种索引算法:


  1. B-Tree

  2. T-Tree(优化用于 - 内存数据库)

  3. R-Tree(空间索引)

  4. Patricia Trie(前缀搜索)

  5. KD -Tree(多维索引)

  6. 时间序列(大量带时间戳的固定大小对象)

最后一个非常适合您的需求。



3。使用 Neo4J rel =noreferrer>关系指数


此方法支付股息的一个很好的例子是时间序列
数据,其中我们的读数表示为
出现的关系。


4。 Oracle Berkeley DB Java Edition


Oracle Berkeley DB Java版是一个完全用Java编写的开源,可嵌入的
事务存储引擎。它需要Java环境的全部优惠才能简化开发和
部署。 Oracle Berkeley DB Java版本
的体系结构支持读取密集型
和写入密集型工作负载的高性能和并发性。


建议



尝试 RRD4J


  1. 这很简单

  2. 它提供了相当不错的情节

  3. 它有Clojure API

  4. 它支持几个后端,包括 Oracle Berkeley DB Java版本

  5. 它可以存储/可视化详细数据套装


I'm looking for an embeddable Java library that is suitable for collecting real-time streams of sensor data in a general-purpose way. I plan to use this to develop a "hub" application for reporting on multiple disparate sensor streams, running on a JVM based server (will also be using Clojure for this).

Key things it needs to have:

  • Interfaces for various common sensor types / APIs. I'm happy to build what I need myself, but it would be nice if some standard stuff comes out of the box.
  • Suitable for "soft real time" usage, i.e. fairly low latency and low overhead.
  • Ability to monitor and manage streams at runtime, gather statistics etc.
  • Open source under a reasonably permissive license so that I can integrate it with other code (Apache, EPL, BSD, LGPL all fine)
  • A reasonably active community / developer ecosystem

Is there something out there that fits this profile that you can recommend?

解决方案

1. Round-robin database (wikipedia)

RRDtool (acronym for round-robin database tool) aims to handle time-series data like network bandwidth, temperatures, CPU load, etc. The data are stored in a round-robin database (circular buffer), thus the system storage footprint remains constant over time.

This approach/DB format is widely used, stable and simple enough. Out of the box it allows to generate nice plots:

There is Java implementation -- RRD4J:

RRD4J is a high performance data logging and graphing system for time series data, implementing RRDTool's functionality in Java. It follows much of the same logic and uses the same data sources, archive types and definitions as RRDTool does. Open Source under Apache 2.0 License.

Update

Forget to mention there is Clojure RRD API (examples).

2. For some experiments with real-time data I would suggest to consider Perst

It is small, fast and reliable enough, but distributed under GPLv3. Perst provides several indexing algorithms:

  1. B-Tree
  2. T-Tree (optimized for in-memory database)
  3. R-Tree (spatial index)
  4. Patricia Trie (prefix search)
  5. KD-Tree (multidimensional index)
  6. Time series (large number of fixed size objects with timestamp)

The last one suits your needs very well.

3. Neo4J with Relationship indexes

A good example where this approach pays dividends is in time series data, where we have readings represented as a relationship per occurrence.

4. Oracle Berkeley DB Java Edition

Oracle Berkeley DB Java Edition is an open source, embeddable, transactional storage engine written entirely in Java. It takes full advantage of the Java environment to simplify development and deployment. The architecture of Oracle Berkeley DB Java Edition supports very high performance and concurrency for both read-intensive and write-intensive workloads.

Suggestion

Give a try to RRD4J:

  1. It is simple enough
  2. It dose provide quite a nice plots
  3. It has Clojure API
  4. It supports several back-ends including Oracle Berkeley DB Java Edition
  5. It can store/visualize detailed data sets

这篇关于基于Java的传感器数据收集库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆