
Building and Deploying Microservices
With an understanding of what makes a microservice, we can now take a deep pe into bundling microservices and deploying them. We will make use of the containerization solutions available and see how they can be used when working with this architectural style.
Java EE has a rich set of APIs for building various types of applications. With decades of experience in distributed applications, Java EE is a promising platform for use with microservices. Enterprise features such as transactions, security, web sockets, persistence, messaging, asynchronous processing, Restful APIs, and an ever-growing set of open source tools and libraries, make it a compelling choice.
Here's what we will cover in this chapter:
- Fat JAR
- Skinny WAR
- Examples using Payara Micro
- MicroProfile:
- Java EE already has support
- WildFly Swarm
- Spring Cloud
- Docker containers:
- Working with distributed teams
- Building custom images
- Running multiple containers
- Fat JAR or Skinny WAR with Docker
When building microservices, we have two packaging choices for deploying our service:
- Fat JAR: An Uber JAR approach which bundles the server runtime in it
- Skinny WAR: Traditional slim war which is deployed on a server