I was recently told by the Particle support team that publishing an event from from Electron and having a second electron subscribe to it was not the most sure way of having the message delivered. Instead they suggested that I use webhooks with a 3rd party web service which I have since then.
So now, Electron 1 publishes an event to a webhook which makes a POST request to a database on my web service. My web service stores the data to a database and then sends the contents of the original message as the response to the original webhook which then gets pushed to an event that Electron 2 is listening on. And thus, Electron 2 gets the message that Electron 1 sent. And it’s also now stored on my server.
Can someone please verify that this is a more reliable solution for sending a message from one electron to the other? Because to me, this sounds like the same technology being used on the Particle cloud to actually send the response back down to the second Electron as my first example.
Also, if I independently publish an event from my web service to an Electron subscribing to that event, will that be as [un]reliable as my first example of pub/sub between two Electrons? I’m guessing the answer is yes for the connection between the cloud and receiving electron.
Is there a better/efficient way to be doing this? Any help is much appreciated!