Skip to content

gAmUssA/klyfft

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
 
 
 
 
img
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

kLyfft

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 ๐Ÿคข)

scala 1 kotlin 1

Warning
Flame ๐Ÿ”ฅ War warning! The demo is written with Groovy (mostly build scripts) and Kotlin. Because why not? ๐Ÿ’ƒ

Into

The application consists of Web UI (driver and rider). A rider initiates a, and the driver picks her.

driver picks rider

How to build

./gradlew clean build

How to run

Prerequisites

  • Confluent Platform Enterprise 5.x [1]

    • download it

    • unizip to any folder

    • add folder to PATH variable

      export 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)
      1. a neat little alias that can save few symbols to type

      2. start Kafka (zookeeper will be started automatically as a dependency)

Web App

  1. Obtain an API key from [mapbox.com](https://www.mapbox.com/)

  2. Start the Play web app: MAPBOX_ACCESS_TOKEN=YOUR-MAPBOX-API-KEY ./gradlew bootRun

  3. on the Rider UI select where do you want to travel

  4. on the Driver UI select rider and enjoy the ride!

Docker

  1. Build a docker image

    ./gradlew jib
  2. Deploy to Kubernetes

    kubectl create -f deployment.yaml

Deployment with Kotlin Kubernetes DSL

Create Application Config
./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)
  1. Deploy application secrets

  2. check the secret

  3. Deploy the app

  4. Undeploy the app

About

๐Ÿš• kLyfft app - lyft-like event-driven application

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published