Modern Java EE Design Patterns

Book description

With the ascent of DevOps, microservices, containers, and cloud-based development platforms, the gap between state-of-the-art solutions and the technology that enterprises typically support has greatly increased. But as Markus Eisele explains in this O’Reilly report, some enterprises are now looking to bridge that gap by building microservice-based architectures on top of Java EE.

Can it be done? Is it even a good idea? Eisele thoroughly explores the possibility and provides savvy advice for enterprises that want to move ahead. The issue is complex: Java EE wasn’t built with the distributed application approach in mind, but rather as one monolithic server runtime or cluster hosting many different applications. If you’re part of an enterprise development team investigating the use of microservices with Java EE, this book will help you:

  • Understand the challenges of starting a greenfield development vs tearing apart an existing brownfield application into services
  • Examine your business domain to see if microservices would be a good fit
  • Explore best practices for automation, high availability, data separation, and performance
  • Align your development teams around business capabilities and responsibilities
  • Inspect design patterns such as aggregator, proxy, pipeline, or shared resources to model service interactions

Markus Eisele is a Developer Advocate at Red Hat and focuses on JBoss Middleware. He has been working with Java EE servers from different vendors for more than 14 years, and has worked with different customers on all kinds of Java EE related applications and solutions. He is a prolific blogger, writer, and tech editor for Java EE content. Markus is also a Java Champion and former ACE Director.

Publisher resources

View/Submit Errata

Table of contents

  1. Acknowledgments
  2. 1. Enterprise Development Today
    1. Enterprise Goals and Objectives
    2. Resistant to Change and Economically Efficient
    3. Developers Left Alone
    4. Technology-Centric Versus Business-Centric
    5. Aims and Scope
  3. 2. History of Java EE
    1. Mistakes We Made
    2. Evolution Continues with ESBs
    3. Challenges and Lessons Learned
      1. DevOps: Highly Effective Teams
      2. Microservices: Lightweight and Fast
      3. Containers: Fully Contained Applications
      4. Public, Private, Hybrid: Scalable Infrastructures
  4. 3. Designing Software for a Scalable Enterprise
    1. Greenfield Versus Brownfield
    2. Domain-Driven Design
    3. Service Characteristics
      1. Core Services
      2. Process Services
    4. Microservices Best Practices
      1. Design for Automation
      2. Design for Failure
      3. Design for Data Separation
      4. Design for Integrity
      5. Design for Performance
    5. Independently Deployable and Fully Contained
    6. Crosscutting Concerns
      1. Security
      2. Logging
      3. Health Checks
      4. Integration Testing
  5. 4. Java EE and Microservices
    1. Matching the Real World
    2. The Missing Pieces
      1. API Gateway/Management Solution
      2. Service Registry
      3. Security
    3. Migration Approaches
      1. Selective Improvements
      2. The Strangler Pattern
      3. Big Bang: Refactor an Existing System
  6. 5. Microservices Design Pattern
    1. Common Principles
      1. To Avoid Trunk Conflict, Each Microservice Is Its Own Build
      2. The Business Logic Is Stateless
      3. The Data Access Layer Is Cached
      4. Create a Separate Data Store for Each Microservice
    2. Aggregator Pattern
    3. Proxy Pattern
    4. Pipeline Pattern
    5. Shared Resources
    6. Asynchronous Messaging
  7. 6. Conclusion
  8. A. Additional Technologies and Team Considerations
    1. Architecture != Implementation
      1. Vert.x
      2. WildFly Swarm
      3. Spring Boot with Spring Cloud
      4. Dropwizard
      5. Roll Your Own
    2. Thoughts About Teams and Cultures
  9. B. Further Resources

Product information

  • Title: Modern Java EE Design Patterns
  • Author(s): Markus Eisele
  • Release date: January 2016
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781491939819