Thisguide is intended to provide a high-level understanding of whatSiteWhere does and how it is implemented.
这篇指南目的是提供一个SiteWhere能做什么以及怎样实现的高层次理解。
SiteWhereis an open source IoT platform. It provides a system that facilitatesthe ingestion, storage, processing, and integration of device data.SiteWhere provides the following functionality:
SiteWhere是一个开源的IOT平台,它提供了一个系统使设备数据的获取、存储、处理和集成变得容易。SiteWhere提供以下功能:
Suppliesa server based on proven technologies that acts as a controller forthe processing of device data. The server can be installed on alocal machine or run in the cloud and is built on technologies thatare designed to scale to billions of processed device events perday.
提供一个基于成熟技术的服务器作为设备数据处理的控制器,服务器可以在本地主机上安装,或在云端运行,系统构建的技术可以设计、扩展到每天支持数亿计的设备事件处理规模。
Provideslong-term persistence of data sent from devices. Historical deviceevent data is valuable and SiteWhere offers a platform where data isnever deleted, no matter the volume of events.
为设备数据提供长期的持久化保存,对于非常有价值的历史设备事件数据,SiteWhere提供了一个数据不会被删除的平台,无论数据事件的大小和规模。
Offersservice provider interfaces (SPIs) that provide a core object modelfor the platform and allow third parties to extend and customize thesystem to work with new technologies.
提供了服务提供者接口(SPIs),为平台提供了一个核心的对象模型,允许第三方采用新的扩展、定制系统。
Deliversan advanced device communication system that allows control of thefull lifecycle of registering devices, sending commands based onhardware type, receiving data responses and aggregating them. Thesystem is based on a core set of interfaces that allow newcommunication protocols and encoding schemes to be added andconfigured easily.
交付了一个先进的设备通信系统,允许对注册设备的完整生命周期进行控制,基于硬件类型发送指令,接收数据响应,汇聚数据。系统基于一套核心的接口,允许增加新的通信协议和编码方式,配置容易。
Providesan HTML5 administrative application that allows all of the systemdata to be viewed and manipulated in a way that makes it easy tounderstand the data. The admin app uses REST services provided bythe core platform to interact with the data. Third partyapplications can use the same REST services to interact withSiteWhere data without having to use the admin application.
提供一个基于HTML5的系统管理应用,允许查看、操作所有的系统数据,理解数据变得容易。系统管理应用使用核心平台提供REST服务与数据交互,第三方应用可以不使用系统管理应用而是通过REST服务与SiteWhere进行数据交互。
Providesa complete device management model. Device specifications allowclasses of devices to be declared along with metadata that providesextended context for devices. Devices are created based onspecifications along with unique information such as a hardware idand device-specific metdata. Device assignments allow devices to beassociated with physical assets. Device groups allow many devices tobe targeted based on group relationships and metadata.
提供一个完整的设备管理模型。设备规格允许申明设备类、元数据,为设备提供扩展的环境。设备基于设备规格创建,具有独一无二的信息,如硬件id,设备描述的元数据。设备关联允许设备与物理资产关联,设备组允许多个设备根据组关系和元数据组成一组。
Providesa model for standard types of data generated by devices. Events suchas value measurements, alert conditions, and location updates arestored in massively scalable time series datastores. Device commandinvocations and responses are tracked and correlated along withstate events such as device registrations and presence detection.All events are linked to based on the currently assigned asset forfine-grained tracking.
为设备生成的数据提供一个标准类型模型。像测量值、位置更新存储在大规模可扩展时间序列数据存储中。设备命令的调用和响应与状态事件一起被跟踪和关联,如设备注册、状态探测。所有事件为了细颗粒度的跟踪与关联的资产连接。
Associatesdevices with external assets such as people or physical items. Forinstance, a badge may be associated with the person wearing it. Atracking device can be associated with the piece of heavy equipmentit is attached to. The asset information is offered via an assetmanagement framework that allows external systems to drive theinformation. For instance, the list of people that badges can beassigned to can come from an existing LDAP data store. SiteWheretracks the assignment of devices to assets over time and ties eventsto the assignment so at a later date you can query whatwere the locations of the badge when it was assigned to this person.
把设备与外部资产联系,诸如与人或者物理项目联系。例如,徽章与佩戴的人联系。一个位置跟踪设备可能与安装它的重型设备联系。资产信息通过资产管理框架提供,允许外部系统驱动信息。例如,徽章可以关联的人名列表来自于已有的LDAP数据存储。SiteWhere一直跟踪设备与资产的关联,把事件与关联连接,因此在截止日期前你可以查询到徽章在哪里,关联到人。
Integrateswith third party integration frameworks such as MuleAnyPoint,allowing event data to trigger complex interactions such as addingdata to Salesforce or notifying alert conditions using text messagesgenerated by Twilio.
集成了第三方的集成框架,如MuleAnyPoint,允许事件数据触发复杂的交互,如添加数据到Saleforce或者通知有Twilio产生的文本消息格式的告警条件。
Offersa Java client that can interact with most of the provided RESTservices. For external systems with existing Java code, interfacingwith SiteWhere is as simple as a few lines of code.
提供Java客户端与大多数REST服务交互。对于外部已经存在的Java代码,与SiteWhere交互非常简单之需要几行代码。
Protectsinformation by limiting access to data based on a proven usermanagement system. The system can be configured to use externalsources of identity data such as LDAP data stores.
基于成熟的用户管理系统对数据限制访问来保护信息,系统可以配置使用外部的认证数据如LDAP数据存储。
Ratherthan reinventing the wheel, SiteWhere depends on many supporting opensource technologies to accomplish its goals. Most of the technologiesused have been tested for years in production environments and havebeen continuously upgraded thanks to many iterations of improvements.The following open source components are used by SiteWhere:
为了不重新发明轮子,SiteWhere依赖多种开源技术支持来完成它的目标。大多数使用到的技术都在生产环境中测试多年,根据改进的迭代可持续升级,下列SiteWhere使用到的开源组件:
Tomcat providesthe core server in which SiteWhere runs. SiteWhere is deployed as aweb archive (WAR file) that runs when the Tomcat server is started.
Tomcate为SiteWhere提供了运行的核心服务器。SiteWhere以WAR文件部署,在Tomcat开启时运行。
Spring deliversthe core configuration framework that bootstraps SiteWhere and allowsit to be configured and extended. Rather than using a hard-coded setof components, SiteWhere has a core set of service providerinterfaces and default implementations of the interfaces. By usingthe same interfaces in custom classes and plugging them in viaSpring, a third parties can extend SiteWhere without touching thecore code.
Sping发布了核心的配置框架,初始化SiteWhere,配置、扩展它。不是使用组件代码,SiteWhere有服务提供接口和接口的默认实现。通过Spring在定制化的类中使用同样的接口和插件,第三方不需要改写核心代码扩展SiteWhere。
SpringSecurity providesthe core security infrastructure for SiteWhere. SiteWhere has its ownuser management interfaces, but also implements interfaces fromSpring Security, allowing it to use existing security components forauthenticating access to system resources. For instance, SpringSecurity annotations are used to control who can access the RESTservices.
Spring安全机制为SiteWhere提供了核心安全基础架构。SiteWhere不仅拥有它自己的用户管理接口,而且可以使用Spring安全机制提供的接口,允许用户使用现有的安全组件对系统自己的访问认证。例如,Spring安全机制被用来控制谁可以访问REST服务。
Hazelcast isan in-memory data grid that allows for high performance dataprocessing across a cluster of servers. SiteWhere uses Hazelcast toprovide subscription-based access to events being processed. Anexternal entity can use the Hazelcast client to connect to a runningSiteWhere instance and listen to a feed of events including locationdata, measurements, alerts, and command invocations.
Hazelcast是一个通过服务器集群进行高性能数据处理的内存数据栅格系统。SiteWhere使用Hazelcast对处理的事件提供基于订阅的访问。外部实体能够使用Hazelcast客户端连接正在运行的SiteWhere实例,监听事件的反馈,包括位置数据,测量数据,告警和命令调用。
SiteWheresupports storing data in many of the most scalable persistence storesavailable. The storage implementations are plugged in via serviceprovider interfaces so SiteWhere interacts with them in a consistentfashion. This allows new storage technologies to be added easily.
SiteWhere支持多种扩展持久化存储方式存储数据,存储可以通过服务提供接口插入系统,SiteWhere以一致的方式与存储交互。这让新的存储技术很容易添加。
MongoDB isa NoSQL database that can be used to store SiteWhere data. It is veryquick and easy to install, has great performance, and does notrequire the computing resources of Hbase.
MongoDB是一个NoSQL数据库,能够用来存储SiteWhere数据。安装快、容易,性能好,不需要Hbase的计算资源。
HBase isa distributed, non-relational data store that allows relativelyunlimited data storage with near linear scalability as new hardwareis added to the cluster. SiteWhere uses a customized HBase schema tostore device events as timeseries data thatis optimally distributed across a cluster, allowing fast access toevents based on the time they were gathered.
HBase是一个分布式、非关系型数据库,允许相对没有限制的数据存储,支持线性扩展就像硬件被加入到集群。SiteWhere使用定制的HBase方案,存储设备事件,如时间序列数据,被分布在集群中,允许按照获取的时间快速的访问。
InfluxDB isa highly-scalable time series database that supports advancedclustering. SiteWhere can use a hybrid approach where devicemanagement data is stored in MongoDB while event data is stored inInfluxDB. With this approach, tools such as Grafana canbe used to visualize SiteWhere data.
InfluxDB是一个高扩展性的时间序列数据库,支持高级集群,SiteWhere能够使用混合的方式,设备管理数据存储在MongoDB中,事件数据存储在InfluxDB中。采用这种方式,Grafana工具就可以图形化展示SiteWhere数据。
Inaddition to the technologies used to implement core SiteWherefeatures, there are a number of complementary technologies thatenhance SiteWhere. These include:
一些附加的技术用来增加SiteWhere核心的功能,有许多增加SiteWhere功能的补充技术:
MuleAnyPoint isan integration platform that provides access to almost anycommunication protocol or cloud technology you can imagine. Forinstance, using Mule you could read messages from a folder on thefile system, parse them, then deliver them to SiteWhere via RESTservices. On the other side of the coin, you could have Mule respondto events after the fact. For example, if an alert event of a giventype and severity is detected, Mule can interface with Twilio andsend out an SMS message to alert the responsible party torespond. MuleAnyPoint Studio isa powerful IDE that allows mule flows to be designed graphically.SiteWhere has a plugin for Mule Studio that allows flows to subscribeto device events using a drag-and-drop visual approach.
MuleAnyPoint是一个集成平台,为你能够想到的大多数通信协议和云技术提供了访问接入。例如,你可以使用Mule从文件系统中的文件夹读取消息,解析消息,然后通过REST服务传递给SiteWhere。另外,你也可以让Mule响应事件,例如,如果一个给定类型的告警事件和错误被探测到,Mule能够与Twilio交互,传出SMS消息给有责任的一方响应。MuleAnyPoint Studio是一个功能强大的IDE工具,允许mule流程图形化设计。SiteWhere有一个MuleStudio插件,允许流程通过拖拽的方式订阅设备数据。
ApacheSpark isan engine for large-scale data processing. SiteWhere provides aconnector for streaming device events into Apache Spark via aHazelcast connection. Spark can feed SiteWhere data into othercomponents for applying machine learning algorithms or extractinganalytics data.
ApacheSpark是一个大规模数据处理引擎,SiteWhere为设备事件通过Hazelcast连接流动到ApacheSpark提供了连接器。Spark能够为其他组件提供SiteWhere数据,如及其学习算法或者分析数据。
SiteWheresupports the use of asset management systems in associating deviceswith external entities such as people, locations, or hardware. Assetscan be stored internally using the built-in SiteWhere assetmanagement features. Assets can also be loaded from external systemsso that existing information can be leveraged.
SiteWhere支持资产管理系统的使用,把设备与外部实体关联,例如人、位置、硬件。资产能够使用内置的SiteWhere资产管理功能进行存储。资产也能够从外部系统加载,可以利用现有的信息。
WSO2Identity Server isan identity management solution that allows user information to beaccessed from a number of different storage providers using the SCIMprotocol. This allows SiteWhere's asset management framework to use asingle API to access user information stored in databases, LDAPstores, or any other supported format. The person assets may then beassigned to devices so that SiteWhere has more context in reacting toevents. For instance, if an alert condition occurs, SiteWhere canoriginate an automated call to the cell phone registered to the userassigned to a device.
WSO2认证服务器是一个认证管理解决方案,允许用户信息使用SCIM协议从多个不同的存储提供商获取。这就允许SiteWhere的资产管理框架采用单个API访问数据库中的存储信息,LDAP存储,或者其他支持的格式。人力资产可以与设备关联,因此,SiteWhere可以处理复杂的事件环境。例如,如果一个告警条件满足,SiteWhere能够给系统注册的设备关联用户自动拨打电话。
Thepossible uses for SiteWhere are endless. Almost any industry canbenefit from some level of monitoring, automation, and analytics.Below are a few examples of real-world uses for SiteWhere:
SiteWhere使用是广泛的,大部分生产都收益于一些层次的监控、自动化和分析。下面是一些使用案例。
Whethermonitoring a rental car fleet or a few very expensive pieces of heavyequipment, it makes sense to track the location of vehicles andmonitor their condition over time. An automated system based onSiteWhere could help in theft prevention, monitor service intervalsor point out trends in maintenance costs based on vehicle type.
无论是监控一个出租车还是一些重型昂贵的设备,跟踪车辆的位置、一直监控状态都是必要的。基于SiteWhere的自动化系统可以防止被偷盗,监控服务间隔,或者根据车辆类型预测维护成本。
Homeautomation is one of the fastest growing areas in IoT. Many devicesthat were once passive now contain microcontrollers and have theability to be monitored or actuated externally. SiteWhere provides acentral system for extended retention of measurements from devicesand facilitates sending commands in response to various conditions.Many off-the-shelf systems are customizable, but SiteWhere is trulyprogrammable. An example of the power of SiteWhere in the cloud is aclimate control system. A system could be designed to learnwake/sleep patterns and temperature preferences. Since SiteWhere canoperate in the cloud, your climate profile could follow you when youcheck into a hotel, so that the room is already confortable when youcheck in and adjusts itself on your schedule.
家居自动化在物联网行业是一个快速增长的领域,过去许多无源的设备现在都配备了微控制器,能够被监控和外部触发。SiteWhere提供了一个中心系统来获取设备的测量数据,让根据各种条件发送命令变得容易。许多系统都是可定制化的,但是SiteWhere确实是可编程的。SiteWhere云端的一个例子是气候控制系统。一个系统能够设计成唤醒、睡眠模式和温度设置。因为SiteWhere可以在云端操作,你的气候主页当你入住宾馆时能够跟随着你变化,因此当你入住时房间已经很舒适,根据你的设置进行调整。
Themedical industry is full of opportunities for monitoring, automation,and analytics. For instance, monitors attached to patients couldgather a patient's vital signs on a short interval, storing them inSiteWhere. Doctors could use the stored data to look for signs ofabnormal readings. Better yet, SiteWhere analytics couldautomatically analyze the data and look for outlying data, evencross-referencing data between patients to draw more globalconclusions. Data from local hospital SiteWhere instances could beaggregated with data from other hospitals to create larger studygroups, revealing otherwise hidden trends.
医疗行业对于监控、自动化和分析来说充满了机会,例如病人监控能够以极短的时间间隔收集病人的关键特征,存储在SiteWhere系统中。医生能够使用存储数据查看异常特征。更好的是,SiteWhere分析可以自动分析数据、找出问题数据,甚至病人之间的数据,创建更大的学习组,揭示隐藏的趋势。