Messaging Patterns

Request-Response

Model

  • Client sends a request
  • Server parses the request: Where does a request begin and end?
  • Server processes the request: Example, Deserializing JSON and then processing.
  • Server sends a response
  • Client parses the response and consume

Anatomy

  • Client and server need to define and agree upon the request/response structure.
  • Request/response has a boundary
  • Defined by protocol and message format.

Where is it used?

  • Web, HTTP, DNS, SSH.
  • Remote Procedure Call (RPC)
  • SQL and database protocols
  • APIs (REST/SOAP/GraphQL)

Where it doesn't work well?

  • Notification Service
  • Chat Applications
  • Very Long requests - What if client disconnects?

Polling

Or short-polling.

  • Request takes long time to process

Push

Use case

  • Client wants real-time notification from server.

Examples

  • User just logged in
  • Message just recieved (chat app)

Cons

  • Client must be online
  • Client must be able to handle

© 2025 All rights reservedBuilt with Flowershow Cloud

Built with LogoFlowershow Cloud