pando-cloud

module
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2015 License: MIT

README

pando-cloud Build Status Coverage Status

PandoCloud是Pando物联网解决方案的云平台部分。

English Document

什么是Pando?

Pando是一套完全开源的物联网解决方案。致力于帮助开发者快速创建自己的物联网应用。它包含了如下的工具,协议和类库:

设计理念

Pando的目的是为了提供一套可应用于实际生产环境的的物联网解决方案。它并不是一个简单的用于演示物联网服务的测试demo。下面列举了实现这套方案我们需要关注的一些关键点:

  • 物联网: 应该提供一套物联网应用场景的最佳实践。
  • 可靠性: 应该被充分的测试,并少有缺陷。
  • 分布式: 可以方便的部署在单机和集群环境中。
  • 可用性: 提供容错能力,灾备能力,自我修复机制等。
  • 扩展性: 必须是模块化,可插拔。
  • 易用性: 易于学习的开发和部署方式。
  • 通用性: 通用的设计和深度的业务抽象。
  • 高性能: 在硬件能耗和网络带宽使用上要尽量降低。
  • 安全性: 避免降低入侵和破解的风险。
  • 伸缩性: 轻松管理数千乃至数亿级的物联网设备。

系统架构

architecture

系统采用三层架构。

接入层

接入层提供了使用不同协议的设备的通信连接,包括但不局限于HTTP协议,XMPP协议,MQTT协议,COAP协议。

设备注册,身份验证和设备发现使用HTTP协议。目前,我们支持使用MQTT协议与设备进行通信。

业务层

逻辑业务层用于实现整个物联网面相设备的相关业务,例如设备管理和API等。

  • registry: 负责维护平台级的配置信息和元数据。
  • devicemanger: 设备管理器用于管理设备和处理设备的数据请求,并保持、监视设备状态。
  • apiprovider: 为应用程序扩展提供Restful API,并在设备状态发生变化时通知应用服务器。
  • controller: 管理设备接入服务,并且将设备请求路由到正确的接入服务。
核心服务层

我们的核心服务所选择的开源程序:

  • mongodb: 用mongodb做为设备的数据存储引擎。
  • mysql: 用MySql存储同类型设备的全局配置信息。
  • redis: 使用redis提供缓存服务。
  • nsq: 异步通信消息队列做为消息通知中心。
  • etcd: 高可用的键值存储系统,主要用于共享配置和服务发现。
  • ELK: elk日志分析系统即Logstash+ElasticSearch+Kibana4的组合简称,主要用于日志记录和分析。

技术参考

快速开始

快速开始介绍如何在自己的服务器或者pc机上单机部署pando物联网云。

开发应用

基于pando平台的物联网应用分为设备端应用服务器

  • 设备端负责实现数据流的传输和管理,须符合pando物联网应用协议;我们提供了Pando嵌入式开发框架封装了协议的实现,并支持移植到不同的硬件平台。也可根据设备接入接口文档自行实现设备端移植。
  • 应用服务器负责实现设备管理和交互的业务逻辑,并负责和用户终端(如手机,pc,微信等)进行交互。应用服务区器通过REST API访问Pando云平台的HTTP接口来实现对设备的操作,并通过向云平台注册回调URL接收设备的状态变化的事件通知。具体可参考应用服务器接口文档

贡献项目

pando物联网平台是完全开源免费的物联网解决方案,欢迎大家以各种形式贡献项目。

  • 反馈问题:我们鼓励通过提交Issue的方式反馈您在使用中遇到的疑问或问题。
  • 提出建议:同样,可以通过提交Issue向我们提供改进意见,同时可以通过加入我们的讨论QQ群(488074716)或者参加我们主办的线下物联网技术沙龙一起讨论。
  • 贡献代码:非常欢迎有能力的朋友一起参与Pando物联网平台的开发,一起构建开放、免费、开源的物联网解决方案。请按照贡献流程参与项目开发。

Directories

