Microservice Applications with Bootique

If you've been following this blog you know I recently built a Microservice starter application with Spring Cloud. With Spring Cloud I was quickly able to assemble a Cloud Config server, an MVC Web Client, a REST Resource Service, and a Eureka Server for service discovery. You can find the app on GitHub

Knowing I would be running various Spring components on my Cloud Server I wanted to get a read on the memory consumption of my Spring Cloud app. This is on my development server, but keep in mind that my Cloud Server has a total of 4GBs Memory.

Granted, I simply fired-up the JARs without any JVM memory restraints, but damn, that's a lot of Resident Memory. Here is a look at two Spring web apps currently running on my 4GB Server, this blog at 600MBs and a second Spring website at 400MBs. The bottom line is that with 4GBs of RAM on my Cloud Server I simply wouldn't have the room for a Spring Cloud application.

It was time for a reset.

Enter Bootique

If you go to the Bootique Project website at http://bootique.io you'll see the description "a minimally-opinionated framework for running Java apps." When compared to Spring this is very evident. And if you watch the 1:35 minute introductory video you'll see that Bootique is Cloud Aware as well.

So I started my Microservices Application from scratch, this time with Bootique, and pushed it to GitHub as NixMash Microservices.

Here's the project layout so far. It starts with a Jangles Module for shared objects and functionality (on GitHub), a User REST Service and a Web Client. The app shares certain characteristics of a Spring Cloud app like a centralized external config directory.

We're wired-up and ready to go. Here's the Home Page.

Here's the cool part, and one of the reasons we'll be spending a lot of up-close-and-personal time with Bootique. Look at these Resident Memory figures. 200MBs! Yes!

So out of the gate we've gone from a Web Client at 1.7GBs to 201MBs and a REST Microservice at 1.1GBs to 199MBs. Yeah, I think we're going to build our Microservice Application with Bootique.

Source Code Notes for this Post

Source code discussed in this post is found in NixMash Microservices on GitHub. Code for this particular post is found in branch microservices-v0.1.0 - Initial Layout and Structure.

Posted July 12, 2017 11:08 AM EDT

More Like This Post