A toy project of markting platform to manage call by using Spark Streaming
as stream processor, Django
as back-end, SB Admin 2
as front-end template and Redis
as Message Queue.
This is final project for ELEN E6889 Large-Scale Stream Processing @ Columbia.
Our project implement a rule-based marketing platform to manage Call Detail Record(CDR). We develop a Data Generator to simulate real-time CDR data. Streaming is achieved by message queue based on Redis and the queue manager, which is used to simulate subscriber mode. Five templates are developed based on Spark streaming to analyzed the streaming data. We choose Django framework to integrate the front-end and back-end and interact with the front-end UI. The front-end UI provides visualization of our results and the control of the back-end. Optimization and streaming algorithms are implemented to improve the performance of our system. We discuss how the size of data stream would affect the CPU utilization.
See more about our system from report
.
├── doc
├── pic
├── cdr_controller # -> Django back-end core
│ ├── data_generator.py # -> workload generator
│ ├── filters # -> different templates to process streams
│ │ ├── template_01.py
│ │ ├── ...
│ │ └── template_05.py
│ ├── get_result.py # -> get real-time result
│ ├── queue_manage.py # -> Django back-end core
│ ├── settings.py # -> Django setting
│ ├── urls.py # -> Django urls
│ ├── views.py # -> Django views: render HTML and data
│ └── wsgi.py # -> Django file
├── res # -> tmp result used in front-end
├── static # -> js packages used in front-end
├── templates # -> HTML files shown in front-end
├── db.sqlite3
├── manage.py # -> Django deploy file
├── LICENSE
├── CONTRIBUTING.md
└── README.md
-
Python3
: python3 environment and pippip3 install Django
: install Django frameworkpip3 install uuid
: install uuid to generate uuidpip3 install redis
: install redis package in Python3pip3 install phonenumbers
: install phone number package in Python3pip3 install numpy pandas
: install numpy and pandas in Python3pip3 install pyspark
: install Spark package in Python3
-
Redis
: installRedis
. For more details, please see Get Started with Redissudo apt update sudo apt install redis-server
-
Spark
: installSpark
, if don't want to built-inSpark
environment provide bypyspark
- For more details, please see Spark Documentation
run Django
server on localhost:8000
# at root directory
python3 manage.py runserver localhost:8000
-
Homepage
-
Dashboard
-
Workload Generator
-
Templates:
-
Policy & Plan page
See more details about how we design this project, how we implement each components, what algorithms we applied to optimize stream processing from report
- Proposal: proposal pdf
- Report: report pdf
- Presentation: presetation slides
- Workload Generator: Wenjie Chen, Yanchen Liu
- Queue Manager: Yanchen Liu, Chong Hu
- Templates: Wenjie Chen, Chong Hu
- Django back-end construction: Chong Hu, Yanchen Liu
- Front-end: Chong Hu
- Documentation: Wenjie Chen, Chong Hu, Jiajing Su, Yanchen Liu
First, we would like to thank Professor Deepak S. Turaga. Without you, we can never finish our final project from scratch. Thank you for the instructions and help of a whole semester!
Second, we would like to thank all the authors and the contributors of our reference material. They have done a great work before us.
Copyright (c) 2020. All rights reserved.
The code is distributed under a MIT license. See LICENSE
for information.