┌──Payments───────┐ _._
│ ┌─────────────┐ │ _.-``__ ''-._
│ │ Terminal │ │ _.-`` `. `_. ''-._
│ └─────────────┘ │ .-`` .-```. ```\/ _.,_ ''-._
└────────┬────────┘ ( ' , .-` | `, )
│ |`-._`-...-` __...-.``-._|'` _.-'|
│ | `-._ `._ / _.-' |
▼ `-._ `-._ `-./ _.-' _.-'
┌─────────────────┐ |`-._`-._ `-.__.-' _.-'_.-'|
│ Apache Kafka │◀─────| `-._`-._ _.-'_.-' |
└─────────────────┘ `-._ `-._`-.__.-'_.-' _.-'
▲ |`-._`-._ `-.__.-' _.-'_.-'|
│ | `-._`-._ _.-'_.-' |
│ `-._ `-._`-.__.-'_.-' _.-'
│ `-._ `-.__.-' _.-'
│ `-._ _.-'
│ `-.__.-'
│
┌─────────────┐ ┌───────────────┐ ┌─────────────┐
│ Logstash │─────▶│ Elasticsearch │◀───│ Kibana │
└─────────────┘ └───────────────┘ └─────────────┘
Last active
January 22, 2019 17:19
-
-
Save cinhtau/ce939bbb1944f1c4fd0297ec56c7e922 to your computer and use it in GitHub Desktop.
Demo Time
Confluent Open Source Platform
cd demos/confluent-5.1.0
bin/confluent start
Dockerized OSS Kafka cluster
cd development/projects/kafka-docker-compose/standalone
docker-compose up -d
Start Producer
source activate rasp_pi
python auto_producer.py
Open Control Center, check topic auto_trnx
redis-server /usr/local/etc/redis.conf
cd ~/lucky_lunch/streaming-demo
source activate rasp_pi
python auto_consumer.py
Open flask
cd ~/lucky_lunch/streaming-demo
source activate rasp_pi && cd flask
python run.py
Endpoint Elastic Cloud
# Start Logstash demo
cd demos/logstash-6.5.4
bin/logstash -f ../logstash-config/finance/streaming-payments.conf
Open Kibana
┌────────────────┐
┌───────────┐ ┌────▶│ Issuer │
│ │ │ └────────────────┘
│ Merchant │ ┌───────────────────┐ │
│ Terminal │──▶│ Payment Processor │────┤
│ │ └───────────────────┘██ │
└───────────┘ ████████│████████████ │ ┌────────────────┐
████████│████████████ └────▶│Fraud Detection │
│ └────────────────┘
│ │
▼ │
┌───────────────────┐ │
│ Elasticsearch │◀──────────────────┘
└───────────────────┘
Start filebeat for ingesting fraud transactions
cd lucky_lunch/filebeat-6.4.3-darwin-x86_64
./filebeat
Open project test-data-generator
Run FraudStatisticClient
Open Fraud Monitor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PUT _template/payments | |
{ | |
"index_patterns": [ | |
"payments-*" | |
], | |
"settings": { | |
"number_of_shards": 1 | |
}, | |
"mappings": { | |
"doc": { | |
"dynamic": "strict", | |
"properties": { | |
"@timestamp": { | |
"type": "date" | |
}, | |
"@version": { | |
"type": "keyword" | |
}, | |
"name": { | |
"type": "text", | |
"analyzer": "english", | |
"fields": { | |
"keyword": { | |
"type": "keyword" | |
} | |
} | |
}, | |
"geocode": { | |
"type": "geo_point" | |
}, | |
"address": { | |
"properties": { | |
"city": { | |
"type": "keyword" | |
}, | |
"state": { | |
"type": "keyword" | |
}, | |
"street_number": { | |
"type": "keyword" | |
}, | |
"zip": { | |
"type": "keyword" | |
}, | |
"street_name": { | |
"type": "text", | |
"analyzer": "english" | |
} | |
} | |
}, | |
"amount": { | |
"type": "float" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment