+++> 2. SAP HANA Detail Architecture

SAP HANA In-Detail Architecture Overview:
          SAP HANA was developed in C++ language and designed to run on Operating System Red Hat Suse Linux Enterprise Server. Multiple Components are available in SAP HANA. One of the Most important component in SAP HANA is Index Server.
The Main Server in SAP HANA database is Index Server and other Servers are Name Server, Statistics Server, Preprocessor Server and XS Engine, which is used to communicate and host small web applications and various other components.



Index server: Index Server is main important server among all the servers. This server holds the actual data and the engines for processing the data. When SQL or MDX is fired against the SAP HANA system in this case an index server takes care of these commands and processes them. It is used for all type of Calculation’s. Index  server consumes more amount of memory when compared to Other Engines.
Preprocessor server:  This Server deals with all type of Text data. It is small pieces of software, which helps Index server need to process un structured data. analysis and for searching. This helps to extract the information on which text search capabilities are based.

Structured -  Which is Available in Structured data, like Excel data, Word...so on..
Unstructured : PDF, Facebook data, wat's-up, twitter...so on(when we download document manually from Apple store, the pre-processor server will take care that such type of processing..)

Statistics Server:  This Server Takes care of Health of the system and collect the data, Like Data Volumes, Alerts, Performance, resource allocation/consumption and performance weather all the servers are up and running  or not.
Statistics server monitor the entire HANA Database and if there is problem low memory, Cache filled, Dump,performace issue in SAP HANA database, Taking toomuch load and about to crash. This will give you alerts.
Name Server:   The name server owns the information about the topology of SAP HANA system. In a distributed system, the name server knows where the components are running and which data is located on which server.
It contains the system landscape information, also called as topology, How many Index servers are there, Pre-processor servers are there.
When we have Distributed System Landscape, Then the name server will maintain the completed topology in the distributed system.
Usually if we have one instance then the query will fire for that particular instance,  if we have multiple instance(Distributed System Landscape ) which are connected to server, so data is stored in multiple servers. Here Name server will be connected to metadata & provides the information.
Note: - Let's assume if  my Host 2 fails/crashes down, my name server will know which server need to be taken as backup. Basically some buddy should have all the names of servers list, that’s why, name server will maintain all the detail of the landscape.  Or some people use the word as topology; it’s nothing but the landscape.
Persistence Layer:
The database persistence layer is responsible for durability and atomicity of transactions. It ensures that the database can be restored to the most recent committed state after a restart and that transactions are either completely executed or completely undone.
Session and Transaction Manager:
The Transaction manager coordinates database transactions, and keeps track of running and closed transactions. When a transaction is committed or rolled back.

XS Engine:  XS- XS engine is the web application server which is installed within hana database, it is used to support web technologies like HTML, XML, JAVA, PHP.. This is used to develop internet based application, Google maps, which used to support all those application’s.
XS Engine is an optional component which is already installed. Here XS engine is used to connect to web applications. Also XS engine need to be purchase separately. (It’s  a small web application server )
Application developers build applications by using the XS Engine, and the users access the app via HTTP by using a web browser.
Single host configuration.
SAP HANA have multiple components. The Main Server in SAP HANA database is Index Server and other Servers are Name Server, Statistics Server, Preprocessor Server and XS Engine, which is used to communicate and host small web applications and various other components.
In single Host Confirmation we have Index Server ,Name Server, Statistics Server, Preprocessor Server and XS Engine are components used.

Multi node Configuration


What is difference between Host1 And Host2..?
XS Engine & Statists does not exist, These get installed in one host, remaining all will be installed in all hosts.
Each host will have separated Index server, Name Server, Pre-processor dedicated for them.Each host have its on storage.
Here the Name server Comes in Picture, suppose my Host 2 fails/crashes down, my name server will know which server need to be taken as backup. Basically some buddy should have the entire servers list, that’s why name server will maintain all the detail of the landscape.  Or some people use the word as topology; it’s nothing but the landscape.
We can Have Maximum of  16 Nodes in One Landscape

What is HANA studio? & which connection is used to connect?
HANA studio(Eclipse platform) is designed through JAVA, so its connection is JDBC.
Who can install install studio.?
Do it costs.? Yes License cost's
What is the default Prospective in SAP HANA Studio.? Administration Prespective
SAP HANA Administration View


