A Simple Fraud Detection System With Kafka And Python.
Prerequisites:
- A Kafka broker.
- A Zookeeper instance.
- A Python instance.
Introduction:
A simple fraud detection mechanism which produces fake transactions on one end, and filters and logs those that look suspicious on the other end. This will involve a transaction generator and a fraud detector.
Technologies:
Flask --> is a micro-framework used by python developers.
Apache Kafka --> is a streaming data platform that works by ingesting, transforming and distributing data on the fly.
Zookeeper --> is a coordination software, distributed as well, used by Apache Kafka to keep track of the cluster state and members.
SSE --> Server-Sent Events is a mechanism for sending updates from a server to a client.
Requirements.txt
-
Flask 1.1.2
-
Jinja2 2.11.2
-
Kafka-python 2.0.2
Screenshots:
Transactions Producer:
Transactions Detector:
Transactions Detector using Flask and SSE: