如何在Orion中发送传感器的大量数据

huangapple go评论87阅读模式
英文:

How to send massive data of sensors in Orion

问题

  1. 通过批量操作(但我不知道它是否支持它们)
  2. 使用边缘设备(以汇总数据)并在 1 分钟后发送到 Orion

谢谢

英文:

Let's suppose to have 100 sensors that send an attribute any second to Orion. How could I manage this massive data?

  1. via batch operation (but I don't know if it can support them)
  2. using an edge (to aggregate data) and sending to Orion (after 1 minute)

Thank you

答案1

得分: 4

以下是您要翻译的内容:

Let’s consider 100 tps a high load for a given infrastructure (load and throughput must be always related to infrastructure and e2e scenarios).

The main problem you may encounter is not related to the update itself, Orion Context Broker and its fork Orion LD, can handle a lot of updates. The main problem in real/productive scenarios, like the ones handled by Orion Context Broker and NGSI v2, are the NOTIFICATIONS related to those UPDATES.

If you need a 1:1 (or even a 1:2 or 1:4) ratio between UPDATES:NOTIFICATIONS, for example you want to keep track of the history of every measure and also send the measures to the CEP for some post-processing, then it’s not only a matter of how many updates Orion may handle, but how many update-notifications the E2E can handle. If you got a slow notification endpoint Orion will saturate its notification queues and you will be losing notifications (not keeping track of those updates within en historic, or CEP…).

Batch updates are not helping on this since the UPDATE REQUEST SERVER is not the bottleneck and they are internally managed as single updates.

To alleviate this problem I should recommend you to enable NGSI V2 (only available in V2) flow control mechanism, so the update process may be automatically slowed down when the notification throughput requires so.

And of course, in any IoT scenario if you don’t need all the data the earlier you aggregate the better. So if your E2E doesn’t need to keep track of every single measure, data loggers are more than welcome.

英文:

Let’s consider 100 tps a high load for a given infrastructure (load and throughput must be always related to infrastructure and e2e scenarios).

The main problem you may encounter is not related to the update itself, Orion Context Broker and its fork Orion LD, can handle a lot of updates. The main problem in real/productive scenarios, like the ones handled by Orion Context Broker and NGSI v2, are the NOTIFICATIONS related to those UPDATES.

If you need a 1:1 (or even a 1:2 or 1:4) ratio between UPDATES:NOTIFICATIONS, for example you want to keep track of the history of every measure and also send the measures to the CEP for some post-processing, then it’s not only a matter of how many updates Orion may handle, but how many update-notifications the E2E can handle. If you got a slow notification endpoint Orion will saturate its notification queues and you will be losing notifications (not keeping track of those updates within en historic, or CEP…).

Batch updates are not helping on this since the UPDATE REQUEST SERVER is not the bottleneck and they are internally managed as single updates.

To alleviate this problem I should recommend you to enable NGSI V2 (only available in V2) flow control mechanism, so the update process may be automatically slowed down when the notification throughput requires so.

And of course, in any IoT scenario if you don’t need all the data the earlier you aggregate the better. So if your E2E doesn’t need to keep track of every single measure, data loggers are more than welcome.

答案2

得分: 1

关于每秒发送一个更新的 100 个传感器(我理解对吗?)... 这没什么。代理可以处理每秒 2-3 千次更新,运行在单个核心上,配备大约 4 GB 的 RAM(mongodb 需要大约 3 倍的内存)。
而且,如果需要更多(远远更多),那么是的,NGSI-LD API 定义了批量操作(用于创建、更新、Upsert 和删除实体),Orion-LD 实现了它们全部。

然而,对于属性更新,没有批量操作。您需要使用"批量更新实体",使用更新模式(而不是替换)。查阅 NGSI-LD API 规范以获取详细信息。

英文:

For 100 sensors sending one update per second (did I understand that correctly?) ... that's nothing. The broker can handle 2-3 thousand updates per second running in a single core and with ~4 GB of RAM (mongodb needs about 3 times that).
And, if it's more (a lot more), then yes, the NGSI-LD API defines batch operations (for Create, Update, Upsert, and Delete of entities), and Orion-LD implements them all.

However, there's no batch op for attribute update. You'd need to use "batch update entity", the update mode (not replace). Check the NGSI-LD API spec for details.

huangapple
  • 本文由 发表于 2023年2月6日 16:56:09
  • 转载请务必保留本文链接:https://go.coder-hub.com/75359152.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定