dimanche 17 novembre 2019

Advantages and disadvantages of mixing Http and websockets when building a chat app?

I have seen this question, but it asks if it is okay to use http only and avoid websockets completely when building a chat app.

My situation is:

I have a simple chat app I am building. When sending a new message I am using an Http Post request(I am using Angular) to send the data to the server where it is persisted in the database, then is broadcasted via sockets to the appropriate clients. Are there any advantage or disadvantages of doing it like this? Instead of just using web sockets throughout?

According to this answer you should avoid using sockets where possible.

Aucun commentaire:

Enregistrer un commentaire