What are the advantages and disadvantages of using only socket based communication vs a hybrid of REST and socket (using socket only when bidirectional communication is necessary, like receiving messages in a chat).
When I say only socket, I mean that instead of sending a GET request asking for /entities
, I'd send update_needed
and the server would send a push via socket.
My question is not really about performance, it's more about the concept, like delegate
vs block/lambda
(using socket would be like the delegate concept and REST is more like block).