Example: bankruptcy

Microservices Best Practices for Java

RedbooksFront coverMicroservices best Practices for JavaMichael HofmannErin SchnabelKatherine StanleyInternational Technical Support OrganizationMicroservices best Practices for JavaDecember 2016SG24-8357-00 Copyright International Business Machines Corporation 2016. All rights to Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP ScheduleContract with IBM Edition (December 2016)This edition applies to WebSphere Application Server Liberty : Before using this information and the product it supports, read the information in Notices on page vii. Copyright IBM Corp. 2016. All rights .. viiTrademarks .. viiiPreface.

Microservices is an architectural style in which large, complex software applications are composed of one or more smaller services. Each of these microservices focuses on completing one task that represents a small business capab ility. These microservices can be developed in any programming language.

Tags:

  Practices, Best, Java, Microservices, Microservices best practices for java

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Microservices Best Practices for Java

1 RedbooksFront coverMicroservices best Practices for JavaMichael HofmannErin SchnabelKatherine StanleyInternational Technical Support OrganizationMicroservices best Practices for JavaDecember 2016SG24-8357-00 Copyright International Business Machines Corporation 2016. All rights to Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP ScheduleContract with IBM Edition (December 2016)This edition applies to WebSphere Application Server Liberty : Before using this information and the product it supports, read the information in Notices on page vii. Copyright IBM Corp. 2016. All rights .. viiTrademarks .. viiiPreface.

2 IxAuthors .. ixNow you can become a published author, too! .. xiComments welcome.. xiStay connected to IBM Redbooks .. xiChapter 1. Overview .. Cloud native applications .. Twelve factors .. Microservices .. The meaning of small .. Independence and autonomy .. Resilience and Fault tolerance .. Automated environment .. Philosophy and team structure .. Examples .. Online retail store .. Game On! .. 8 Chapter 2. Creating Microservices in java .. java platforms and programming models .. Spring Boot .. Dropwizard .. java Platform, Enterprise Edition .. Versioned dependencies.. Identifying services.

3 Applying domain-driven design principles.. Translating domain elements into services .. Application and service structure .. Shared library or new service? .. Creating REST APIs .. Top down or bottom up? .. Documenting APIs .. Use the correct HTTP verb .. Create machine-friendly, descriptive results .. Resource URIs and versioning .. 20 Chapter 3. Locating services.. Service registry .. Third-party registration versus self-registration.. Availability versus consistency .. Service invocation .. Server side .. Client side .. API Gateway .. 32iv Microservices best Practices for JavaChapter 4. Microservice communication.

4 Synchronous and asynchronous .. Synchronous messaging (REST) .. Asynchronous messaging (events) .. Examples .. Fault tolerance .. Resilient against change .. Timeouts .. Circuit breakers .. Bulkheads .. 39 Chapter 5. Handling data .. Data-specific characteristics of a microservice .. Domain-driven design leads to entities .. Separate data store per microservice .. Polyglot persistence .. Data sharing across Microservices .. Event Sourcing and Command Query Responsibility Segregation.. Messaging systems .. Distributed transactions .. Support in java .. java Persistence API .. Enterprise JavaBeans.

5 BeanValidation .. Contexts and Dependency Injection .. java Message Service API .. java and other messaging protocols .. 65 Chapter 6. Application Security.. Securing microservice architectures .. Network segmentation .. Ensuring data privacy .. Automation .. Identity and Trust .. Authentication and authorization.. Delegated Authorization with OAuth .. JSON Web Tokens .. Hash-Based Messaging Authentication Code.. API keys and shared secrets .. 76 Chapter 7. Testing.. Types of tests .. Application architecture .. Single service testing .. Testing domain or business function.. Testing resources.

6 Testing external service requests .. Testing data requests .. Component testing .. Security verification .. Staging environment .. Test data .. Integration .. Contract .. 86 Contents End-to-end .. Fault tolerance and resilience .. Production environment .. Synthetic monitoring .. Canary testing .. 88 Chapter 8. From development to production .. Deployment patterns .. Deployment pipelines and tools .. Packaging options .. JAR, WAR, and EAR file deployment on preinstalled middleware .. Executable JAR file .. Containerization .. Every microservice on its own server .. Aspects of running multiple Microservices on one server.

7 Preferred Practices on packaging .. Configuration of the applications across stages .. Environment variables .. Configuration files .. Configuration systems .. Programming considerations .. Preferred Practices on configuration .. 105 Chapter 9. Management and Operations .. Metrics and health checks.. Dynamic provisioning .. Health check .. Logging .. Templating .. 113 Related publications .. 115 IBM Redbooks .. 115 Other publications .. 115 Online resources .. 115 Help from IBM .. 116vi Microservices best Practices for java Copyright IBM Corp. 2016. All rights information was developed for products and services offered in the US.

8 This material might be available from IBM in other languages. However, you may be required to own a copy of the product or product version in that language in order to access it. IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead.

9 However, it is the user s responsibility to evaluate and verify the operation of any non-IBM product, program, or service. IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not grant you any license to these patents. You can send license inquiries, in writing, to:IBM Director of Licensing, IBM Corporation, North Castle Drive, MD-NC119, Armonk, NY 10504-1785, US INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

10 Some jurisdictions do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Any references in this information to non-IBM websites are provided for convenience only and do not in any manner serve as an endorsement of those websites. The materials at those websites are not part of the materials for this IBM product and use of those websites is at your own risk.


Related search queries