the kLyfft app - event-driven app
A uber-like event-driven application example
Note
|
inspired by James Ward’s Koober but much better because Kotlin and Spring Boot used (not Scala 🤮 and Play 🤢) |
Warning
|
Flame 🔥 War warning! The demo is written with Groovy (mostly build scripts) and Kotlin. Because why not? 💃 |
-
Confluent Platform Enterprise 5.x [1]
-
download it
-
unizip to any folder
-
add folder to
PATH
variableexport CONFLUENT_PLATFORM_VERSION=5.1.0 export CONFLUENT_HOME=~/projects/confluent/confluent-ent/$CONFLUENT_PLATFORM_VERSION export PATH=$CONFLUENT_HOME/bin:$PATH alias cnfl="confluent" #(1) cnfl start kafka #(2)
-
a neat little alias that can save few symbols to type
-
start Kafka (zookeeper will be started automatically as a dependency)
-
-
-
Obtain an API key from [mapbox.com](https://www.mapbox.com/)
-
Start the Play web app:
MAPBOX_ACCESS_TOKEN=YOUR-MAPBOX-API-KEY ./gradlew bootRun
-
on the Rider UI select where do you want to travel
-
on the Driver UI select rider and enjoy the ride!
./gradlew :deployment:createApplicationConfig -PconfigPath=$PWD/app/src/main/resources/application.properties #(1)
kubectl get secret application-config -o yaml #(2)
./gradlew :deployment:deploy #(3)
kubectl get deployments
./gradlew :deployment:undeploy #(4)
-
Deploy application secrets
-
check the secret
-
Deploy the app
-
Undeploy the app