I have few electrons which publish data. I am using Webhooks to forward data/store data into databases. Recently, I figured out that using curl command like curl https://api.particle.io/*** **, I can live stream data published by the electron in the terminal. I can write a code to store data into the database with this curl method also.
My questions are:
- What are the pros and cons of both methods?
- Can I trust the curl method to run with persistent connection?
- What if the curl command stops working? Do I get an error message? I want to keep running this process in the background, which should run 24/7.
Note: I can not afford losing data in any method. The Webhooks are working perfectly as for now. But I want to explore this new curl method also.
Thanks in advance.