Enterprise Java Microservices
Ken Finnigan
  • MEAP began April 2017
  • Publication in Early 2018 (estimated)
  • ISBN 9781617294242
  • 350 pages (estimated)
  • printed in black & white

This example-rich tutorial shows how to design and manage large-scale Java applications as a collection of microservices. Starting with an overview of microservices from a Java EE perspective, you'll learn how to refactor your existing applications as microservices and build microservice-based applications from scratch. You'll power through practical tutorials as you call and connect microservices, understand what load balancing is, and use Netflix Hystrix for fault tolerance. You'll also master security and testing, as well as deploying to the cloud.

Table of Contents detailed table of contents

Part 1: Getting Started

1. Enterprise Java Microservices

1.1. Enterprise Java pitfalls

1.1.1. What is Enterprise Java?

1.1.2. Typical Enterprise Java Architecture

1.1.3. What is a Monolith?

1.1.4. Why Hate the Monolith?

1.2. Microservices and Distributed Architecture

1.2.1. Do One Thing Well

1.2.2. What is a Distributed Architecture?

1.2.3. Why should I care about being Distributed?

1.2.4. What can be done to assist in developing Microservices?

1.2.5. Product over Project

1.2.6. Continuous Integration and Delivery

1.3. Patterns for migration to microservices

1.3.1. Domain Driven Design

1.3.2. Big Bang Pattern

1.3.3. Strangler Pattern

1.3.4. Hybrid Pattern

1.4. What are Enterprise Java Microservices?

1.4.1. Why Enterprise Java is a good fit for Microservices

1.5. Summary

2. Developing a Simple RESTFul Microservice

2.1. Introducing the Simple Microservice

2.1.1. Address Management application

2.1.2. Application Use Cases

2.1.3. Architecture of the Application

2.2. Creating RESTFul endpoints with JAX-RS

2.2.1. View all addresses

2.2.2. Delete an address

2.2.3. Add an address

2.2.4. Run it

2.3. Summary

3. Just enough Application Server for Microservices

3.1. Just enough Application Server

3.1.1. What does it mean?

3.1.2. What are the benefits?

3.1.3. MicroProfile

3.2. Choosing Just enough Application Server

3.2.1. Beach Vacation example application

3.2.2. Dropwizard - The Original Opinionated Microservice runtime

3.2.3. Payara Micro - Slimmed Java EE App Server in a Jar

3.2.4. Spring Boot - Opinionated Spring Microservices

3.2.5. WildFly Swarm - The Most Flexible JeAS Runtime

3.2.6. How do they compare?

3.3. Summary

Part 2: Microservices with Enterprise Java

4. Consuming Microservices

4.1. Consuming a Microservice with a Java Client Library

4.1.1. java.net

4.1.2. Apache HttpClient

4.2. Consuming a Microservice with a JAX-RS Client Library

4.2.1. JAX-RS Client

4.2.2. RESTEasy Client

4.3. Consuming a Microservice with WildFly Swarm

4.3.1. Simplified Client usage

4.4. Summary

5. Discovering Microservices for Consumption

5.1. Why does a Microservice need to be discovered?

5.1.1. What is Service Discovery?

5.1.2. What are the benefits of Service Discovery and a Registry?

5.1.3. What is Netflix Ribbon?

5.2. Registering a Microservice with WildFly Swarm

5.2.1. WildFly Swarm’s Topologies

5.2.2. Registering a Microservice with a Topology

5.3. Consuming a Registered Microservice with WildFly Swarm

5.3.1. Service Lookup with Netflix Ribbon

5.3.2. Service Lookup with RESTEasy Client

5.3.3. Scaling Microservices with our Example

5.4. Summary

6. Strategies for Fault Tolerance and Monitoring

7. Client Side Load Balancing and Service Registries

Part 3: Breaking Down a "Monolith"

8. Architecting a Microservice Hybrid

9. Splitting out our First Microservice

10. Integrating the Microservice into the "Monolith"

11. Incorporating additional Microservices

12. Deploying to the Cloud

13. API Gateways

About the Technology

Over time, enterprise-grade Java applications can become giant hulking beasts of intertwined code, bloated with third-party libraries, and vulnerable to total collapse when a single part fails. It doesn't have to be that way! Microservices break down a large application into smaller components, each interacting with each other to create a united whole. As each component can start, stop, and scale independently, so the whole system benefits from better fault-tolerance and resilience. Equally-important, separating the application into smaller independent services makes it substantially easier to efficiently manage the development and incremental improvement of your system.

What's inside

  • The microservices mental model
  • Fault tolerance with Netflix Hystrix
  • Securing your microservices
  • Deploying to the cloud

About the reader

This book is for Java developers familiar with distributed n-tier application architecture.

About the author

Ken Finnigan has worked as an engineer and consultant for nearly 20 years. He currently co-leads the development of WildFly Swarm for Red Hat.


Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
Buy
MEAP combo $49.99 pBook + eBook
MEAP eBook $39.99 pdf + ePub + kindle

FREE domestic shipping on three or more pBooks