Back

Realtime SDK alternative

  • 0
  • Realtime
ab.art.ben
1 Jan, 2024, 20:14

Hello everybody, I'm a hobbyist and i'm working on a project with electronics IOT (ESP32) with MQTT connection. My instructions for my device (ex : turn on the lights) are stored in a database/collection, then sent by MQTT protocol to by device with a nodejs script. I just realised that there is no realtime API for SDK, what is the best solution for my server to check for updates ? So far my best solution is a get every documents every 5 secs ... I'm sure there is a more elegant solution !

TL;DR
The user is seeking an alternative solution for realtime updates in their IoT project using an ESP32 and MQTT. They mention that the current approach of regularly fetching documents from a database every 5 seconds is not elegant. One suggestion given is to use webhooks, although it may complicate network security. Another note is that exposing the device to the public internet might not be a good idea. No definitive solution is provided in the thread.
Drake
1 Jan, 2024, 23:07

It's typically not needed because you can execute a function off an event or webhook

ideclon
2 Jan, 2024, 00:33

That would only be possible if the device is publicly exposed to the Internet - which would probably not be a good idea, in this case

ab.art.ben
2 Jan, 2024, 17:51

Thank's for your answer, webhook sounds a possible solution, it complexifies my network security but I'll look into it !

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more