Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Fusing Web Stacks With COBOL Microservices

0.00/5 (No votes)
1 May 2018 1  
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

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here