Workload Modernization in zPET: A z/OS Connect Story - Part 1
TrentBalta 310002M9F0 Visits (111)
zPET first began experimenting with z/OS Connect at version 1.0, in an effort to modernize workloads. At the time, the primary service provider allowed us to drive SQL queries against DB2 over a JDBC connection. Since that initial offering, the feature set has grown rapidly allowing us to modernize more and more aspects of our workloads.
We immediately saw the usefulness of z/OS Connect; being able to interact with Z Middleware products via REST APIs would mean being able to access, use, and analyze Z data from any application that could create a JSON payload and send it off via a REST request. Additionally, it allowed us to simplify the code bases of our existing workloads, eliminating the need maintain separate libraries and SDKs for each of our various middleware products. This alleviated much strain on our application developers, who now only need to manage and exploit a single REST endpoint.
The next step on our journey would be to attempt to add REST calls to our new zOS Connect server into an application. Rather than create an entirely new workload we wanted to modernize an existing one, much like our customers might. While creating a new workload would be quick and (relatively) easy, it would certainly not be representative of a true customer-like workload. However, when you start updating an existing workload, there is a delicate balance between throwing out old, outdated code and keeping what is necessary and stable. This must be approached with great care and grace, otherwise you might not only lose years of good engineering and design, but you may find also yourself with a Frankenstein's monster-esque monolith.
In our environment, we saw a logical candidate for such a situation: zPET's flagship Bookstore workload. Bookstore is exactly how it sounds: an E-commerce application centered around, you guessed it, books. The codebase was large, difficult to maintain, and in need of a modernization overhaul. It exploited DB2 for z/OS and IBM MQ, both of which were supported in z/OS Connect Enterprise Edition (EE). But before we could begin bringing REST APIs to Bookstore, the infrastructure first had to exist. This is the story of zPET's journey to "RESTify" a legacy workload.
z/OS Connect Setup
We have found that configuring z/OS Connect is fairly straightforward, especially if you have previous Websphere Liberty experience. To set up z/OS Connect in our environment, we followed the Knowledge Center documentation available HERE
Once installed and configured, you can create your first z/OS Connect server with the following command:
zosconnect create server1 --te
(There are a number of impl
This will generate a base server that can be configured to exploit the various supported z/OS Subsystems.
Defining DB2 REST Services
Defining MQ services in z/OS Connect