Screenshot 2023-11-23 at 12.37.07 PM.png

  1. SOAP - Simple Object Access Protocol -

    1. Works on XML
    2. Generally used in Banking application - Where reliability matters .
    3. Too complex and not suitable for smaller projects
  2. RESTful - Representational State Transfer Protocol -

    1. Sends JSON in response
    2. Client - server Model
    3. REST is easy to work with, but inefficient.
    4. There are limitations to its request-response model, and its data needs to be serialized for transmission, adding a performance overhead.
  3. GraphQL -

    1. Developed at Facebook
    2. It is a query Lang.
    3. It specifies what data should be received from the database.
    4. Reduces network load.
  4. gRPC - Google Remote Procedural Call

    1. Cross platform open source high performance RPC framework.
    2. Developed by Google.
    3. RPC was efficient but complex. It was used in 2000s
    4. In 2016 Google introduced gRPC.
    5. It allows a software to execute a function of another program over a network.
    6. High performance for micro-services.
  5. WebSockets

    1. Web Sockets V/S Web RTC(Real Time communication)
      1. Web sockets are Web RTC are almost similar.
      2. Web sockets makes use of TCP (Transfer Control Protocol). Each and every data packet is delivered and acknowledged. - CHAT System
      3. WebRTC makes use of UDP (Unified Datagram Protocol). Even if some packet are lost no worries. - VC app, Gaming.
    2. For real time system. Simple http is not sufficient because the server on its now cannot emit events for the client. It send response only when the client requests for it.

    Solution?

    1. HTTP Long Polling - The send the response every 1second or so. Even if it has nothing to send it will still send an empty respond. heavy res utiltisation and not effective.
    2. Web Socket - Establish a web socket connection between client and server.