Phone Center Architecture using Play, Akka, Scala, Kafka, Kamon & Datadog
Created during the third year at Ariel University in the
Department of Computer Science, 2020
Project site: https://github.com/ZviMints/PhoneCenter
Made by: Zvi Mints, and Eilon Tsadok
-
Open the terminal in this path:
PhoneCenter/CallProducer/and runsbt clean runProd -Dhttp.port=8080 -
Open the terminal in this path:
PhoneCenter/CallConsumer/and runsbt clean runProd -
Start the MongoDB server.
-
run the Kafka server by the following commends:
bin/zookeeper-server-start.sh config/zookeeper.propertiesbin/kafka-server-start.sh config/server.properties -
Start Redis with Kitematic on
localhost:6379 -
Open https://apm.kamon.io/demo/demo/dashboards/ to get analytics.
-
Open the browser and go to the url https://localhost:8080/ and start to answer calls.
We have developed an asynchronous system that aims to simulate the architecture of a phone call center:
Flow: (CallProducer Service)
- When user press
setbutton with new number of waiting calls, The number is sent to route named/totalWaitingCallswhich aims to send a new message to Kafka with that number on topicmonitorTopicwhich is env variable. - The user enters a call by clicking the
סיוםbutton. - The call is sent to route named
/sendwhich aims to enter the call with theReadystatus into MongoDB. - There is Akka's Actor who from time to time gets all the calls with the Ready status and locks them (in order to avoid Race Conditions).
- The Actor sends the message to Kafka on topic
callsTopicwhich is env variable.
Flow: (CallConsumer Service)
- As soon as the app goes up there is an Actor who wakes up and listens to Kafka.
- Once there is a new message, the call is being saved into the cache (when the cache is implemented by Redis) for 12 hours.
- There is an update of new metrics by Kamon.
- There is a send from Kamon to APM Kamon Dashboard which graphically displays the information.







