-1

我正在使用 NodeRed 从 CC2650 SensorTag 收集数据并将其存储在 SQL 数据库中。SensorTag 通过应用程序连接到我的手机,并将数据推送到云端。我的 NodeRed 应用程序收集这些数据,然后将其存储到我的 SQL 中。但是我发现系统会断开连接,无法长时间监控数据。我连接了两个传感器标签,数据流似乎随机停止。我相信这是由于 NodeRed 和 SQL 之间的连接丢失,但我不确定。是否有其他人运行类似的程序面临这些问题?

数据将出现在 NodeRED 调试屏幕中,并上传到表中的 SQL 数据库。在发送数据时,我可以在刷新表时看到每个点都在上传,但是上传并不一致,有时会停止上传到 SQL 表,尽管仍然显示在调试中。到目前为止,我还没有看到任何模式,数据会因为没有明确的原因而随机停止。我已经能够刷新系统并再次部署它以尝试让它再次运行,但这并不总是成功的,只是一个临时解决方案。

4

2 回答 2

0

最好使用 CloudantSQL 而不是 SQL,因为它以 json 格式存储整个消息,然后您可以精确提取所需的数据,然后将其存储在 NO-SQL 数据库中。

cloudant 节点比普通的 SQL 节点好,因为它只是以 JSON 格式存储,无论什么数据进来都没有任何延迟或延迟!

于 2015-08-18T14:57:20.947 回答
0

There was a problem in the Node-RED node interfacing with the sqldb and dashDB services. It had a problem with keeping long opened connections stable over time (in the Node-Red context). The code has been updated.

Contrary to the suggestion of using Cloudant, use sqldb. :) Depending whether you want to store the entire JSON message, only parts of it, and how the data will be used later on in terms of queries and other applications, the relational format may make sense.

于 2015-08-27T06:53:08.380 回答