Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT too slow #1

Open
moelha opened this issue Apr 10, 2018 · 2 comments
Open

MQTT too slow #1

moelha opened this issue Apr 10, 2018 · 2 comments

Comments

@moelha
Copy link
Owner

moelha commented Apr 10, 2018

MQTT protocol is found to be too slow for real-time communication.

When the Python script reads from the sensor and sends the data to Node-RED, the data displayed on the dashboard is showed with a consistent delay.

This might be either that Node-RED is too slow to show data in real time, or that the MQTT protocol is inappropriate for this fast, real-time communication.

In order to accurately determine the reason, the following tests will be made:

  1. Create a function on Node-RED to generate random numbers and display them on the dashboard (to rule out the MQTT delay factor)
  2. Swap MQTT protocol with WebSocket (to check if speed improves)
@moelha
Copy link
Owner Author

moelha commented Apr 10, 2018

After a series of tests on Node-RED, it was ruled out that MQTT was the actual bottleneck. An inject node was used to generate timestamps and print them on the dashboard, where the sensor data is.

There are consistent delays with fast data (aka a data point every 0.01 seconds). Node-RED is therefore too slow processing and rendering the data on the dashboard in real time.

At this point, the most important thing is data-logging, streaming is secondary. In the near future, other means of faster data-displaying will be evaluated.

@moelha moelha closed this as completed in a3171fc Apr 10, 2018
@moelha moelha reopened this Apr 10, 2018
@moelha
Copy link
Owner Author

moelha commented Apr 10, 2018

The issue was re-opened so that any updates about this issue will be posted here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant