Interview: Data Steams, Queue, Topic, Grid
Data Streams — The Kinesis/Event Hub
Primary use case is collecting, storing and processing real-time continuous data streams. Data streams are data that are generated continuously by thousands of data sources.
Use Cases
- Log and Event Data Collection
- Real-time Analytics
- “Internet of Things” Data Feed
- “Big Data”
Drawbacks of using Data Streams
- Operational burden when you need to manage shards for the data.
- Limited Read Throughput
Queue’s — The Bread and Butter of Messaging
A message queue makes it easy to decouple and scale microservices, distributed systems, and serverless applications
Azure Service Bus Relies on the following two concepts;
- Queues — SQS:
Queues work based on one-to-one communication model.
Messages in queues are delivered in “pull” mode which means that the receiver must ask for the particular message they need.
- Topics — SNS
Topics in Service Bus work as a one-to-many communication model.
Topics vary from Queues in a way where the subscribers will be notified when a message of their interest
If you are implementing a pattern which uses a Request/Reply message, then probably you should use Azure Service Bus.
Azure Event Grid
Service Bus implements an older style pull model in which the downstream subscriber actively polls the topic subscription for new messages
EventGrid:
Implements a push model in which events are sent to the EventHandlers as received, giving near real-time event delivery.
Unlike Azure Service Bus, Event Grid is tuned for fast performance and doesn’t support features like ordered messaging, transactions, and sessions.