Index Server - Heart of SAP HANA
Index Server is one of main Component  in SAP HANA, which contains the majority of the work is done behind SAP HANA.
Index server should be always up and running. This Sever is supported in all the hosts in SAP HANA System.

Connection & Session Manager:    In Connection & Session Manager there are multiple clients/hosts/Instances. When we run a reports in HANA Database, First request go to index server only,
The movement when we login to SAP HANA system, it directly hits to the Connection & Session Management. This is first interface between you and HANA database. It will store all user credentials;

Authentication:  Once we login to SAP HANA System, firstly it goes to Authentication manager, it checks for authorization, and it decides User ID & password is authenticated or not. Once Connection is successfully it will login to system successfully.

MDX Engine: When we login with MS Excel (Analysis office) and try to access SAP HANA Database it speaks with the language called MDX(Multi Dimensional Expression). Here SAP HANA should be able to understand all connection's, and also it deals with different engines which have installed in SAP HANA System.
MDX Engine will know what data should been requested, Firstly MDX will request Calculation Engine, and further Calculation Engine will create a Calculation model, and Calculation model will request database engine to sent the data to MDX and display the data.

Planning Engine: Whenever the applications like APO, BPC tries to connect SAP HANA systems, it speaks the language called Fox, and create a request for Calculation Engine and in turn Calculation Engine will create Calculation model, , and Calculation model will request database engine and database engine will sent back the data calculation Index server.

SQL Script process:  If it is simple SQL script it will not go to Calculation Engine, it will be broken down into small SQL scripts and it will directly hit SQL Processor.
If there is complex logic like stored procedure, MDX, R Language, Graph engine (map data, not shown here) this entire request will go to Calculation Engine. If you have written a procedure in SAP HANA .Procedure are handled differently.
Calculation Engine will come into picture when the logic is not able to split into smaller parts.

Relational Store: Actual place where the data is going to store either in Row store or Column store, Object Store: (APO data will be stored in live cache (ram), So in Cache data is store in object based storage.

Authorization Manager:  Basically it defines privileges, the authorization manager will access and check the authorization for specific packages, and schemas...so on.

Metadata manager: Inside SAP HANA there are system table/views with atarts with M, those tables stores the data about data such as how man column table, row, memory used in column tables, how
many users created in SAP HANA, how many used are blocked.

Session Parameters: Whenever we login with credentials,  also called Secure storage we haveSmall checkbox to store password. So once your password is stored we don’t need to login every time.

Repository: Repository is a content folder; it stores all the information about all your models,
this is available in the index server.

Transaction Manager:  Each connection is treated a as separate transaction. Each database should be an asset compliance. If the database is not asset compliance then it is not as a database, different transaction has different snapshots.
If a table content is change, every change is not committed,

L Language is used inside SAP HANA to convert the request into calculation model

R Language is a next most language used in SAP HANA, after SQL Language. That why R language is also supported in SAP HANA System.

C++ - All logic is written in C++ as well

To View More detail diagram, Path Below

Standard SQL statement will got to -->SQL Processor-->Execution Plan-->physical plan-->row store or column store and get the data and give it back to SQL processor.

Calculation model:
CE Functions:  when we run EC function in backend it automatically execute a stored procedure.


Multidimensional Expressions (MDX): 

Whenever we want to manpulate the data in OLAP cubes then MDX language for querying is used. Here whatever Incoming MDX requests are processed by the MDX engine and further forwarded to the Calculation Engine.

Page Management & Logger:
This is Covered Under Back-Up & Recovery.

Relational Store
Basically Data is stored in the Row and Column Store.
Disk Based Store: Physical Disk, Data which is not used will be stored in Drive. This is not used as any backup.

Disk Storage:  Writing data into Physical disk. All refresh happens in Persistence Layer & Disk Storage. Suppose if due to unknown reasons power goes shutdown we will be having cold backup or setting up save points.

Data Volumes:
Transaction log volumes:  Initially, during Write phase, all data is written to a log buffer (in memory), Then, after the transaction commit is triggered, it would dump the log buffer to log files (disk). The LOG and DATA volume ensure you do not loose either row or column storage data.

Repository:  Repository is the place where all views are Created.





*************************** End ***********************