Gaining Docker Image Size Efficiencies By Separating Application Layers

Luke Patterson Docker, Java, Problem Solving, Spring Boot, Technology Snapshot Leave a Comment

Problem

I was pushing a new Docker image tag for each application code commit, and the admins of the private registry were getting annoyed at how much space I was using.

Solution Summary

Yes, I know there are strategies to clean up old tags but I first wanted to reduce the impact of the tags I was pushing. With the right layering strategy, I knew I could reduce the net registry size increase of consecutive tag pushes.

I wanted to only push what had actually changed in the application. In addition to reducing the impact on the registry, having smaller tag deltas could possibly speed up rolling deployments since nodes could potentially have less to download.

Using MongoDB and Spring Boot to Create a RESTful Web Service

Robert Rice Java, Spring Boot, Technology Snapshot Leave a Comment

Spring Boot is a framework designed to simplify the bootstrapping and development of a new Spring application. The framework takes an opinionated approach to configuration, freeing developers from the need to define a boilerplate configuration. MongoDB is a simple set up and easy to use document database. A RESTful API is an application program interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data.

In this post, I will demonstrate the process of creating a RESTful web application with Spring Boot and MongoDB.

Interactive REST API Documentation with Swagger UI

Bing Liu Microservices, Spring, Spring Boot, Technology Snapshot Leave a Comment

I am assisting a client that is migrating from a monolithic legacy application to a modern Microservice stack with Spring REST. We are helping to implement Swagger UI to provide both a front-end API UI, as well as to provide a level of documentation at the same time. This implementation has simultaneously met our project requirements, as well as garnering some positive feedback from our client!

Swagger UI is one of the most popular tools to visually render beautiful, interactive API documentation. In this blog, I’ll use a REST API application to demonstrate some usage of Swagger UI. The source project is available at https://github.com/bingliu2016/spring-boot-rest-swagger2.

Using Amazon ElastiCache for Redis To Optimize Your Spring Boot Application

Brandon Klimek AWS, Java, Spring, Spring Boot, Technology Snapshot 1 Comment

Has your project gotten to the point when big data sets and/or time-consuming calculations have begun to affect performance? Or are you struggling to optimize your queries and need to cache some information to avoid continually hitting your database? Then caching could be your solution.

For this article, I will demonstrate how to utilize Amazon ElastiCache for Redis to speed up areas of your application. The example application we will build uses Spring Boot 2.x and is available on Github.

AWS Lambda with Spring Boot

Greg Emerick AWS, Java, Spring, Spring Boot, Technology Snapshot 6 Comments

The typical deployment scenario for a Spring Boot application in AWS involves running the Java application on an EC2 instance 24 hours a day. Of course, the application could be deployed in AWS ECS as a Docker container, but it still runs continuously on an EC2 instance. In each case, the EC2 instances need to be monitored and you pay for compute capacity used by that EC2 instance.

AWS Lambda provides low cost compute with zero maintenance. Lambda runs your code on demand, without provisioned and managed servers. Lambda automatically runs and scales your code. You are charged for every 100ms your code executes and the number of times your code is triggered. If the code isn’t running, you pay nothing.

Lambda has clear cost and maintenance benefits. But what does it take to run the standard Spring Boot application as a Lambda? How does it work? What are the drawbacks? These are the questions that will be answered in this blog through a tangible example…