Readers of the Java EE Architect’s Handbook, Second Edition are well acquainted with traditional application architectures. Since this book was published, microservices architecture has emerged. It is an important architecture with a variety of uses that Java architects should understand and be able to use.
This book details microservices architecture and is an addendum to the Java EE Architect’s Handbook, Second Edition. This book will define microservices architecture and provide an overview of costs and benefits. As with the
Architect’s Handbook, I’ll go on to address architecture, design, and implementation concerns specific to microservices architecture.
This book will take the reader to the point of producing a microservice. Beyond that deployable, there’s the very interesting world of DevOps that addresses how to deploy, manage, and cluster that microservice and connect it to the resources it needs to function. While this is a very interesting world and one that I encourage you to take an interest in, it is out of scope for this book.
How this book is organized
The first chapter defines microservices architecture and contrasts it with a layered web application architecture described in the Java EE Architect’s Handbook. I’ll summarize the benefits and costs of using microservices architecture. I’ll also discuss similarities and differences between microservices and service oriented architectures (SOA).
The second chapter dives into design considerations for microservices. All new paradigms have coding patterns, and microservices architecture is no exception. I’ll detail coding patterns to enhance performance and to increase resiliency to service failure. I’ll also discuss how to make microservices easier to support.
The third chapter discusses cross-cutting concerns for microservices and various ways of incorporating them into services written in Java. I’ll discuss easy ways to package and deploy microservices as well as to instrument them for health checks and performance measurement.
The fourth chapter discusses when using microservices architecture is appropriate. I also identify current marketing hype surrounding microservices architecture and the fine print required to reap the benefits from it. We’re going to find out that microservices architecture is not a silver bullet and nor should it be used for all applications.
The fifth chapter discusses various topics needed to effectively manage a large number of microservices. Much has been written about how microservices architecture changes the way we design and develop applications; but very little has been written on effectively managing large numbers of microservices. As application architects, we advise management and we need to help guide them through the transition to managing microservices architecture.
Description of common resources
This book often makes references to the following open-source projects that are frequently used with many Java EE applications:
Apache HttpClient (https://hc.apache.org/)
Apache CXF (https://cxf.apache.org/)
Spring Boot (http://projects.spring.io/spring-boot/)
Google Guava Core Libraries (https://code.google.com/p/guava-libraries/)
Apache Commons Lang (http://commons.apache.org/lang/)
My GitHub (https://github.com/Derek-Ashmore)
Another open-source project on which this book relies is Moneta, which is an open-source example of a microservice written in Java. Moneta illustrates several of the concepts discussed in the book.
I’m always interested in reading comments and suggestions that will improve future editions of this book. Please send feedback directly to me at firstname.lastname@example.org. If your comment or suggestion is the first of its kind and is used in the next edition, I will gladly send you a copy of my next book. Additionally, reader questions are sometimes selected and answered in entries in my blog at http://www.derekashmore.com/.