SAP HANA Cloud Platform supports 3 variants of Java runtime. The first Java runtime that was integrated with HCP was Java Web. This used OSGi based kernel and JDK 6. Next logical step was to get the runtime certified and thus came Java EE 6 web profile that is the Java EE certified runtime for HCP. It also used OSGi based Kernel and runs on JDK 7. Certainly this is more scalable and supports a lot of features. Then came the Java Web Tomcat 7 runtime which was more lightweight and simplified. It used Apache Tomcat 7 and runs on JDK 7. For most of the productive scenario, this is a quite stable and recommended runtime. You can find the feature comparisons in the table below:
However recently SAP has released a new Java runtime. The new JAVA Tomcat 8 runtime. Though, the released version is a BETA now and you cannot use this in a HCP account at this moment, pretty soon it's gonna be GA and thus let's have a look what brings this new runtime. Tomcat 8 runtime comes with the following specifications:
Servlet 3.1
Now let's have a look what's the benefit of Servlet 3.1
Servlet 3.1 comes with two powerful features:
1. Non-Blocking IO: Servlet 3.1 allows you to use two Interfaces namely ReadListener and WriteListener.
https://docs.oracle.com/javaee/7/api/javax/servlet/ReadListener.html
https://docs.oracle.com/javaee/7/api/javax/servlet/WriteListener.html
These two interfaces allows call back functions on various IO events. Thus if you use this for example to read IO streams, the Servlet will not wait to get the stream, rather work in a Asynchronous mode. Similarly the write IO operation will be in a Asynchronous mode without blocking the process in the main servlet.
This is a very powerful feature in a sense esp. when a Servlet needs to cater huge stream of data in a more scalable solution like for example Millions of IOT Sensors sending sensor values within a very short time span. I will explain the feature with code example in my next blog - Part 2.
2. HTTP Protocol Upgrade: This feature allows Servlet to upgrade the protocol following a HTTP header with Upgrade command. This acts much in similar way as Web Socket works, but has more versatile effect. I will explain the feature with code example in my next blog - Part 3.
Also Tomcat 8 supports some of the good features like:
Caveat: At this time Java Web Tomcat 8 V.3.2.14 is available for download and use from HCP Tools site:
However HCP trial account has not started to support the runtime yet. So you can try it only on local environment.
Using Java Web Tomcat 8 environment:
Step 1: Download the runtime zip from HCP Tools site and save it in local folder.
Step 2: Go to Eclipse and set up runtime.
Windows Machine: Windows -> Preferences -> Server -> Runtime Environment
Mac: Preferences -> Server -> Runtime Environment
Just Add -> and choose the unzipped runtime folder where you saved the runtime in step 1.
Finish and you are ready to use the new Runtime !!! Enjoy!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
31 | |
13 | |
12 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
6 |