Solution architecture
IBM® watsonx Code Assistant™ for Z comprises components that run on prem and in IBM Cloud®.
Architect
First, to understand COBOL applications, an architect uses the functions of Application Discovery and Delivery Intelligence (ADDI). This product runs in a Windows VM and scans source code to provide application insights to architects. The analysis of the source code is stored in a project that an architect can access from an Eclipse-based tool. This tool enables an architect to perform different tasks, including visualizing the relationships between different programs, running reports, and searching code. An architect can use this tool to start modernizing a monolithic COBOL application by identifying potential business services to refactor, with the option of converting it to Java™ by using generative AI.
COBOL Developer
The COBOL developer can use Refactoring Assistant to start extracting the COBOL business service that the architect identified from a monolith application. Refactoring Assistant is a container-based product that has a VS Code extension for developers to visualize and select relevant code to create a new COBOL service. This new COBOL service comprises a business function from many different existing programs. Refactoring Assistant connects to ADDI securely to access the analysis of the COBOL application in the ADDI database.
IBM watsonx Code Assistant for Z on IBM Cloud
COBOL Developer
If the modernization strategy involves converting the COBOL service to Java, the COBOL developer can prepare the COBOL code for transformation, sending the necessary metadata to the Db2® database in IBM Cloud for watsonx Code Assistant for Z. After reviewing and compiling the COBOL code, the COBOL developer can use the IBM watsonx Code Assistant for Z Validation Assistant to generate COBOL test data. This test data can be used later in the process by the Java developer to validate that the Java service is semantically equivalent.
Java Developer
The Java developer uses the IBM watsonx Code Assistant for Z extension in Visual Studio Code (VS Code) to connect to the watsonx Code Assistant for Z service in IBM Cloud. This service is provisioned by using a Cloud account and provides access to the AI foundation model. This foundation model also called a large language model (LLM), is trained on many programming languages and is fine-tuned for converting COBOL to Java. Each developer accesses the service by using an individual API key and connects securely to use the AI. The Java developer uses the COBOL service in the SCM repository to generate Java classes and business logic, and can review and compile the code to complete the Java service. The Java developer can then use the Z Validation Assistant to generate JUnit tests for each Java method to check that the code is semantically equivalent to the COBOL service.
IBM watsonx Code Assistant for Z on prem through IBM Cloud Pak for Data
You can now run IBM watsonx Code Assistant for Z fully on prem through IBM Cloud Pak for Data. Figure 2 shows the architecture for the watsonx Code Assistant for Z on prem.
For the on prem version of watsonx Code Assistant for Z, the Java developer uses the IBM watsonx Code Assistant for Z extension in Visual Studio Code (VS Code). However, unlike the cloud service, the developer connects to the watsonx Code Assistant for Z service that the customer sets up on prem. This on prem service is provisioned through Cloud Pak for Data (CPD) on a Red Hat® OpenShift® Container Platform (OpenShift Container Platform) cluster maintained by the customer, which ensures that all operations and data, including the large language model (LLM), remain within the customer's infrastructure.
Cloud Pak for Data Administrator
The customer, in the role of Cloud Pak for Data administrator, creates and manages users and API keys, sets up the Db2 database, and configures the deployment space for the service on Cloud Pak for Data.
Java Developer
The Java developer accesses the service by using the service endpoint and an individual API key that is provisioned by the Cloud Pak for Data administrator to securely utilize the AI capabilities. Just as in the cloud service, the Java developer uses the COBOL translation service to generate Java classes and business logic through the VS Code client. The Java developer can then use the Z Validation Assistant to generate JUnit tests for each Java method, which ensures that the code is semantically equivalent to the COBOL service.