Internet of Things – 7th Semester : Rajasthan Technical University | Bikaner Technical University – Full Course (7CS4-01)
About Lesson

IoT Communication APIs

  1. REST based communication APIs(Request-Response Based Model) : Representational State Transfer (REST), every time the client wants to retrieves data from a server a connection needs to be established. A client sends a request, which is received by server. The server then processes the request and sends the response back to the client. REST is unidirectional, that’s why there is more overhead.
    RESTful web service is a collection of resources which are represented by URIs. RESTful web API has a base URI(e.g: http://example.com/api/tasks/). The clients and requests to these URIs using the methods defined by the HTTP protocol(e.g: GET, PUT, POST or DELETE). A RESTful web service can support various internet media types.
  2. WebSocket based communication APIs(Exclusive Pair Based Model) : WebSocket-based communication API, over TCP connection: the connection with the server is established only once which is done by initial handshake with the server. The server can send data at any time and the client can handle receiving that data, the client can also send other requests to the server. WebSocket APIs follow the exclusive pair communication model.
Exercise Files
No Attachment Found
No Attachment Found
Join the conversation