This topic has been locked.
1 reply Latest Post - 2009-01-13T16:02:46Z by JonathanPLawrence
Pinned topic Web Development in CICS TS
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
I recently saw that PHP is available on CICS TS and would like to know more. I want to be able to deliver browser-based applications hosted by CICS TS. I've read some of this material and am hopeful that PHP on CICS might be able to do this. I see that it has some prerequisites. I'm at 3.1 but it looks like we need 3.2. That's not too bad for us to do. Is there anything else we need to buy or license? Is PHP on CICS scalable? How's the performance? What about the development environment?
Updated on 2009-01-13T16:02:46Z at 2009-01-13T16:02:46Z by JonathanPLawrence
JonathanPLawrence 120000CY9630 PostsACCEPTED ANSWER
Re: Web Development in CICS TS2009-01-13T16:02:46Z in response to SystemAdminThank you for your interest in PHP in CICS. Here are some responses to your queries:
>>> I want to be able to deliver browser-based applications hosted by CICS TS. I've read some of this material and am hopeful that PHP on CICS might be able to do this.
Yes that is possible, however you should bear in mind the intended use cases for PHP in CICS described at the end of this post.
CICS TS has provided the capability to deliver browser-based applications hosted by CICS for many years, using various CICS Web Support based technologies. This SupportPac extends these capabilities by allowing PHP to be used as the implementation language, primarily intended as an integration and rendering layer, and to enable CICS assets to be exposed as REST resources.
>>>I'm at 3.1 but it looks like we need 3.2.
Yes, because the PHP support is built on Java(TM) and requires Java SDK 5.0 which is only compatible with CICS TS v3.2.
>>>That's not too bad for us to do. Is there anything else we need to buy or license?
You will need to check the prerequisites for installing CICS TS v3.2 (Link: http://www.ibm.com/software/htp/cics/tserver/sysreqs/index.html), and the CA1S SupportPac (Link: http://www.ibm.com/support/docview.wss?rs=1083&uid=swg24021196 ), however there are no other priced prerequisites for CA1S.
>>> Is PHP on CICS scalable?
PHP support in CICS is based on IBM® WebSphere® sMash technology, which includes a PHP interpreter written in Java. In CICS, this runs in a CICS JVM in continuous mode (REUSE=YES), and each JVM supports a single serially reusable instance of the PHP runtime. This means that a separate JVM is required for each concurrently executing HTTP request which uses PHP. The PHP runtime within each JVM is maintained between requests and is automatically reused without requiring reinitialisation.
The CICS Java class cache (CLASSCACHE=YES) may be used with PHP support, and is enabled by default for CA1S.
>>> How's the performance?
We have measured the performance for some typical simple scenarios, and for a simple PHP script invoking a CICS COBOL program, including populating and extracting the commarea data before and after the call, the CPU was less than 10ms (3 - 4 million instructions). This applies to both the REST and standard PHP invocation styles. Since PHP processing is almost entirely Java workload, a high proportion - nearly 85% - is zAAP eligible.
Our COBOL program was extremely lightweight and consumed negligible CPU in our tests. A more realistic scenario would be for the underlying CICS workload to use more CPU so that the proportionate overhead cost of using PHP would be reduced. For example a typical modern CICS transaction might use 3 - 5 million instructions and so adding a PHP front end would approximately double that. The intended use cases for PHP in CICS are to provide a thin wrapper layer around existing CICS assets, performing integration and rendering, rather than the main bulk of processing for an application.
The PHP runtime used in CA1S is still under active development and one of the main focus areas is performance, so improvements should be available in any future updates to the SupportPac. One area of improvement is the generation of Java bytecode from a PHP script so that the JVM can effectively JIT compile the script thereby eliminating one layer of interpretation at runtime.
>>> What about the development environment?
PHP scripts for CICS can be developed using any suitable editor or development tool. None is provided with the SupportPac, however the Eclipse(TM) PDT (Link: http://www.eclipse.org/pdt/) is a freely downloadable development environment for PHP, and the CICS PHP runtime also supports PHP debugging using this tool as described in the SupportPac documentation.
IBM has released CICS SupportPac CA1S: REST support in CICS using PHP, as a CAT-2 (unsupported) SupportPac with the following intent:
- To gauge interest and obtain feedback and requirements for PHP support in CICS.
- To allow existing CICS assets to be exposed as REST resources for integration with mashups and other Web 2.0 technologies, for example using IBM® WebSphere® sMash.
- To enable the rapid and easy development of situational Web applications, with PHP as the integration and presentation front-end to CICS.
With this in mind, one possibility to deliver browser-based applications hosted by CICS TS might be to use PHP as a rapid prototyping technology for the proposed Web applications (to obtain feedback from users on usability, presentation etc.), and then to reimplement using native CICS Web Support for high-volume production deployment of the critical applications.