One of the widely wasted resources in the world today is Memory. Due to inefficient programming, surprising (sometimes ‘shocking’) amount of memory is wasted. We see this pattern repeated in several enterprise applications. To prove this case, we conducted a small study. We analyzed the famous spring boot pet clinic application to see how much memory it is wasting. This ...
Read More »Home » Spring Boot »
Spring Boot Microservices , Docker and Kubernetes workshop – part3
In the previous posts we build few micro services (Order Service, Product Service, Customer Service) for an order management system using Docker and Spring Boot. We used Netflix libraries to manage, discover and load balance the micro services. Managing these micro services and their multiple containers could get a bit tricky; especially in terms of Scalability, Observability, Security, Monitoring and ...
Read More »Spring MVC – HTTP message converter
Quite often you need to provide users with the same data, but in different forms, like JSON, PDF, XLS, etc. If your application is Spring Framework based, this task can be achieved using HTTP message converters. HTTP message converters are applied when HTTP request (or its parts) needs to be converted into type required for handler method argument (see: Handler ...
Read More »Read replicas and Spring Data Part 4: Configuring the read repository
Previously we set up two EntityManagers in the same application. One for the reads and one for the writes. Now it’s time to create our read repository. The read only repository will use the secondary read only EntityManager. In order to make it a read only repository, it is essential not to have any save and persist actions. 01 02 ...
Read More »Read replicas and Spring Data Part 3: Configuring two entity managers
Our previous setup works as expected. What we shall do now is to get one step further and configure two separate entity managers without affecting the functionality we achieved previously. The first step would be to set the default entity manager configuration to a primary one.This is the first step 01 02 03 04 05 06 07 08 09 10 ...
Read More »Read replicas and Spring Data Part 2: Configuring the base project
In our previous post we set up multiple PostgreSQL instances with the same data.Our next step would be to configure our spring project by using the both servers. As stated previously we shall use some of the code taken from the Spring Boot JPA post, since we use exactly the same database. This shall be our gradle build file 01 ...
Read More »Read replicas and Spring Data Part 1: Configuring the Databases
This is a series of blog posts on our quest to increase our application’s performance by utilizing read replicas. For this project our goal is to set up our spring data application and use read repositories for writes and repositories based on read replicas for reads. In order to simulate this environment we shall use PostgreSQL instances through Docker. The ...
Read More »How to deploy a Spring Boot Application on AWS EC2 instance
Hello Friends, In this tutorial,we will see how we can deploy a Spring Boot application over an AWS EC2 instance. Here are the steps we are going to perform. 1. Create a Spring Boot Project with Spring Boot Initialiser.2. Create a Rest end Point,which we can access after deployment3. Launch an EC2 instance4. Copy our Spring Boot project from our ...
Read More »Easy Spring Boot Deployment with AWS Elastic Beanstalk
Friends don’t let friends write user auth. Tired of managing your own users? Try Okta’s API and Java SDKs today. Authenticate, manage, and secure users in any application within minutes. Nearly all applications rely on authentication. Developers, and the companies that employ them, want to confirm who is making the request and are they who they say they are. And, ...
Read More »