Big Data & Tools with NoSQL
  • Big Data & Tools
  • ReadMe
  • Big Data Overview
    • Overview
    • Job Opportunities
    • What is Data?
    • How does it help?
    • Types of Data
    • The Big 4 V's
      • Variety
      • Volume
      • Velocity
      • Veracity
      • Other V's
    • Trending Technologies
    • Big Data Concerns
    • Big Data Challenges
    • Data Integration
    • Scaling
      • CAP Theorem
      • Optimistic concurrency
      • Eventual consistency
      • Concurrent vs. Parallel Programming
    • Big Data Tools
    • No SQL Databases
    • What does Big Data learning means?
  • Linux & Tools
    • Overview
    • Linux Commands - 01
    • Linux Commands - 02
    • AWK
    • CSVKIT
    • CSVSQL
    • CSVGREP
  • Data Format
    • Storage Formats
    • CSV/TSV/Parquet
    • Parquet Example
    • JSON
    • HTTP & REST API
      • Terms to Know
        • Statefulness
        • Statelessness
        • Monolithic Architecture
        • Microservices
        • Idempotency
    • REST API
    • Python
      • Setup
      • Decorator
      • Unit Testing
      • Flask Demo
      • Flask Demo - 01
      • Flask Demo - 02
      • Flask Demo - 03
      • Flask Demo - 04
      • Flask Demo - 06
    • API Testing
    • Flask Demo Testing
    • API Performance
    • API in Big Data World
  • NoSQL
    • Types of NoSQL Databases
    • Redis
      • Overview
      • Terms to know
      • Redis - (RDBMS) MySql
      • Redis Cache Demo
      • Use Cases
      • Data Structures
        • Strings
        • List
        • Set
        • Hash
        • Geospatial Index
        • Pub/Sub
        • Redis - Python
      • Redis JSON
      • Redis Search
      • Persistence
      • Databases
      • Timeseries
    • Neo4J
      • Introduction
      • Neo4J Terms
      • Software
      • Neo4J Components
      • Hello World
      • Examples
        • MySQL: Neo4J
        • Sample Transactions
        • Sample
        • Create Nodes
        • Update Nodes
        • Relation
        • Putting it all together
        • Commonly used Functions
        • Data Profiling
        • Queries
        • Python Scripts
      • More reading
    • MongoDB
      • Sample JSON
      • Introduction
      • Software
      • MongoDB Best Practices
      • MongoDB Commands
      • Insert Document
      • Querying MongoDB
      • Update & Remove
      • Import
      • Logical Operators
      • Data Types
      • Operators
      • Aggregation Pipeline
      • Further Reading
      • Fun Task
        • Sample
    • InfluxDB
      • Data Format
      • Scripts
  • Python
    • Python Classes
    • Serialization-Deserialization
  • Tools
    • JQ
    • DUCK DB
    • CICD Intro
    • CICD Tools
      • CI YAML
      • CD Yaml
    • Containers
      • VMs or Containers
      • What container does
      • Podman
      • Podman Examples
  • Cloud Everywhere
    • Overview
    • Types of Cloud Services
    • Challenges of Cloud Computing
    • High Availability
    • Azure Cloud
      • Services
      • Storages
      • Demo
    • Terraform
  • Data Engineering
    • Batch vs Streaming
    • Kafka
      • Introduction
      • Kafka Use Cases
      • Kafka Software
      • Python Scripts
      • Different types of Streaming
    • Quality & Governance
    • Medallion Architecture
    • Data Engineering Model
    • Data Mesh
  • Industry Trends
    • Roadmap - Data Engineer
    • Good Reads
      • IP & SUBNET
Powered by GitBook
On this page
  1. NoSQL
  2. Redis
  3. Data Structures

Pub/Sub

PreviousGeospatial IndexNextRedis - Python

Last updated 1 year ago

Redis Pub/Sub (Publish/Subscribe) is a messaging paradigm within Redis that allows for message broadcasting through channels. This feature enables the development of real-time messaging applications by allowing publishers to send messages to an unspecified number of subscribers asynchronously.

Notifications and Alerts

For applications that need to notify users of events in real time (such as social media notifications, stock alerts, or emergency alerts), Redis Pub/Sub provides a lightweight and fast way to distribute messages.

Live Data Updates

In dashboard applications or live data feeds (such as sports scores, financial market data, or IoT sensor data), Redis Pub/Sub can push updates to clients as soon as new data is available.

Decoupling Microservices

Redis Pub/Sub can be a messaging backbone to decouple microservices architectures. Services can publish events or messages without knowing the details of which services are subscribed to those events. This promotes loose coupling, making the system more scalable and easier to maintain.

Limitations

1. Message Persistence

2. Lack of Delivery Acknowledgment

3. Filtering and Routing - Lacks advanced filtering other than basic * (asterisk)

4. Resource Utilization

Because Redis operates in memory, high volumes of messages or large numbers of subscribers can lead to significant memory and network bandwidth usage. Planning and monitoring resource utilization becomes critical as the messaging system grows in scale.

Client 1

subscribe class_update_channel 
subscribe school_update_channel

Client 2

psubscribe *_channel bigdata_class_mates

Producer

publish class_update_channel "Hello class"
publish school_update_channel "who is graduating this summer?"
publish glassboro_channel "welcome to Glassboro"
PING
PSUBSCRIBE
PUNSUBSCRIBE
QUIT
RESET
SUBSCRIBE
UNSUBSCRIBE