Co-Author Brandon Ferrell is a Senior studying Software Engineering at the University of Texas at Dallas; Co-Author Adnan Hemani is a Junior studying Computer Science at the University of California – Berkeley.
As summer interns on the Application Enablement squad in IMS, we’ve been working to prototype and evaluate a new access method to IMS – using the open-source, server-side scripting programming language, Node.js. Recently IBM released a new beta version of Node.js for z/OS, which we used to evaluate Node.js access to an IMS database.
Why did we focus on Node.js? And what can you learn from it?
Node.js is one of the newer languages that are becoming very popular among new developers. NPM (Node Package Manager) is growing exponentially in the number of packages that it supports. Figure 1, from www.modulecounts.com, gives you an idea.
What we investigated
We investigated two solutions – one was a Node.js application that served as a wrapper around a Java application that uses the IMS Universal JDBC driver, and the other was to use the JDBC NPM module.
The second solution is to use the preexisting JDBC NPM module. This module spins up a Java Virtual Machine (JVM) and provides a Node interface to the standard JDBC methods for creating a connection, executing queries and processing results. We ended up modifying the module in order to optimize the performance of how result sets were being processed.
Getting Node.js for z/OS up and running
To get Node.js running on z/OS, you will need to download the IBM SDK for Node.js. There are some additional pre-requisites needed in order to run the installer. Most noticeably you need Perl for z/OS to run the installation script, which can be downloaded from Rocket Software.
Getting a baseline performance metric
Before evaluating how Node.js performs on z/OS, we initially ran the two prototype applications in a distributed environment (MacBook Pro, using OSX). The local machines served as a way to find an approximate baseline performance benchmark. Below are our findings, the elapsed time measurements (in milliseconds) while running in a distributed environment:
Due the portability of Node.js, we then deployed the same applications to z/OS. Here we ran into trouble with some of the dependent NPM modules for the Node JDBC module. In particular, the Java NPM module (which is responsible for instantiating the JVM) count not be installed due to unsupported compiler options by the xlc++ compiler (z/OS’s version of g++). We believe that given enough time we could have worked around this issue but were unable to resolve it within our 10-week internship. Below are the performance measurements (elapsed time in milliseconds) for the other applications on z/OS:
From the results above, we can see that we are able to access IMS using Node.js. It does perform slower than using the IMS JDBC driver directly, but that’s expected as we’re adding another layer on top of the JDBC driver. As for Node.js on z/OS specifically, there is still some work that will need to be completed for z/OS compatibility with different NPM modules. Once that is completed, it will allow the capability to integrate a wide variety of NPM modules within your application, thereby unlocking additional value for your Node.js applications. While this solution isn’t officially supported by IMS, the results of our summer internship helps to prove that such a solution is possible.
Feel free to let us know if you feel that Node.js support for IMS would be beneficial for you (or your company) in the comments below!