Answer the question
In order to leave comments, you need to log in
WEBsokect and Rest API - replace each other?
Implemented REST API server on Laravel. Everything is according to Feng Shui, protocol best practices, error codes, etc.
But there was a need to tie the messenger to the server. If it’s still somehow clear with the database, then I don’t understand how web sockets get along with REST. And should they get along?
Or is it correct to rewrite zero, and when you open it, immediately start the session?
Sobsna question: do I need to combine rest and sockets, or switch exclusively to sockets?
It would be nice in the context of Laravel
Answer the question
In order to leave comments, you need to log in
Sobsna question: do I need to combine rest and sockets, or switch exclusively to sockets?Sobsna, as you want, do it: REST-police and Socket-Nazi do not exist. Fundamentally, the REST API is no different from the API on sockets (of course, I do not include push data from the server in this definition). When you need some data on the client, you must request it. And whether you will receive them via ajax or via sockets is completely unimportant. I have projects where the combinations are very different: from pure REST to pure sockets and everything in between.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question