IoT接入协议、通信协议

IoT接入协议、通信协议_第1张图片

先读两篇文章

物联网通信协议的详解及选择建议 - 全文

常见物联网近距离无线通信技术解析 - 全文

对于物联网传输协议 ,主要分两大类 (只讨论无线传输)

接入协议 和 通信协议

1、接入协议,主要功能是组网,短距离传输等,图1为常见的相关协议

IoT接入协议、通信协议_第2张图片

                                                   图1

     图片来源:http://electronicsofthings.com/news/internet-of-things-gateway-platform-and-applications/

2、通信协议(只考虑应用层协议)(应用层协议基本都是基于TCP/UDP的,可想象OSI模型)

常见通信应用层协议见图2

IoT接入协议、通信协议_第3张图片

                                          图2 

图2来源http://www.cnblogs.com/jhj117/p/5521083.html


注:REST 是一种规范, 存在3种规范 为RPC/SOAP/REST. REST FUL/ HTTP 为遵守REST规范的一种HTTP协议

Communication Protocol
There are many communication protocols which can be used by the IoT gateway to communicate with the cloud application. Here we discuss some of the more popular technologies along with their pros and cons.

Plain HTTP: This is by far the most ubiquitous protocol. It’s widely accepted by servers and being backed by Internet standards has least compatibility issues. It also maps naturally with the RESTful APIs.However it suffers from large overhead in form of HTTP headers andtext based format. It is stateless despite being run on top of TCP. That makes it unsuitable for real-time usage. The client must send a request in order to get a response (command) from the server.Client has to keep polling for updates from the server.

CoAP: Constrained Application Protocol can be considered to be binary version of HTTP. It improves on some limitations on HTTP. It has very concise headers and supported binary data format thus reducing the overhead. It can be used on top of TCP or other transport as well even SMS. CoAP packets can be easily translated toa HTTP packet. However because of negligible Internet infrastructure support it does not play well with firewalls,proxies and routers. Thus this protocol is only suitable for private networks typically inside the sensor network.

Web sockets: It is a new protocol also backed by web standards. It has the same addressing and handshake mechanism as used by HTTP. Thus making it compatible with existing network infrastructure. Oncehandshake is complete it switches to duplex communication on top of TCP. This makes it suitable forreal time, two way communication. It’s especially suitedin shared hosting environments and gateways operating behind proxies.

MQTT: Is also a popular protocol running (optionally) on top of TCP. It has a topic subscriber model. Though more suited for broadcasting messages to interested gateways, it’s also used forgateway to server communication. It has some features like last message persistence and will and testament message that make it useful for IoT application.

AMQP: This perhaps is the most suited protocol for gateway server communication. This protocol acts as a storing queue and ensures that packets are not lost, even incase of temporary outage.

XMPP: Extensible Messaging and Presence Protocol is a popular protocol used by chat clients for real time communication. It standardizeslot of things like user authentication and message IDs. However owing to its complex specification and exchange of data using verbose XML format makes it unsuitable for IoT application.

案例阅读: Internet of Things Gateway Platform and Applications A discussion of challenges in designing an IoT gateway and designing a generic Gateway platform


你可能感兴趣的:(网络与通信传输)