Message Queues

Message Queues

let’s 1st answer these questions

1. What does it mean that web sockets are bidirectional? Why is this useful? Whereas HTTP relies on a client request to receive a response from the server for every exchange, WebSockets allow for full-duplex bidirectional communication. This enables the server to send real-time updates asynchronously, without requiring the client to submit a request each time.

2. Does socket.io use HTTP? Why? socket.io server will attach to an HTTP server so it can serve its own client code through /socket.io/socket.io.js .

3. What happens when a client emits an event? The server will start listening to the event

4. What happens if a client “misses” an event? the messages will be ignored

5. What happens when a server emits an event? will send a message to all connected clients

Vocabulary Terms


Message Queue

What is Message Queue?

  1. A message queue is a form of asynchronous service-to-service communication used in serverless and microservices architectures.

  2. Messages are stored on the queue until they are processed and deleted.

  3. Each message is processed only once, by a single consumer.

  4. Message queues can be used to decouple heavyweight processing, to buffer or batch work, and to smooth spiky workloads.

Rooms and Namespaces

What is Room?

A room is an arbitrary channel that sockets can join and leave. It can be used to broadcast events to a subset of clients

So :

What are Namespaces?




BACK TO MAIN PAGE