Implementing IBM CICS JSON Web Services for Mobile Applications

IBM Redbooks Solution Guide

Abstract

This IBM® Redbooks® Solution Guide describes the existing and new aspects of IBM CICS® Transaction Server that allow you to move your CICS applications, and business, into the mobile space. This Solution Guide gives you an overview of how to connect mobile devices to IBM CICS Transaction Server, to use existing enterprise services that are hosted on CICS, or to develop services that support new lines of business (LOB). We summarize the steps to develop, configure, and deploy a mobile application that connects either directly to CICS Transaction Server or to CICS through IBM Worklight® Server.

Contents

This IBM® Redbooks® Solution Guide describes the existing and new aspects of IBM CICS® Transaction Server that allow you to move your CICS applications, and business, into the mobile space. This Solution Guide gives you an overview of how to connect mobile devices to IBM CICS Transaction Server, to use existing enterprise services that are hosted on CICS, or to develop services that support new lines of business (LOB). We summarize the steps to develop, configure, and deploy a mobile application that connects either directly to CICS Transaction Server or to CICS through IBM Worklight® Server.

Figure 1 gives an overview of this solution.


    Figure 1. IBM CICS JSON Web Services for Mobile Applications overview


    Did you know?

    For many years, CICS Transaction Server has been capable of hosting mobile enterprise services. The introduction of web services capabilities in CICS Transaction Server V3 provided the fundamental building blocks of service connectivity, enabling the adoption of a service-oriented architecture (SOA), and underpinning today’s mobile solutions. CICS developers continue to add capabilities to the run time. From a mobile perspective, the introduction of the CICS TS Feature Pack for Mobile Extensions provides JSON and RESTful web service support, further enhancing the options for enterprise applications to mobile devices.

    Customers around the world use CICS Transaction Server to host hundreds of millions, and in some cases billions, of transactions per day. As the number of mobile devices worldwide continues to grow, so does the variety and volume of workload that they drive. CICS has the capacity to scale up in support of this increasing mobile workload, providing an exceptional platform for hosting mobile workloads.


    Business value

    By extending existing enterprise applications onto a mobile platform, a business can capitalize on its existing investment without needing to develop a new solution to support mobile services. In addition, a LOB can now offer service to consumers who increasingly expect to be able to interact with a company by using their mobile phone.

    As a platform, here are the primary benefits that are offered by CICS in support of mobile devices:
    • Reuse of existing enterprise services.
    • Using the proven web service technology within CICS, it is relatively simple to build a set of enterprise services that can be used by a mobile device.
    • Simplified consumption of enterprise data using Java script Object Notation (JSON) formatted data. A common misconception is that enterprise data within CICS can be hard to use. The CICS TS Feature Pack for Mobile Extensions provides support for JSON data, which is rapidly becoming the de facto standard format for data interchange on mobile devices.
    • CICS operates at the heart of the enterprise. Hosting mobile applications within CICS brings them closer to the enterprise data they are accessing, minimizing application path-lengths and keeping response times down.
    • Adopt a RESTful architectural style for service delivery. A RESTful architectural style is one where the target resource, and the operation to be performed against it, are defined by a combination of a structured URI and one of the four HTTP methods: Get, Post, Put, and Delete.
    • Capacity to manage mobile workload. As noted earlier, customers around the world use CICS Transaction Server to host hundreds of millions, and in some cases billions, of transactions per day. CICS Workload Management provides a robust and scalable platform suitable for supporting the heaviest of mobile workloads.


    Solution overview

    We introduce four different approaches to building mobile services within CICS Transaction Server.

    Here are summaries of the four approaches:
    • The top-down approach

      The top-down approach, which is shown in Figure 2, is the preferred method of building new enterprise services for mobile application within CICS. This approach lends itself to the RESTful architectural style where the target resource, and the operation to be performed against it, are defined by a combination of a structured URI and one of the four HTTP methods: Get, Post, Put, and Delete. This approach allows you to create a set of services with a concise interface.


      Figure 2. Top-down - a possible way to implement a JSON web service starting from the JSON schema
    • Bottom-up

      The bottom-up approach, which is shown in Figure 3, is perhaps the fastest approach for delivering enterprise services to mobile devices. Building on an existing SOA, the bottom-up approach allows you to define a JSON or SOAP interface to an existing COBOL, C/C++, PL/I, or Java application. This approach maximizes the reuse of existing assets, and minimizes the creation of new components.

      Figure 3. Bottom up - an architecture that allows you to configure and enable a JSON web service that driven by your high-level language data structure
    • Requester mode

      The requester mode approach, which is shown in Figure 4, allows CICS to participate in JSON-based interactions using LINK, and to make requests against external service providers that offer a JSON-based interface. Although it is not strictly a pure mobile scenario, the capabilities that are offered by the CICS TS Feature Pack for Mobile Extensions provide CICS with additional options for connecting to the wider enterprise using JSON formatted data.


      Figure 4. LINKable - a LINKable CICS program can be used to transform your data between high-level data structures and JSON
    • JAX-RS

      JAX-RS is a Java API for RESTful web services. As shown in Figure 5, it is a programming interface that provides support in creating web services according to the Representational State Transfer (REST) architectural pattern. REST is an architecture style for designing networked applications without needing complex mechanisms, such as CORBA or SOAP. The pattern involves client/server communications where the state of an application is held by the client, which reduces the processing that is required on the server. Using the IBM WebSphere® Liberty Profile provided in CICS TS V5.1, you can write your business applications by using JAX-RS.


      Figure 5. JAX-RS - JAX-RS provides rapid and easy development and deployment of RESTful enabled Java applications


    Solution architecture

    The architecture for an enterprise mobile solution that is based on CICS varies depending on the business requirements and the business data that the applications require. We describe two solution architectures: direct to CICS and a two tier Mobile - Worklight - CICS solution.

    The direct to CICS solution is one where the mobile devices communicate directly to CICS. In this architecture, other devices communicate with CICS through the existing web services that are provided through CICS. This scenario is ideal when the devices and networks that are involved are all trusted, and the applications that are involved do not require frequent updates or do not run on multiple platforms.

    An alternative solution is an architecture with one or more layers between CICS and the user devices. IBM Worklight is a solution that provides governance and security for your mobile applications along with a powerful SDK for rapid development of your enterprise applications on most major platforms. In this architecture, the mobile devices communicate with the IBM Worklight Server to ensure that the device has the correct privileges to make the request to CICS. If this request is approved, it is sent to CICS and the CICS application is run. IBM Worklight also manages the versioning of applications, allowing a new version of the application to be created without needing multiple version of the back-end business applications with the logic to handle the different requests. Features such as notifications on the different platforms are also handled and standardized by IBM Worklight.

    Figure 6 shows a typical architecture of how IBM Worklight and IBM CICS TS can be used in conjunction to extend the reach of your CICS applications to a mobile platform.


    Figure 6. A typical implementation of IBM Worklight and IBM CICS TS to enable mobile devices to access services that are hosted on CICS TS


    Usage scenarios

    The following scenarios show three ways in which CICS TS can be used to solve your enterprise mobile business solutions:
    • As an insurance company, you want your policy holders to be able to view and makes claims on their policies directly from their mobile device. To remain competitive, the mobile application must be available as soon as possible. To facilitate rapid development and provide your services that are hosted on CICS to the application, you choose to take the “bottom-up” approach. Using your COBOL copy books, you generate the JSON schema that allows the mobile application to communicate with CICS web services with a lightweight payload. CICS manages the transformation between the JSON and COBOL copy book structure and your CICS services are made available.
    • As a CICS Service provider, you have a business requirement to make your CICS applications available through a standardized RESTful pattern. By using the “top-down” approach, you can externalize your existing and new CICS services through a RESTful architecture, which allows your services to be called through a unified approach that is understood throughout the business
    • As an airline carrier, you need data from your business partners to accurately allocate seating through your on demand ticket purchasing system. You are informed that your business partner externalizes their services only through a RESTful pattern with JSON as the data format of choice. You can use the new CICS provided LINKable program along with the existing CICS web API to communicate with the business partner without the added cost of development and maintaining a bespoke communication layer.


    Integration

    CICS enterprise mobile solutions can be deployed in a product stack with the following IBM products:
    • IBM Worklight is a hybrid mobile solution offering governance and a powerful SDK to build applications with a server component that drives the mobile world.
    • IBM DataPower® allows you to secure, integrate, and optimize SOA capabilities that scale.

    In addition, your CICS Enterprise mobile solutions work with the existing solutions that you are familiar with along with CICS Transaction Server:
    • IBM WebSphere MQ
    • IBM DB2®
    • IBM Integration Bus (formerly, IBM WebSphere Message Broker)


    Supported platforms

    CICS web service support is available from CICS Transaction Server V3 onward. For more information about CICS Transaction Server V3 requirements, see http://www-01.ibm.com/software/htp/cics/tserver/sysreqs/.

    CICS Transaction Server Feature Pack for Mobile Extensions V1.0 is available on CICS TS V4.2 and CICS TS V5.1. For more information about the requirements of CICS Transaction Server Feature Pack for Mobile Extensions V1.0, see http://www-01.ibm.com/software/htp/cics/tserver/sysreqs/.


    Ordering information

    This product is available only through IBM Shopz. It lists the components of IBM CICS Transaction Server that you may use for enabling your CICS enterprise mobile solutions. Table 1 shows the ordering part numbers and feature codes. You can access IBM Shopz at the following website:

    https://steamboat.boulder.ibm.com/webapp/ShopzSeries/ShopzSeriesIIP.jsp

    Table 1. Ordering part numbers and feature codes
    Product nameProduct ID
    CICS Transaction Server Feature Pack for Mobile Extensions V1.05655-Y48
    CICS Transaction Server V5.15655-Y04
    CICS Transaction Server V4.25655-S97


    Related information

    For more information, see the following documents:

    Special Notices

    This material has not been submitted to any formal IBM test and is published AS IS. It has not been the subject of rigorous review. IBM assumes no responsibility for its accuracy or completeness. The use of this information or the implementation of any of these techniques is a client responsibility and depends upon the client's ability to evaluate and integrate them into the client's operational environment.

    Profile

    Publish Date
    19 September 2013


    Rating: Not yet rated


    Author(s)

    IBM Form Number
    TIPS1066