Wednesday, March 16

SAP EP-J2EE architechture

Introduction
This post will discuss about the important components of portal technical infrastructure.
I will talk about the main components called SAP WAS, ABAP and TREX. I will also dicuss about the minimal WAS java installation and a large cluster installation in which we use load balancer.  Once you have a complete understanding of the J2EE infrastructure, you are in a position to design a optimal portal infrastructure which will have all the important features : high availability, scalability, performance, security, and so on.

Components of a Portal Infrastructure
Various systems and devices comprise or come together to form the technical infrastructure :  operating systems, network systems, firewalls, high availability solutions, load-balancing devices, and storage devices etc…

Major components of a portal technical infrastructure are :
• Web clients
• Internet browsers
• PDAs
• Mobile solutions
• Web infrastructure
• Load balancer
• Web servers
• Web dispatchers
• Proxy servers
• Portal server
• Portal platform
• Knowledge management
• Content management
• Collaboration platform
• J2EE engine
• Web AS database
• User Management Engine (UME)
• TREX components
• Web server
• Retrieval and Classification Engine
• Retrieval and Classification Index


In this post I shall discuss mainly about the J2EE architecture and the TREX components.


Web AS Java Architecture
We will have a look at components in a Web AS Java installation. A typical installation has
a central instance, a central services instance, a Java instance, and a database instance.

What does the central instance consist of ? it consists of a dispatcher, a server, and a Software Delivery Manager (SDM).
The central services instance contains the message service and the enqueue service
installed together on one machine.
The Java instance does not contain an SDM. The Java instance can contain a dispatcher and one or more J2EE server processes.

These various instances can be installed on separate physical machines and if they are installed in this way, scalability and availability of the system can be enhanced.


When we form a java cluster, more than one java instances can be there but only one central service instance. If there are more than one java instances then there has to be a load balancer such as a sap web dispatcher to distribute the load or the incoming requests to various java instances in the cluster.

A java instance has n number of server processes. The number of server processes available in a java instance depends upon RAM of the host on which that Java instance is installed.

Apart from server processes, a Java  instance has something called java dispatcher.
It is a kind of load balancer that receives the client request and forwards it to the server process. Message service tells the java dispatcher as to which is the most suitable server process to which the request should be routed.
Server process will process  the request and will store the user session.
The java instance in the cluster which has a SDM installed on it is called the central java instance.
There is something called Java Startup and Control Framework which is used for starting and stopping the Java instance. So it can be controlled and monitored using the SCF.

NetWeaver AS Java vs. Add-In Installation
There are two types of installations possible for Netweaver WAS : Netweaver AS Java only and netweaver AS Add-in system installation.
The add-in installation is a dual installation which consists of both the stacks : the java and the  ABAP stack. The Netweaver AS Add-in installation is needed only when XI is also needed only If we are implementing SAP XI. SAP enterprise portal can run only if the simple installation without add-in is available.
If dual installation is used for portal installation then it will expose the abap layer to internet.
And ABAP layer is generally used to host SAP ECC, SAP CRM, SAP SCM etc. This information is very crucial and sensitive for a company and therefore should not be exposed to the internet.
If portal is required to be installed then it is recommended to use Netweaver AS Java only.

Central Instance
There always can be only one central instance per sap Installation.

Java Stack of the Netweaver AS Add- In installation consists of the following.
• Java dispatcher
• Java Server processes
• Software Delivery Manager (SDM)
• Internet Graphics Service (IGS)

ABAP stack consists of the following:
• ABAP dispatcher
• Work processes
• Gateway
• Enqueue server
• Message server
• CCMS agent SAPCCMSR
• Internet Communication Manager (ICM)
• IGS


Central Services Instance
Java Stack has components called the enqueue server and Message server Which are responsible for communication and synchronization in the java cluster across server and dispatcher nodes.
Server process in java stack is analogous to work process in ABAP stack. When a incoming request comes from a client, the ICM receives it and routes it to appropriate dispatcher. If it is a java request, it is routed to java dispatcher and if it is a ABAP request, it is routed to ABAP dispatcher. The dispatcher routes it to appropriate server process in case of java or a work process in case of ABAP.


Dialog Instances
Dialog instance is also called an application server. It is most often referred to as a application server and it is usually installed on a separate host. A dialog instance can be added to  existing cluster. When a dialog instance is added in the cluster, the central instance initiates an update of the dialog instance so that dialog instance comes to know which all applications are deployed in the cluster so that dialog instance can access those applications. A dialog instance can be a java or a ABAP instance.

Following are the components in the Java dialog instance:
• Java stack or the Java dialog instance
• Java dispatcher
• Java Server processes
• IGS

For ABAP Dialog instance:
• ABAP stack
• ABAP dispatcher
• Work processes (dialog, batch, spool, or update)
• Gateway
• IGS
• ICM


Java Dispatcher Components
Java Dispatcher that has the following components:

connection request handler
connection manager,
load balancer
session level services,
request queue  and
communication handler.

As soon as the connection request handler receives a request, it initializes a connection object.
Then connection manager analyses the request and submits it to appropriate session service such as HTTP, RMI etc. Requests can also be placed in queue is they are many I number. The communication handler in dispatcher then forwards the request to the communication handler in the server process.


Java Server Process
Dispatcher sends requests to server processes. Server process has a component called communication handler. Communication handler receives the incoming dispatcher requests. In order to process the request, there should be a thread available. If no thread is available, the request is send in a queue. Communication handler sends it to session service which in turn sends it to the application level service where it is actually processed by the java application.
In order to fine tune WAS Java’s performance, you must be aware of the components of java dispatcher and the server.

SAP Management Console
WAS can be managed by a tool called sap management console. From here the administrator can monitor all the servers and services that are running in the cluster. And it can be installed as a part of portal installation.


Java Startup and Control Framework
Java startup and control framework is a important feature of SAP Netweaver application server.
There are two main programs contained in it : The JControl and the JLaunch. If someone stops and service deliberately or accidentally, the JControl program makes it sure that the service is up and running again. The JStartup program takes care fo the processes that may have crashed. So it restarts the processes that are crashed. It loads the JVM. So these features of the Control and Startup framework makes sure that the system is available all the time.

TREX: Technical Infrastructure
Working of TREX is independent from portal. There are few things for which TREX is used like :

• Searching and retrieving large document collections
• Text mining
• Automatically classifying documents
• Searching information from SAP applications

TREX is based in a client server setup.

TREX Client
Where is TREX used ?

Mostly TREX is used for searching. In portal, there is a service called content management. In content management, search for the content can be done using the TREX client. TREX client essentially is a application programming interface which can access various TREX functions like creating searches and indexes, querying internal status of TREX etc. TREX client can be of two types : the TREX java client and the TREX ABAP Client.
If SAP ABAP system wants to communicate with the TREX server, RFC server component of the TREX comes into picture. SAP system send the requests to RFC server component and it converts it into in a format which TREX can understand and then routes it to the TREX server.

Summary of the post
In the above post, I discussed about the J2EE engine and TREX engine.
During the discussion of J2EE engine, we saw types of installations of WAS viz simple java stack installation (sufficient for EP installation) , Add-In installation, minimal installation and cluster installation. We saw how load balancing in case of a cluster installation is done. We learnt about various components of WAS installation; various components like sentral instance, central services instance, dialog instance, message service, enque service, dispatcher process, java server proceses etc. We learnt about the Java startup and control framework. Knowledge of all these components is very useful after while portal implementation and more useful after the portal has gone live and you need to support it.

Related Articles :




No comments:

Post a Comment

You are welcome to express your views here...