WebSockets
Comparisons of API Architectural Styles
RESTful APIs using JSON on the HTTP protocol is by far the most popular approach to creating web APIs. The three key aspects for these different types: Design Philosophy/Pattern (e.g. RESTful vs GraphQL) Communication Protocol (e.g. HTTP vs WebSockets) Encoding (e.g.
https://www.moesif.com/blog/api-guide/comparisons-of-api-architectural-styles/

What is the difference between Socket and RPC?
PS: Confusion arise while reading Operating System Concepts by Galvin That's your problem right there. A remote procedure call (RPC) is high level model for network communication. There are numerous RPC protocols in existence. In the RPC model, your underlying implementation creates a stub for each remote procedure.
https://stackoverflow.com/questions/46128598/what-is-the-difference-between-socket-and-rpc

Seonglae Cho