Path Synopsis
Godeps
_workspace/src/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git
Package mqtt provides an MQTT v3.1.1 client library.
Package mqtt provides an MQTT v3.1.1 client library.
_workspace/src/github.com/Sirupsen/logrus
Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
_workspace/src/github.com/codegangsta/inject
Package inject provides utilities for mapping and injecting dependencies in various ways.
Package inject provides utilities for mapping and injecting dependencies in various ways.
_workspace/src/github.com/coreos/etcd/client
Package client provides bindings for the etcd APIs.
Package client provides bindings for the etcd APIs.
_workspace/src/github.com/coreos/etcd/pkg/pathutil
Package pathutil implements utility functions for handling slash-separated paths.
Package pathutil implements utility functions for handling slash-separated paths.
_workspace/src/github.com/coreos/etcd/pkg/types
Package types declares various data types and implements type-checking functions.
Package types declares various data types and implements type-checking functions.
_workspace/src/github.com/garyburd/redigo/internal/redistest
Package redistest contains utilities for writing Redigo tests.
Package redistest contains utilities for writing Redigo tests.
_workspace/src/github.com/garyburd/redigo/redis
Package redis is a client for the Redis database.
Package redis is a client for the Redis database.
_workspace/src/github.com/go-martini/martini
Package martini is a powerful package for quickly writing modular web applications/services in Golang.
Package martini is a powerful package for quickly writing modular web applications/services in Golang.
_workspace/src/github.com/go-sql-driver/mysql
Go MySQL Driver - A MySQL-Driver for Go's database/sql package The driver should be used via the database/sql package: import "database/sql" import _ "github.com/go-sql-driver/mysql" db, err := sql.Open("mysql", "user:password@/dbname") See https://github.com/go-sql-driver/mysql#usage for details
Go MySQL Driver - A MySQL-Driver for Go's database/sql package The driver should be used via the database/sql package: import "database/sql" import _ "github.com/go-sql-driver/mysql" db, err := sql.Open("mysql", "user:password@/dbname") See https://github.com/go-sql-driver/mysql#usage for details
_workspace/src/github.com/martini-contrib/binding
Package binding transforms a raw request into a struct ready to be used your application.
Package binding transforms a raw request into a struct ready to be used your application.
_workspace/src/github.com/martini-contrib/render
Package render is a middleware for Martini that provides easy JSON serialization and HTML template rendering.
Package render is a middleware for Martini that provides easy JSON serialization and HTML template rendering.
_workspace/src/github.com/oxtoacart/bpool
Package bpool implements leaky pools of byte arrays and Buffers as bounded channels.
Package bpool implements leaky pools of byte arrays and Buffers as bounded channels.
_workspace/src/github.com/pborman/uuid
The uuid package generates and inspects UUIDs.
The uuid package generates and inspects UUIDs.
_workspace/src/github.com/qor/inflection
Package inflection pluralizes and singularizes English nouns.
Package inflection pluralizes and singularizes English nouns.
_workspace/src/github.com/ugorji/go/codec
High Performance, Feature-Rich Idiomatic Go codec/encoding library for binc, msgpack, cbor, json.
High Performance, Feature-Rich Idiomatic Go codec/encoding library for binc, msgpack, cbor, json.
_workspace/src/github.com/ugorji/go/codec/codecgen
codecgen generates codec.Selfer implementations for a set of types.
codecgen generates codec.Selfer implementations for a set of types.
_workspace/src/golang.org/x/net/context
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
_workspace/src/golang.org/x/net/context/ctxhttp
Package ctxhttp provides helper functions for performing context-aware HTTP requests.
Package ctxhttp provides helper functions for performing context-aware HTTP requests.
_workspace/src/golang.org/x/net/websocket
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
_workspace/src/labix.org/v2/mgo
Package mgo offers a rich MongoDB driver for Go.
Package mgo offers a rich MongoDB driver for Go.
_workspace/src/labix.org/v2/mgo/bson
Package bson is an implementation of the BSON specification for Go: http://bsonspec.org It was created as part of the mgo MongoDB driver for Go, but is standalone and may be used on its own without the driver.
Package bson is an implementation of the BSON specification for Go: http://bsonspec.org It was created as part of the mgo MongoDB driver for Go, but is standalone and may be used on its own without the driver.
_workspace/src/labix.org/v2/mgo/sasl
Package sasl is an implementation detail of the mgo package.
Package sasl is an implementation detail of the mgo package.
_workspace/src/labix.org/v2/mgo/txn
The txn package implements support for multi-document transactions.
The txn package implements support for multi-document transactions.
pkg
models
application is app who will use the cloud api device is a product instance, which is managed by our platform product is a abstract define of same devices made by some vendor vendor is those who make products
application is app who will use the cloud api device is a product instance, which is managed by our platform product is a abstract define of same devices made by some vendor vendor is those who make products
mysql
database initial and migrate
database initial and migrate
online
package online manage device online state and store it in redis.
package online manage device online state and store it in redis.
queue
package queue implement a message queque api with redis pub/sub command
package queue implement a message queque api with redis pub/sub command
server
http server library.
http server library.
tlv
services
tests
tools

Jump to

Keyboard shortcuts

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