A Simple Web Service Framework from Core-I Solutions
May 20, 2020 Alex Woodie
It can sometimes be difficult for IBM i shops to communicate with the outside world. RPG developers can get lost in the weeds of trying to figure out how to move data off IBM i to another platform. One potential solution is a new REST/Web services framework called Corei RSt that its creator says will simplify APIs.
According to Core-I Solutions principal Jefferson Vaughn, a senior software engineer based in South Carolina, the Corei RSt framework streamlines the process of exposing IBM i data to business partners, customers, and outside developers who aren’t inside the company’s intranet.
The framework leverages the Apache HTTP Server to connect incoming Web services requests to pre-built backend IBM i programs, which fetch the data from Db2 for i and returns it back through the HTTP Server to complete the API request.
The APIs created by Corei RSt includes two components: the URL command that instantiates the connection and tells the backend API library what program to invoke, and the IBM i programs that fetch the data. The backend IBM i applications could be anything supported on IBM i, but Vaughn typically sees an RPG-SQL application being used, as the program can be re-used more easily within the organization.
Once the framework is set up, it’s easy for developers to create new APIs on the IBM i server and to expose them to other platforms and users, Vaughn says. These APIs can be configured to accept payload in JSON documents, or to use a traditional REST approach, depending on the need.
APIs that accept REST payloads are simpler to create and typically are used for smaller, more targeted data requests, usually originating from outside the company’s VPN, Vaughn says. The JSON technique, on the other hand, is more complex to set up, serves much more data with a single API request, is and is typically used by front-end developers within the company’s VPN to serve GUI applications with Db2 data, he says. (In the latest release, XML is also supported, he says.)
Similarly, the Corei RSt software works with both HTTP and HTTPS connections that are protected with TLS 1.2 certificates. Again, HTTP is typically used for requests that come from within the firewall, while the encrypted HTTPS connection would be used for outside communications.
Vaughn says he developed Corei RSt after experiencing how frustrating it can be to get data off the IBM i server.
“Many RPG shops I have been in have been structured in a way where the sys admin and architects may put frameworks in to place that the RPG developers work on,” Vaughn tells IT Jungle via email. “Those frameworks keep the developers in a functional area that allows them to efficiently do their relational database development with minimal framework issues and distractions.
“However, this whole separation of duties thing can be a bit of a frustration for us developers that are anxious to get into cross platform development, and where our organization has not provided any sort of efficient way to allow us to write our IBM i programs to move data to other systems,” he continues.
Instead of getting lost in the technical weeds of moving data off IBM i, such as by using sockets, Corei RSt lets developers focus on their primary goal: translating business needs to functional software.
“I would expect this Corei RSt product be at the hands of an IBM i shop’s lead architect or administrator,” he continues. “With this very simple yet powerful framework, it can be deployed to allow your development team to create APIs with no learning curve at all.”
Vaughn, who has been developing on the IBM i platform for over 20 years, also offers an encryption tool for data residing in Db2 for i. That tool, which uses AES crypto libraries, is a good fit for the Corei RSt framework, he says. He also has developed a managed file transfer (MFT) tool through his website at https://www.jeffersonvaughn.com/.