Oh really. Thanks for the correction! Why does it wait for a socket message instead of using the REST/API response of the request?
I guess what I’m trying to figure out is how socket messages can be integrated into a traditional json API without causing collisions. For example, my client makes an API post request, the server sends the success/fail response, and the client uses that to insert the object into the view or show an error. Then the other connected clients should get a socket message updating them with what happened.
Is there a good way to combine these two technologies or do I have to give up on the json api and move purely towards socket messaging?
Meteor uses purely sockets, but that isn’t necessarily related. You could easily just ignore the API response and wait for an update over the websocket. I feel like that wouldn’t really introduce any more burden on the server or the client, and you can avoid having a ton of special cases on your code to send updates to everyone except the client that made the write.