Microservices from Theory to Practice: Creating Applications in IBM Bluemix Using the Microservices Approach

Book description

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 capability. These microservices can be developed in any programming language. They communicate with each other using language-neutral protocols, such as Representational State Transfer (REST), or messaging applications, such as IBM® MQ Light.

This IBM Redbooks® publication gives a broad understanding of this increasingly popular architectural style, and provides some real-life examples of how you can develop applications using the microservices approach with IBM Bluemix™. The source code for all of these sample scenarios can be found on GitHub (https://github.com/).

The book also presents some case studies from IBM products. We explain the architectural decisions made, our experiences, and lessons learned when redesigning these products using the microservices approach.

Information technology (IT) professionals interested in learning about microservices and how to develop or redesign an application in Bluemix using microservices can benefit from this book.

Table of contents

  1. Front cover
  2. Notices
    1. Trademarks
  3. IBM Redbooks promotions
  4. Preface
    1. Authors
    2. Now you can become a published author, too
    3. Comments welcome
    4. Stay connected to IBM Redbooks
  5. Part 1 Introducing the microservices architectural style
  6. Chapter 1. Motivations for microservices
    1. 1.1 What are microservices
      1. 1.1.1 Small and focused
      2. 1.1.2 Loosely coupled
      3. 1.1.3 Language-neutral
      4. 1.1.4 Bounded context
      5. 1.1.5 Comparing microservices and monolithic architectures
    2. 1.2 Benefits from microservices
      1. 1.2.1 Enterprise solutions context
      2. 1.2.2 Challenges with monolithic architecture
      3. 1.2.3 Developer perspective
      4. 1.2.4 Tester perspective
      5. 1.2.5 Business owner perspective
      6. 1.2.6 Service management perspective
    3. 1.3 What to avoid with microservices
      1. 1.3.1 Don’t start with microservices
      2. 1.3.2 Don’t even think about microservices without DevOps
      3. 1.3.3 Don’t manage your own infrastructure
      4. 1.3.4 Don’t create too many microservices
      5. 1.3.5 Don’t forget to keep an eye on the potential latency issue
    4. 1.4 How is this different than service-oriented architecture?
    5. 1.5 Case studies and most common architectural patterns
      1. 1.5.1 An e-commerce discount site
      2. 1.5.2 Financial services company
      3. 1.5.3 Large brick-and-mortar retailer
    6. 1.6 Example scenarios using microservices
      1. 1.6.1 Cloud Trader
      2. 1.6.2 Online Store
      3. 1.6.3 Acme Air
  7. Chapter 2. Elements of a microservices architecture
    1. 2.1 Characteristics of microservices architecture
      1. 2.1.1 Business-oriented
      2. 2.1.2 Design for failure
      3. 2.1.3 Decentralized data management
      4. 2.1.4 Discoverability
      5. 2.1.5 Inter-service communication design
      6. 2.1.6 Dealing with complexity
      7. 2.1.7 Evolutionary design
    2. 2.2 Designing microservices
      1. 2.2.1 Use design thinking to scope and identify microservices
      2. 2.2.2 Choosing the implementation stack
      3. 2.2.3 Sizing the microservices
    3. 2.3 REST API and messaging
      1. 2.3.1 REST
      2. 2.3.2 Messaging
      3. 2.3.3 REST and messaging together
    4. 2.4 The future of microservices
  8. Chapter 3. Microservices and DevOps
    1. 3.1 Why you should use DevOps
      1. 3.1.1 Defining DevOps
      2. 3.1.2 DevOps is a prerequisite to successfully adopting microservices
      3. 3.1.3 Organizing teams to support microservices
      4. 3.1.4 Organize a DevOps team to support other microservices teams
    2. 3.2 DevOps capabilities for microservices architecture
      1. 3.2.1 Continuous business planning
      2. 3.2.2 Continuous integration and collaborative development
      3. 3.2.3 Continuous testing
      4. 3.2.4 Continuous release and deployment
      5. 3.2.5 Continuous monitoring
      6. 3.2.6 Continuous customer feedback and optimization
    3. 3.3 Microservices governance
      1. 3.3.1 Centralized versus decentralized governance
      2. 3.3.2 Enterprise transformation for microservices
    4. 3.4 DevOps capabilities: Testing strategies for microservices
      1. 3.4.1 Considerable testing methods
      2. 3.4.2 Building a sufficient testing strategy
  9. Chapter 4. Developing microservices in Bluemix
    1. 4.1 Bluemix introduction
      1. 4.1.1 Bluemix deployment models
      2. 4.1.2 Bluemix Cloud Foundry concepts
      3. 4.1.3 How Bluemix works
    2. 4.2 Developing microservices using Bluemix DevOps
      1. 4.2.1 Bluemix DevOps introduction
      2. 4.2.2 Delivery pipeline
    3. 4.3 Deployment, testing, monitoring, and scaling services in Bluemix DevOps
      1. 4.3.1 Deployment services in Bluemix
      2. 4.3.2 Testing services in Bluemix DevOps
      3. 4.3.3 Monitoring and analytics services in Bluemix
      4. 4.3.4 Scaling in Bluemix
    4. 4.4 Communication, session persistence, and logging in Bluemix
      1. 4.4.1 Communication
      2. 4.4.2 Session persistence
      3. 4.4.3 Logging in Bluemix
    5. 4.5 Considerations and opportunities
      1. 4.5.1 Microservice trends to consider
      2. 4.5.2 Controlling access and visibility of endpoints
      3. 4.5.3 Avoiding failures
      4. 4.5.4 Versioning
  10. Chapter 5. Microservices case studies in IBM
    1. 5.1 Microservices implementation in IBM DevOps Services
      1. 5.1.1 North Star Architecture
      2. 5.1.2 Delivery pipeline
      3. 5.1.3 REST and MQTT mirroring
      4. 5.1.4 Deployment considerations
    2. 5.2 Microservices case study in Bluemix console
      1. 5.2.1 Assessing the task
      2. 5.2.2 Peeling off Landing and Solutions
      3. 5.2.3 Composition of the common areas
      4. 5.2.4 “Lather, rinse, repeat”
      5. 5.2.5 Deployment considerations
    3. 5.3 Microservices case study in IBM Watson services
      1. 5.3.1 IBM Watson Developer Cloud
      2. 5.3.2 IaaS++ platform (Cloud Services Fabric)
      3. 5.3.3 Main components of IaaS++
      4. 5.3.4 IBM Watson Developer Cloud services
  11. Part 2 Example scenarios using the microservices approach
  12. Chapter 6. Scenario 1: Transforming a monolithic application to use microservices (CloudTrader)
    1. 6.1 Introduction to the sample
    2. 6.2 Refactoring the application
    3. 6.3 The CloudTraderAccountMSA microservice
    4. 6.4 The CloudTraderQuoteMSA microservice
      1. 6.4.1 DevOps Services
  13. Chapter 7. Scenario 2: Microservices built on Bluemix
    1. 7.1 Introduction to the sample
    2. 7.2 Breaking it down
      1. 7.2.1 Online Store Catalog service
      2. 7.2.2 Orders
      3. 7.2.3 Shipping
      4. 7.2.4 UI
    3. 7.3 Additional Bluemix services
      1. 7.3.1 DevOps Services
      2. 7.3.2 Monitoring
      3. 7.3.3 Scaling
  14. Chapter 8. Scenario 3: Modifying the Acme Air application and adding fault tolerance capabilities
    1. 8.1 The original Acme Air monolithic application
      1. 8.1.1 Deploying the Acme Air application in monolithic mode
    2. 8.2 Redesigning application to use microservices
      1. 8.2.1 Deploying the Acme Air application in microservices mode
    3. 8.3 Adding Hystrix to monitor services
      1. 8.3.1 Deploying the Hystrix Dashboard to Bluemix
  15. Related publications
    1. IBM Redbooks
    2. Other publications
    3. Online resources
    4. Help from IBM
  16. Back cover

Product information

  • Title: Microservices from Theory to Practice: Creating Applications in IBM Bluemix Using the Microservices Approach
  • Author(s): Shahir Daya, Nguyen Van Duy, Kameswara Eati, Carlos M Ferreira, Dejan Glozic, Vasfi Gucer, Manav Gupta, Sunil Joshi, Valerie Lampkin, Marcelo Martins, Shishir Narain, Ramratan Vennam
  • Release date: August 2015
  • Publisher(s): IBM Redbooks
  • ISBN: 9780738440811