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.
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)
- Hyperledger Fabric
- Hyperledger Burrow
- 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.
- The user accesses the sample airline booking app.
- The user interface, built with Angular4, uses restful endpoints to access backend microservices.
- The Login Microservice allows the user to log in to the application.
- The Signup Microservice allows the user to sign up for the airline booking application.
- The Checkin Microservice allows the user to check in to a specific booked flight.
- The Listing Microservice allows the user to list the available flights and browse them.
- The Booking Microservice allows the user to to book an available flight.
- The Blockchain Microservice helps communicate with the blockchain through the Ethereum proxy.
- The data from the user and the interaction with the microservices is stored in IBM DB2, a SQL database.
- The ODM Microservice helps communicate with IBM Operational Decision Manager (ODM).
- 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.
- The Email Microservice communicates with RabbitMQ and Celery to send email in asynchronous queues.
- 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.
- Celery is an asynchronous task queue or job queue that is based on distributed message passing.
- The Ethereum proxy allows communicating with the Ethereum Virtual Machine (EVM).
- The Hyperledger Burrow EVM chaincode plugin adds Ethereum capabilities on top of Hyperledger Fabric by using Hyperledger Burrow.
- 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.
Find detailed technical steps for this code pattern in the README.md file in the GitHub repository.
- Connect Docker (private registery) with IBM Cloud Private.
- Install all dependencies, create images, and upload to the private registery of IBM Cloud Private.
- Connect kubesctl with IBM Cloud Private Kubernetes.
- Configure persistant storage in IBM Cloud Private.
- Deploy IBM DB2, create databases, and configure IBM DB2.
- Deploy RabbitMQ.
- Deploy and configure IBM Operational Decision Manager (ODM), and load business rules.
- Deploy blockchain.
- Deploy the Ethereum proxy.
- Configure and deploy Kubernetes secrets.
- Configure and deploy config-maps.
- Deploy all services and deployments.