Posts

Showing posts from September, 2017

REST API and CRUD Operations with Akka HTTP

Image
REST API and CRUD Operations with Akka HTTP Introduction         In this post, we will be creating an Akka HTTP Application with GET, POST, PUT and DELETE APIs for CRUD operations on an Employee Domain class. All data will be kept in memory in a Vector. Akka HTTP         The Akka HTTP modules implement a full server- and client-side HTTP stack on top of akka-actor and akka-stream. It’s not a web-framework but rather a more general toolkit for providing and consuming HTTP-based services.  Most important features that Akka HTTP provides are:                Asynchronous processing  Non blocking I/O operations  For more details on Akka HTTP, you can check: Akka HTTP Website . Requirements to Run the Application: 1. Intellij IDE with SBT and Scala Plugins In this tutorial I will help you to build an Akka HTTP Application in a few simple steps. Step 1: Dependencies in build.sbt Since the code is in Scala, I will be using sbt for build related setup.  sbt (Scala

Spring Boot MongoDB Tutorial

Image
Spring Boot MongoDB Tutorial Introduction         Spring Boot is one of the most popular and most used frameworks for building microservices. I am assuming that you have a Basic Knowledge of Spring Boot and have a Basic Spring Boot Application running in your machine. If not, please check my blog on Basic Spring Boot Application by going to the link:  Spring Boot Tutorial . In this tutorial, we will be integrating a Spring Boot Application with MongoDB, which is a non-relational database, to perform CRUD operations. The same steps can be followed to connect to any other non-relational database. Requirements to Run the Application: Java Maven MongoDB IDE of your choice MongoDB should be setup and running in your machine. To setup, run and test if MongoDB is working fine, please refer to my post on:  MongoDB Setup . In my MongoDB, I have created a database named:  softwaredevelopercentral  and collection named:  employees . Hence once I connect, here are a few usef

Dropwizard MongoDB Tutorial

Image
Dropwizard MongoDB Tutorial Introduction         I was searching online for a Dropwizard MongoDB tutorial and all I could find were very old posts. Then I thought let me just look up for a Java MongoDB tutorial and even for this I could see very old posts dating back to 2011, 2012 and so on. The code used in these old posts cannot be used with the latest Mongo Java Driver. Hence I have come up with this post to give you a comprehensive overview of all the CRUD operations on MongoDB using the latest Mongo Java Driver.         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 MongoDB, which is a non-relational database, to perform CRUD o