Giter Site home page Giter Site logo

kafkazavr's Introduction

kafkazavr

How to use Kotlin and Ktor to build applications which share geographical coordinates.

Map functionality

Run Rider and Driver apps separately

Add command line argument:

  • For driver app: -config=src/main/resources/driver.conf

  • For rider app: -config=src/main/resources/rider.conf

To run both modules in the same application, just run as usual, without -config. In this case, application.conf will be used

Run Rider and Driver apps separately
./gradlew build #(1)
java -cp build/libs/org.kafkainaction.klyft-all.jar io.kafkazavr.ApplicationKt -config=src/main/resources/driver.conf #(2)
java -cp build/libs/org.kafkainaction.klyft-all.jar io.kafkazavr.ApplicationKt -config=src/main/resources/rider.conf  #(3)

# or same with Gradle application plugin
./gradlew run --args="-config=src/main/resources/driver.conf" #(2)
./gradlew run --args="-config=src/main/resources/rider.conf"  #(3)
  1. build shadow jar

  2. run driver app

  3. run rider app

Kafka

docker stuff
# TODO: replace with TC
./gradlew composeUp    #(1)
docker exec -it broker /usr/bin/kafka-topics --bootstrap-server broker:9092 --list    #(2)

docker exec -it broker /usr/bin/kafka-console-consumer --topic driver --bootstrap-server broker:9092 --property print.key=true --from-beginning #(3)
docker exec -it broker /usr/bin/kafka-console-consumer --topic rider --bootstrap-server broker:9092 --property print.key=true --from-beginning #(4)
  1. start zk and ak

  2. check if everything is there

  3. read driver topic

  4. read rider topic

Open browser at http://localhost:9080 for Redpanda Kafka Console

rpconsole list of topics
Figure 1. Check if rider and driver topics are there
rpconsole driver topic
Figure 2. Check if data streams through driver(rider) topics

kafkazavr's People

Contributors

antonarhipov avatar gamussa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.