Save data by websocket

Asked

Viewed 218 times

1

I am developing a system using Angularjs and Websocket (PHP or Nodejs I am still defining), where the information of the forms I intend to save via socket, ie by sending an array with the information and processing itas to save in the database and returning the confirmation, and similarly want to bring the data via socket.

All layouts being treated via Angularjs the most common is to bring via $http(), but I want to bring them via socket since I intend to keep ALL clients logged in.

I know that all this is possible, and I already have some parts working, what I really want is to know the risks I’m taking with this, server issue no problem, all elastic and self-balancing, question is performance and dynamic, is it worth all this work? At what point can this become a problem?

Adding... When a user saves content pertaining to a group, this information in addition to saving needs to be immediately passed on to the other group participants. I know we can make Time to Time requests to check if there is an update and such by ajax, but I believe that it becomes more dynamic by socket.

  • 1

    In my view, websockets serve for real-time applications where the server will trigger the update and not the client. What I mean is that operations such as saving the data of a form that does not imply updating on other clients can be done through simple AJAX requests. I believe it is better to use websockets only where it is really needed.

  • You mentioned an important point that I forgot to comment on, the updates generated by 1 user need to be passed on to others when they participate in the same group.

  • 1

    The whole question is based on the question know the risks I’m taking with this and is worth all this work? At what point can this become a problem?, then I’m sorry but all the answers will be based on opinions because you don’t have a problem in itself, you’ll only get implementation opinions the way the question was asked

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.