Network-Level API (synonymous to OSI’s application-layer protocols) refers to any network protocol used to exchange data between participating parties. These are used to build Application-Level APIs and usually follows an API Design Pattern
see similar page: Browser APIs which includes NON-network-level APIs (e.g. Web Audio, Web Components, etc)
Network-Level APIs
|
Network-Level APIs |
Purpose |
Description |
|---|---|---|
|
bi-directional communication |
| |
|
full-duplex communication |
| |
| ||
|
| |
|
| |
|
Network-Level API Comparisons
- WebSockets vs HTTP
- both run on top of TCP, WebSockets use HTTP for initial connection setup
- both allows persistent connections (HTTP Keep Alive)
- however, only WebSockets supports unsolicited communication from server to client (after HTTP initialize)
- WebSockets vs RSocket
- Websockets do not provide application-level backpressure, only TCP-based byte-level backpressure
- Websockets also only provide framing they do not provide application semantics. It is up to the developer to build out an application protocol for interacting with the websocket
- RSocket provides framing, application semantics, application-level backpressure, and it is not tied to a specific transport
- RSocket vs gRPC
- RSocket works in a web browser via Websockets, while gRPC requires additional code to be generated and deployed in order to work in browser
- RSocket has application level flow control while gRPC relies on HTTP/2 byte-based flow control