Skip to content

A sample application with Go, Java, Javascript, Kafka and Postgres

License

Notifications You must be signed in to change notification settings

zidoshare/microservices-demo

 
 

Repository files navigation

Microservices Demo

A demo application with Java, Go, Javascript, Kafka and PostgresQL.

Architecture

Architecture diagram

  • A front-end web app in Java which lets you vote between Tacos and Burritos
  • A Kafka queue which collects new votes
  • A Golang or worker which consumes votes from Kafka and stores them in PostgresQL
  • A PostgresQL database
  • A Node.js webapp which shows the results of the voting in real time

Run the demo application in Okteto

$ git clone https://github.com/okteto/microservices-demo
$ cd microservices-demo
$ okteto login
$ okteto deploy

Develop on the Result microservice

$ okteto up result

Develop on the Vote microservice

$ okteto up vote

Develop on the Worker microservice

$ okteto up worker
$ make start

Notes

The voting application only accepts one vote per client. It does not register votes if a vote has already been submitted from a client.

This isn't an example of a properly architected perfectly designed distributed app... it's just a simple example of the various types of pieces and languages you might see (queues, persistent data, etc), and how to deal with them in Okteto.

About

A sample application with Go, Java, Javascript, Kafka and Postgres

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 24.8%
  • Smarty 19.3%
  • JavaScript 14.1%
  • CSS 13.4%
  • HTML 12.7%
  • Go 9.6%
  • Other 6.1%