Click here to Skip to main content
15,881,092 members
Articles / Containers / Docker

Fusing Web Stacks With COBOL Microservices

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
1 May 2018MIT1 min read 6.9K   99   3  
A Dockerized proof of concept application using React, Node, Python, GnuCOBOL, PostgreSQL, and Docker.
This case study demonstrates the process of Dockerizing a COBOL application for computing income taxes and integrating it into a Dockerized web stack, consisting of a React front end, a Python/Flask API, a COBOL shared library, a PostgreSQL database, and a Træfik reverse proxy.

Introduction

According to a 2015 report by Reuters1:

  • 43% of banking systems are built on COBOL
  • 80% of in-person transactions use COBOL
  • 95% of ATM swipes rely on COBOL code
  • 220 billion lines of COBOL are in use today

This application is a case study on Dockerizing a COBOL application for computing income taxes, and integrating it into a Dockerized web stack.

Prerequisites

Docker and docker-compose are needed to run the application. Installation instructions can be found at Install Docker and Install Docker Compose.

How It Works

This project is divided into several parts:

  • Web Tier
    • A React front end styled with Bootstrap running on Node
  • API Tier
    • A RESTful API built with Python and Flask
    • A COBOL shared library for computing income taxes compiled with GnuCOBOL
    • Responsible for retrieving taxpayer information from PostgreSQL and natively passing that information into a COBOL subroutine to compute income taxes owed
  • Data Tier
    • A PostgreSQL database containing taxpayer information
  • Reverse Proxy
    • Using Træfik as a reverse proxy and load balancer
  • Docker Compose
    • For orchestrating containers and pre-populating the database server

Running the App

Start the application with the following command:

sudo docker-compose up -d 

To view the front end navigate to:

http://web.docker.localhost 

The database is pre-populated with taxpayer IDs in the range of 1 - 1000. Enter a taxpayer ID and click Submit.

History

  • 30th April, 2018: Initial release
This article was originally posted at https://github.com/perspectivism/web-stacks-with-cobol

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Founder Turing Inc.
United States United States

Comments and Discussions

 
-- There are no messages in this forum --