7 Microservices

 

This chapters covers

  • Microservices overview and characteristics
  • Developing microservices with Camel
  • WildFly Swarm and Camel
  • Spring Boot and Camel
  • Designing for failures
  • Netflix Hystrix circuit breakers

We wanted to bring you the most up-to-date material, so, because the IT industry is evolving constantly, we decided to wait and write chapters 7 and 18 last. This chapter covers using microservices with Camel, and chapter 18 is a natural continuation that goes even further and takes the microservices world into the cloud by using container technology such as Docker and Kubernetes. This chapter stays down-to-earth and is mainly focused on running locally on a single computer or laptop.

We initially wrote a lengthy chapter introduction to talk about how the software is eating the world, how businesses are being disrupted, and how new emerging businesses are doing business in a faster and more agile way, where microservices are instrumental. But we felt there are much better authors who can explain all that, and we mention two of them at the start of section 7.1.

The first section covers six microservices characteristics that you should have in mind when reading the remainder of this chapter.

Section 7.2 jumps into action by showing you how to build microservices with Camel by using various JVM frameworks, starting with plain, standalone Camel and moving all the way to using popular Java microservice runtimes such as Spring Boot and WildFly Swarm.

7.1 Microservices overview

7.1.1 Small in size

7.1.2 Observable

7.1.3 Designed for failure

7.1.4 Highly configurable

7.1.5 Smart endpoints and dumb pipes

7.1.6 Testable

7.2 Running Camel microservices

7.2.1 Standalone Camel as microservice

7.2.2 CDI Camel as microservice

7.2.3 WildFly Swarm with Camel as microservice

7.2.4 Spring Boot with Camel as microservice

7.3 Calling other microservices

7.3.1 Recommendation prototype

7.3.2 Shopping cart prototype

7.3.3 Rules and inventory prototypes

7.3.4 Rating prototype

7.3.5 Putting all the microservices together

7.4 Designing for failures

7.4.1 Using the Retry pattern to handle failures

7.4.2 Using the Retry pattern without Camel

7.4.3 Using Circuit Breaker to handle failures

7.4.4 Netflix Hystrix

7.4.5 Using Hystrix with Camel

7.4.6 Configuring Hystrix

7.4.7 Bulkhead pattern

sitemap