Emostream is a real-time, scalable emoji reaction system built for live streaming platforms like Hotstar. It captures billions of user-generated emojis during live events, processes them in real-time using distributed technologies, and streams meaningful visualizations back to viewers to boost engagement.
- ⚡ Real-time emoji ingestion and processing
- 🧠 Spark Structured Streaming aggregation
- 🔁 Kafka-powered event pipelines
- 🌐 Scalable WebSocket & SSE-based emoji delivery
- 🧪 Unit & load tested for high concurrency
- 🔄 Horizontally scalable architecture
- 🛠️ Plug-and-play simulation via emoji generator
| Layer | Tool/Framework |
|---|---|
| API | Flask + Eventlet |
| Messaging | Apache Kafka |
| Processing | Apache Spark (Structured Streaming) |
| Realtime I/O | SSE, WebSocket |
| Scaling | Redis, Nginx |
| Testing | Pytest, Locust |
Emostream/
├── flasky.py # Main Flask API server
├── main-publisher.py # Publishes aggregated data
├── cluster-publisher.py # Broadcasts data to subscribers
├── cluster-subscriber.py # Client-facing real-time stream
├── spark-processing.py # Spark Streaming job
├── emoji-generator.py # Simulated emoji generator
├── client.py # Client emoji sender
├── client_recieve.py # Client emoji listener
├── locustfile.py # Load testing with Locust
├── test_*.py # Unit tests
pytest test_flasky.py
pytest test_sendkafka.py
pytest test_sparkAgg.pylocust -f locustfile.pyThen open http://localhost:8089 to simulate concurrent emoji senders.
git clone https://github.com/mokshablr/Emostream.git
cd Emostream- Ensure Kafka is running on localhost.
- Start the Spark job:
spark-submit --packages org.apache.spark:spark-sql-kafka-0-10_2.12:3.1.2 spark-processing.pypython flasky.py # Add ports for scaling: flasky.py 5001, etc.python main-publisher.py
python cluster-publisher.py
python cluster-subscriber.pypython emoji-generator.pypython client_recieve.py- 📊 Live emoji heatmaps for sports events
- 💬 Sentiment wave tracking during political debates
- 👨👩👧👦 Community engagement visualization on OTT platforms
- 🚀 Real-time dashboards for mass-scale viewer input
- NLP-based sentiment analytics
- Mobile client SDK
- Auto-scaling via Kubernetes
- UI dashboard for emoji trend graphs

