![]() WebSockets was more like a workaround for implementing server push back when it was not available in the HTTP/1.1 protocol, and long polling was the only option. HTTP/2 is an implementation detail of gRPC, and actually, it could be implemented using WebSockets, but WebSockets would not add much on top of bare TCP communication (except for the security layer in case of wss://) You define everything in a proto file, and the statically typed (depends on the language) client and server codes are generated. On top of the bare communication protocol itself, gRPC handles a lot more. Here is a link to one I like: Will WebSocket survive HTTP/2? Compared to REST and SOAP, JSON-RPC is relatively narrow in scope. If you like JSON, you may prefer instead to use JSON-RPC, a protocol introduced in the mid-2000s. The HTTP/2 vs WebSockets comparison is more interesting in my opinion. While REST supports RPC data structures, it’s not the only API protocol in this category. That said, comparing gRPC to WebSockets is a bit like apple to oranges. gRPC is intranet level, its for internal services talk with each other. REST is internet level, its for end user talk with our service. otherwise we can use gRPC for high performance. REST is best for resource oriented services. With WebRTC you may achive low-latency and smooth playback which is crucial stuff for VoIP communications. While WebSocket defines a protocol for bi-directional communication between client and server, it does not put any condition on the message to be exchanged. With websocket streaming you will have either high latency or choppy playback with low latency. REST (Representational State Transfer) is an architectural style which puts a set of constraints on HTTP to create web services. WebSocket is an older standard part of the HTML5 Features, whereas gRPC is a complete remote procedure call mechanism. I always feels gRPC and REST are absolutely two different things. Thus main reason of using WebRTC instead of Websocket is latency.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |