Skip to content

Experimental Dropwizard service in Kotlin for modeling products (SKU) and other metadata in a microservice.

Notifications You must be signed in to change notification settings

AnthonyHonstain/kotlin-dropwizard-product-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KotlinProductService

This was an experimental project for me to play with Dropwizard and Kotlin.

Toy microservice that models product information in a supply chain context.

I abandoned my work with Javalin and switched to Dropwizard https://bitbucket.org/honstain/javalin-inventory-service-v2/src/master/

Dependencies

Dropwizard

Version 2.0.23 Java framework for high-performance RESTful web services.

Dropwizard Metrics

I use the Dropwizard Metrics library to report to Graphite

There is a grafana dashboard record in grafanaDashboard.json that you can use to recreate the dashboard. This was the guide I used to run Grafana locally (Grafana and Graphite via docker-compose) https://www.linode.com/docs/guides/install-graphite-and-grafana/

Kafka

This uses the Dropwizard version of the Kafka client that utilizes the Apache Kafka client.

WARNING The integration test assumes there is a Kafka cluster to interact with, if you want to change that you can modify product-service-test-config.yml

Docker Compose

I have included in the folder docker-compose_stuff the configuration for the Grafan+Graphite stack and the Kafka+Kowl stack.

How to start the KotlinProductService application

  1. Run mvn clean install to build your application
  2. Start application with java -jar target/kotlin-product-service-1.0-SNAPSHOT.jar server config.yml
  3. To check that your application is running enter url http://localhost:7070

Health Check

To see your applications health enter url http://localhost:7071/healthcheck

About

Experimental Dropwizard service in Kotlin for modeling products (SKU) and other metadata in a microservice.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages