本文介绍了通过MQTT或HTTP交换的最轻量,最有效的消息有效载荷格式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从事一个项目,该项目需要在现场的边缘设备与服务器之间交换数据.由于这是一个复杂的体系结构,包含许多组件,因此在处理资源受限的设备时,对每个组件进行全面评估并使其优化和轻量化非常重要.

I am been working on a project where it is required to exchange data between the edge device on field and the server. As this is a complex architecture and contains a lot of components it is important that each and every component be evaluated thoroughly and make it optimized and lightweight as we are dealing with resource constrained device.

我大部分已经看到使用JSON作为消息有效负载.我只想知道有没有比JSON更轻巧和优化的更好的选择?

I have mostly seen the use of JSON for message payload. I just want to know are there any better options available than JSON which is more lightweight and optimized?

PS:重量轻意味着更少的计算能力,优化意味着更少的传输过程中数据损坏的可能性.

PS : Lightweight meaning less computing power, optimized meaning less chances of data corruption over transmission.

推荐答案

您总是可以自己滚动,但是除了适用于AWS IoT,Azure,Google IoT等的云专有方案外,我们还注意到这些非JSON基于:

You could always roll your own, but besides the cloud-proprietary schemes for AWS IoT, Azure, Google IoT, etc, we are aware of these non-JSON-based:

  • SmartREST https://cumulocity.com/guides/device-sdk/mqtt/#smartrest-2
  • Sparkplug https://www.cirrus-link.com/mqtt-sparkplug-tahu/
  • TR50 https://docs.devicewise.com/Content/Products/IoT_Portal_API_Reference_Guide/MQTT_Interface/MQTT-Interface.htm
  • LWM2M-MQTT https://wiki.eclipse.org/images/e/e1/LWM2M_MQTT_EclipseIoTDaysGrenoble.pdf

它们中的任何一个是否更轻便取决于您的确切要求.

Whether any of them is more light-weight depends on your EXACT requirements.

这篇关于通过MQTT或HTTP交换的最轻量,最有效的消息有效载荷格式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-13 13:01