How anhtranguyen-github/boomboombakudan works
Project type and purpose
• This is a real-time data-streaming pipeline for ingesting, processing, and persisting live market data from Binance.
• Key capabilities:
– A producer (BinanceProducer) that connects to Binance’s WebSocket, serializes messages (Avro), and publishes them.
– A messaging backbone (Redpanda) for buffering and distributing events.
– A consumer (BinanceConsumer) running on Spark that pulls messages, transforms/aggregates them, and writes results to Cassandra.
– Containerized deployment orchestrated via Docker Compose.
File structure
• Top-level directories:
– BinanceProducer/: Python scripts + Dockerfile + schemas/ + docker-compose.yaml
– BinanceConsumer/: Python/Spark code + Dockerfiles for Spark master/worker + Avro schemas + docker-compose.yaml
– Redpanda/: messaging broker compose file
– Cassandra/: Dockerfile + init scripts + compose file
– Root docker-compose.yaml ties everything together
• Patterns:
– Producer → Message Broker → Consumer → Database
– Use of Avro schemas for data contracts
– Spark cluster (master & worker) for scalable processing
– Docker Compose for local end-to-end orchestration
README
• Minimal content (“# BoomboomBakudan”) so piecing together architecture relies on file layout and Docker files.
a. Main components:
1. Binance WebSocket (external)
2. Producer container (BinanceProducer.py / binance-wss.py)
3. Redpanda cluster container
4. Consumer container(s) – Spark Master & Spark Worker
5. Cassandra cluster
6. Schema definitions (Avro) – could be shown as a shared contract/registry
7. Docker-Compose orchestration (root)
b. Relationships & interactions:
– Producer → Redpanda topic(s) (publish)
– Redpanda → Spark Consumer (subscribe)
– Spark Consumer → Cassandra (write)
c. Architectural patterns:
– Event-driven streaming pipeline
– Containerized microservices
– Schema-based messaging (Avro)
– Batch/stream processing on Spark
d. Key technologies:
– Python (Producers/Consumers)
– Apache Spark (stream processing)
– Redpanda (Kafka API-compatible broker)
– Apache Cassandra (NoSQL store)
– Docker & Docker Compose
– Avro schemas for serialization