/async-facade-poc

POC for async rest facade dispatching requests to and reading responses from Kafka

Primary LanguageJava

Async Facade POC

POC for async rest facade dispatching requests to and reading responses from Kafka

Flow

+------------+           +----------------+  -->  +-----+  -->  +-----------------+
|api-loadtest|  -http->  |async-api-facade|       |Kafka|       |async-worker-mock|
+------------+           +----------------+  <--  +-----+  <--  +-----------------+

Getting Started

Clone and build project

git clone git@github.com:hey-johnnypark/async-facade-poc.git && cd async-facade-poc && mvn clean install

Start Kafka (using Docker)

docker run --rm -p 2181:2181 -p 9092:9092 -e ADVERTISED_HOST=127.0.0.1 johnnypark/kafka-zookeeper

Start async-mock-worker

java -jar async-worker-mock/target/async-worker-mock-1.0-SNAPSHOT.jar

Start async-api-facade (2 instances)

java -Dvertx.hazelcast.config=classpath:cluster-5701.xml -jar async-api-facade/target/async-api-facade-1.0-SNAPSHOT.jar --http.port=8080
java -Dvertx.hazelcast.config=classpath:cluster-5702.xml -jar async-api-facade/target/async-api-facade-1.0-SNAPSHOT.jar --http.port=8081

Run loadtest

java -jar api-loadtest/target/api-loadtest-1.0-SNAPSHOT-jar-with-dependencies.jar