Posts

Showing posts from August, 2017

Dropwizard MySQL Integration Tutorial

Image
Dropwizard MySQL Integration Tutorial Introduction         Dropwizard is one of the most popular and most used frameworks for building microservices. I am assuming that you have a Basic Knowledge of Dropwizard and have a Basic Dropwizard Application running in your machine. If not, please check my blog on Basic Dropwizard Application by going to the link:  Dropwizard Tutorial . In this tutorial, we will be integrating a Dropwizard Application with MySQL Database, which is a relational database, to perform CRUD operations. The same steps can be followed to connect to any other relational database. Requirements to Run the Application: Java Maven MySQL Database IDE of your choice MySQL Database should be setup and running in your machine. To setup, run and test if the MySQL Database is working fine, please refer to my post on: MySQL Database Setup . In this post, I am using a simple Employee Table to perform CRUD operations. Here is the s...

Dropwizard Kafka Tutorial

Image
Dropwizard Kafka Tutorial Introduction         In this tutorial, we will be integrating a Dropwizard Application with Kafka Producer  using Kafka Producer API. Through RESTful API in Dropwizard we will send messages to a Kafka topic through a Kafka Producer. We will also be using a Java based Kafka Consumer using Kafka Consumer API to consume and print the messages sent from the Dropwizard application.  So there are 2 Applications required to get the end to end functionality: Dropwizard Application with Kafka Producer API Java Kafka Consumer Application with Kafka Consumer API Kafka         Kafka is a distributed streaming platform. It can be used for communication between applications or micro services. Kafka is ideally used in big data applications or in applications that consume or process huge number of messages. Some use cases where Kafka can be used: Messaging Website activity tracking Metrics Log aggr...

Spring Boot Kafka Tutorial

Image
Spring Boot Kafka Tutorial Introduction         In this tutorial, we will be integrating a Spring Boot Application with Kafka Producer  using Kafka Producer API. Through RESTful API in Spring Boot we will send messages to a Kafka topic through a Kafka Producer. We will also be using a Java based Kafka Consumer using Kafka Consumer API to consume and print the messages sent from the Spring Boot application.  So there are 2 Applications required to get the end to end functionality: Spring Boot Application with Kafka Producer API Java Kafka Consumer Application with Kafka Consumer API Kafka         Kafka is a distributed streaming platform. It can be used for communication between applications or micro services. Kafka is ideally used in big data applications or in applications that consume or process huge number of messages. Some use cases where Kafka can be used: Messaging Website activity tracking Metrics Log aggrega...

Dropwizard Guava Cache Tutorial

Image
Dropwizard Guava Cache Tutorial Introduction          I am assuming that you have a Basic Knowledge of Dropwizard and have a Basic Dropwizard Application running in your machine. If not, please check my blog on Basic Dropwizard Application by going to the link:  Dropwizard Tutorial         Well firstly why is caching needed in any application? There may be operations in your application that access data from a database or data from some other application. This data may not change frequently or it may be static data. Calling any other service for data is a very costly operation and may slow down your application. Memory savings will result in an optimized and quick application. For any such frequent data fetch operations we can create a basic Key Value based cache in the application. This cache gets populated when the data fetch service is called the first time. All subsequent calls will fetch the same data from the populated ca...