Taxonomy Icon

Cloud

Build an airline booking platform on a private cloud

Get the code View the demo

Summary

Developers are hearing a lot of buzz about cloud-native applications today. Technologies like Kubernetes and Docker are gaining reputation and popularity in the word of cloud native. If you need an end-to-end, full-stack microservices application and want to build a cloud-native app with a blockchain implementation, this code pattern is a good place to start. You can learn how to use Ethereum Smart Contracts on Hyperledger Fabic so it’s easy to use permissioned blockchain. This pattern demonstrates modern tools that are highly scalable and based on Kubernetes, and it shows ways to incorporate data storage and business rules.

Description

This code pattern shows how to build a highly available cloud-native app on a private cloud. The back end is based on Node.js and an IBM DB2 database. IBM Operational Decision Manager is used to design rules-based business decisions. The front end is built using Angular4. A distributed asynchronous task queue is based on RabbitMQ and Celery. Container orchestration is managed by Kubernetes. Finally, the blockchain is based on Hyperledger Fabric, Hyperledger Burrow, and Ethereum Smart Contract.

With this code pattern, you can build a sample cloud-native application based on microservice architecture, IBM middleware, and the following 12 factor practices. The sample application is an airline booking platform that uses the following technologies:

  • Node.js (Typescript)
  • IBM DB2
  • IBM Operational Decision Manager (ODM)
  • RabbitMQ
  • Celery
  • Angular
  • Hyperledger Fabric
  • Hyperledger Burrow
  • Solidity
  • Docker
  • Kubernetes
  • IBM Cloud Private

When you use this code pattern, you learn how to complete the following tasks:

  • Break an application into different microservices.
  • Deploy a microservices-based application on IBM Cloud Private.
  • Leverage middleware like IBM ODM and IBM DB2 on Kubernetes.
  • Design business rules and decisions for IBM ODM.
  • Create distributed task queues using RabbitMQ and Celery.
  • Use DB2 as back-end data storage.
  • Deploy an Ethereum smart contract on Hyperledger Fabric by using Hyperledger Burrow.
  • Use IBM Cloud Private, Docker, and Kubernetes.

Flow

flow

  1. The user accesses the sample airline booking app.
  2. The user interface, built with Angular4, uses restful endpoints to access backend microservices.
  3. The Login Microservice allows the user to log in to the application.
  4. The Signup Microservice allows the user to sign up for the airline booking application.
  5. The Checkin Microservice allows the user to check in to a specific booked flight.
  6. The Listing Microservice allows the user to list the available flights and browse them.
  7. The Booking Microservice allows the user to to book an available flight.
  8. The Blockchain Microservice helps communicate with the blockchain through the Ethereum proxy.
  9. The data from the user and the interaction with the microservices is stored in IBM DB2, a SQL database.
  10. The ODM Microservice helps communicate with IBM Operational Decision Manager (ODM).
  11. IBM ODM is an advanced business rules management system that you use to capture, automate, and govern frequent, repeatable business decisions. It adds real-time decision making to daily operations.
  12. The Email Microservice communicates with RabbitMQ and Celery to send email in asynchronous queues.
  13. RabbitMQ is a messaging broker, an intermediary for messaging. It gives the application a common platform to send and receive messages, and your messages a safe place to live until they are received.
  14. Celery is an asynchronous task queue or job queue that is based on distributed message passing.
  15. The Ethereum proxy allows communicating with the Ethereum Virtual Machine (EVM).
  16. The Hyperledger Burrow EVM chaincode plugin adds Ethereum capabilities on top of Hyperledger Fabric by using Hyperledger Burrow.
  17. Hyperledger Fabric is a blockchain framework implementation and one of the Hyperledger projects hosted by The Linux Foundation, intended as a foundation for developing, applications or solutions with a modular architecture. It allows components like consensus and membership services to be used as plug-and-play.

Instructions

Find detailed technical steps for this code pattern in the README.md file in the GitHub repository.

  1. Connect Docker (private registery) with IBM Cloud Private.
  2. Install all dependencies, create images, and upload to the private registery of IBM Cloud Private.
  3. Connect kubesctl with IBM Cloud Private Kubernetes.
  4. Configure persistant storage in IBM Cloud Private.
  5. Deploy IBM DB2, create databases, and configure IBM DB2.
  6. Deploy RabbitMQ.
  7. Deploy and configure IBM Operational Decision Manager (ODM), and load business rules.
  8. Deploy blockchain.
  9. Deploy the Ethereum proxy.
  10. Configure and deploy Kubernetes secrets.
  11. Configure and deploy config-maps.
  12. Deploy all services and deployments.