SiteWhere is an open source M2M/IoT integration platform. It provides system that choreographs the gathering, storage, processing, and routing of device data. SiteWhere provides the following functionality:完全开源,精心设计,包括以下功能
Rather than reinventing the wheel, SiteWhere depends on many supporting open source technologies to accomplish its goals. Most of the technologies used have been tested for years in production environments and have been continuously upgraded thanks to many iterations of improvements. The following open source components are used by SiteWhere:各种开源的技术。
Tomcat provides the core server in which SiteWhere runs. SiteWhere is deployed as a web archive (WAR file) that runs when the Tomcat server is started.提过核心服务的是Tomcat,就是SiteWhere跑在Tomcat上,SiteWhere部署在web档案,当Tomcat server运行的时候,SiteWhere也开始运行。
Spring delivers the core configuration framework that bootstraps SiteWhere and allows it to be configured and extended. Rather than using a hard-coded set of components, SiteWhere has a core set of service provider interfaces and default implementations of the interfaces. By using the same interfaces in custom classes and plugging them in via Spring, a third parties can extend SiteWhere without touching the core code.引导SiteWhere的由Spring来配置或者扩展。也提供一些服务接口表。在custom类通过用相同的接口,通过spring将其插入,第三方的不需要改核心code而进行扩展。
Spring Security provides the core security infrastructure for SiteWhere. SiteWhere has its own user management interfaces, but also implements interfaces from Spring Security, allowing it to use existing security components for authenticating access to system resources. For instance, Spring Security annotations are used to control who can access the REST services.Spring的安全性,允许使用存在的部件控制接入。
MongoDB is a NoSQL database that can be used to store SiteWhere data. It is very quick and easy to install, has great performance, and does not require the computing resources of HBase. MongoDB is a great choice for smaller SiteWhere installations where extreme scalability it not required.这个是数据库存储数据的,安装方便,不需要计算HBase的源。
HBase is a distributed, non-relational data store that allows relatively unlimited data storage with near linear scalability as new hardware is added to the cluster. SiteWhere uses a customized HBase schema to store device events as time series data that is optimally distributed across a cluster, allowing fast access to events based on the time they were gathered. This allows SiteWhere to store device event data without ever needing to delete it to preserve performance.分布式,不相关数据存储。。。
Solr is an advanced distributed search engine powered by Apache Lucene. SiteWhere uses Solr to index device event data for advanced queries. Since SiteWhere differentiates between different types of event data, it can index the data in Solr based on interesting characteristics. For instance, SiteWhere indexes location data with geospatial indexes. SiteWhere also adds extra metadata for each event so that complex faceted searches can be performed. For instance, a query could be for all location events gathered in the last week, find those within a mile of a given point, then get a count by device hardware type or return a list of devices attached to a given type of heavy equipment that had an engine temperature reading of greater than a given value in the time period of noon to 3pm.搜索引擎
Hazelcast is an in-memory data grid that allows for high performance data processing across a cluster of servers. SiteWhere uses Hazelcast to provide subscription-based access to events being processed. An external entity can use the Hazelcast client to connect to a running SiteWhere instance and listen to a feed of events including location data, measurements, alerts, and command invocations.
In addition to the technologies used to implement core SiteWhere features, there are a number of complementary technologies that enhance SiteWhere. These include:
Mule AnyPoint is an integration platform that provides access to almost any communication protocol or cloud technology you can imagine. For instance, using Mule you could read messages from a folder on the file system, parse them, then deliver them to SiteWhere via REST services. On the other side of the coin, you could have Mule respond to events after the fact. For example, if an alert event of a given type and severity is detected, Mule can interface with Twilio and send out an SMS message to alert the responsible party to respond. Mule AnyPoint Studio is a powerful IDE that allows mule flows to be designed graphically. SiteWhere has a plugin for Mule Studio that allows flows to subscribe to device events using a drag-and-drop visual approach.几乎对所有协议提供接口。都是通过REST服务。
Magento Community Edition is an open source storefront product that allows you to easily set up an online store complete with a very sophisticated product catalog. SiteWhere uses an extension module to allow Magento products to serve as asset types that can be assigned to devices. Magento has an extensive user interface for adding custom product attributes including images. These can flow through as asset attributes and be used in device event processing. For instance, if a product has a price attribute, you could add rules in Mule processing that query the attribute at runtime and fire a custom alert if a device over a given value moves out of a pre-determined area.
WSO2 Identity Server is an identity management solution that allows user information to be accessed from a number of different storage providers using the SCIM protocol. This allows SiteWhere\'s asset management framework to use a single API to access user information stored in databases, LDAP stores, or any other supported format. The person assets may then be assigned to devices so that SiteWhere has more context in reacting to events. For instance, if an alert condition occurs, SiteWhere can originate an automated call to the cell phone registered to the user assigned to a device.
The core purpose of SiteWhere is to choreograph interactions between devices and various external entities, but an important byproduct of the management process is data.. lots of data. Consider an application that tracks the current locations of cars in a rental car fleet. Suppose that the tracking device sends a location event back to SiteWhere every 10 seconds. In one day, the car will have reported 8640 location events. Multiply that by 10000 cars in a fleet and the number of events approaches 87 million per day. Lower the monitoring interval to per-second accuracy and the number of events moves toward a billion. In the Internet of Things, the number of events generated can quickly reach levels that would break your average database. SiteWhere was designed with huge data in mind and is intended to scale gracefully without performance degrading.
SiteWhere的核心目的是在设备和各种外在实体提供交互,但是副作用就是数据量太大。。。数据量太大了啊
The possible uses for SiteWhere are endless. Almost any industry can benefit from some level of monitoring, automation, and analytics. Below are a few examples of real-world uses for SiteWhere:下面就是各种应用的场景了
Whether monitoring a rental car fleet or a few very expensive pieces of heavy equipment, it makes sense to track the location of vehicles and monitor their condition over time. An automated system based on SiteWhere could help in theft prevention, monitor service intervals or point out trends in maintenance costs based on vehicle type.
Home automation is one of the fastest growing areas in IoT. Many devices that were once passive now contain microcontrollers and have the ability to be monitored or actuated externally. SiteWhere provides a central system for extended retention of measurements from devices and facilitates sending commands in response to various conditions. Many off-the-shelf systems are customizable, but SiteWhere is truly programmable. An example of the power of SiteWhere in the cloud is a climate control system. A system could be designed to learn wake/sleep patterns and temperature preferences. Since SiteWhere can operate in the cloud, your climate profile could follow you when you check into a hotel, so that the room is already confortable when you check in and adjusts itself on your schedule.
The medical industry is full of opportunities for monitoring, automation, and analytics. For instance, monitors attached to patients could gather a patient\'s vital signs on a short interval, storing them in SiteWhere. Doctors could use the stored data to look for signs of abnormal readings. Better yet, SiteWhere analytics could automatically analyze the data and look for outlying data, even cross-referencing data between patients to draw more global conclusions. Data from local hospital SiteWhere instances could be aggregated with data from other hospitals to create larger study groups, revealing otherwise hidden trends.