SAP Web Application. Server Principles. Dr. Masoud Aghadavoodi Jolfaei. Thomas Becker. Applications. Systems. Products. Analytics. Software.

Size: px
Start display at page:

Download "SAP Web Application. Server Principles. Dr. Masoud Aghadavoodi Jolfaei. Thomas Becker. Applications. Systems. Products. Analytics. Software."

Transcription

1 SAP Web Application Server Principles Dr. Masoud Aghadavoodi Jolfaei Thomas Becker SAP AG The SAP Product Portfolio SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 3 What does S - A - P st for? Software Analytics Projects Strength Action Passion Software And People Systems Applications Products SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 2 mysap ERP - The Fundament to Growth SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 4

2 mysap Business Suite Industry Solutions mysap Aerospace & Defense mysap Automotive mysap Banking mysap Chemicals mysap Consumer Products mysap Engineering, Construction & Operations mysap Financial Service Provider mysap Healthcare mysap Higher Education & Research mysap High Tech mysap Industrial Machinery & Components mysap Insurance mysap Media mysap Mill Products mysap Mining mysap Oil & Gas mysap Pharmaceuticals mysap Professional Services mysap Public Sector mysap Retail mysap Service Providers mysap Telecommunications mysap Utilities SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 5 Interenterprise Collaboration: Today Customer 2003 Supplier Head office OEM INTERNET Globalization Internet Specialization Subcontractor Buyers' market Supplier Raw materials SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 7 Interenterprise Collaboration: Yesterday Customer 1975 Supplier Head office OEM Subcontractor EDI** EDI EDI Start of globalization Mainframe computers, 1:1 connections Increased specialization Transition to buyers' market Raw materials EDI EDI Supplier SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 6 Turning Revolution Into Evolution 3-Tier Client/Server SAP Basis Enterprise Services Architecture SAP NetWeaver Business Requirements Integrated processes X Mainframe Arch. ABAP Mainframe Scalable processes Client/server Adaptive processes Web Services Replace Replace Extend Extend Technology Advances SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 8

3 The Next Technology Wave - Reuse instead of Replacement R/2 SAP mysap.com mysap Business Suite R/2 Basis SAP mysap SAP NetWeaver Basis Technology SCM 3-tier Client/Server Mainframe Enterprise Services Architecture ERP HCM CRM PCAs COMPOSITION AUTOMATION (Centralization, corporate rules) DISTRIBUTION (team- (team knowledge driven corporation) (Decentralization, high end functional systems) SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 9 SAP NetWeaver Openness Interoperability Extensibility Through.NET WebSphere IBM WebSphere SAP NetWeaver Microsoft.NET Portal Development Kit for WebSphere Integration of Lotus Sametime PEOPLE INTEGRATION Multi channel access Portal Collaboration Portal Dev. Kit for.net Smart Client on.net MS Office Integration MS Exchange Integr. Integration with IBM Content Manager INFORMATION INTEGRATION Knowledge Mgmt Business Intelligence Master Mgmt Integration of MS Content Mgmt Server Integration of SQL Server Analysis Serv. Interoperability with WebSphere Business Integration PROCESS INTEGRATION Integration Broker Business Process Mgmt Interoperability with MS Biztalk Server Eclipse Java IDE Technical, stardsbased connectivity (XML, Web Services) APPLICATION PLATFORM J2EE ABAP DB OS Abstraction Visual Studio.NET int. Technical, stardsbased connectivity (XML, Web Services) = delivered SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 11 SAP NetWeaver The total integration application platform for lower TCO w e r k o m r a F n t io a lic p A e it s o p m o C SAP NetWeaver People Integration Portal Collaboration Information Integration Business Intelligence Process Integration Integration Broker Multi-Channel Access Knowledge Management Master Management Business Process Management Application Platform J2EE ABAP DB DB OS Abstraction L ife C yc l em a na g em e nt Unifies aligns people, information business processes Integrates across technologies organizational boundaries A safe choice with full.net J2EE interoperability The business foundation for SAP partners Powers business-ready solutions that reduce custom integration Its Enterprise Services Architecture increases business process flexibility.net WebSphere SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 10 Overview SAP Business Suit SAP Web Applicatin Server ABAP Engine Remote Function Call (RFC) vs. Remote Procedure Call (RPC) Process Administration Transaction Concept SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 12

4 Web Application Server base Architecture (Multi-Level Systems) transfer between DB server application server(s) DB WP DB Server DB cache User communication WP Application Server(s) local data Frontend(s) / Presentation Server(s) SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 13 Selecting the right GUI: Feature Overview SAP GUI for Windows SAP GUI for Java SAP GUI for HTML SAP core functionality Office Integration Viewing / export Makros Viewing / export Makros Desktop access Filetransfer Local printer PDF Mail Print preview Local printer (on Windows) PDF Mail Frontend Printing PDF Mail Business graphics Selected graphic types GuiXT Browser Integration SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 15 SAP GUI Family: Network Topologies Remote Computing Branch Offices Windows Terminals NCs Public Internet Satellite Link Cross- Platform Desktops Web Computing Terminal Server / MetaFrame Server Farms Wireless Terminals Information Appliances Subsidiary / Branch Office SAP software can be accessed from almost everywhere SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 14 SAP Web Application Server (Release 6.20) Integrated J2EE Server Dispatcher Processes Gate -way ABAP Engine Internet Communication Manager ICM J2EE Server Processes J2EE Dispatcher RDBMS J2EE Engine ABAP: Advanced Business Application Programming J2EE: Java 2 Enterprise Edition SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 16

5 SAP Web Application Server Architecture Internet SAP GUI RFC Client/Server HTTP HTTPS SMTP DIAG RFC Internet Communication Manager ICM Dispatcher Processes Gateway RDBMS RDBMS: Relational base Management System SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 17 Communication in distributed systems Communication between processes is a central part of each distributed system. Without communication, only a collection of autonomous processes without the possibility to cooperate existed. Problem in distributed systems: Need for an easy model to communicate efficiently Solution: Client/Server Model Remote Function Call (RFC vs. RPC) SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 19 SAP Web Application Server Features Stard Web protocols HTTP Server Client functionality HTTPS, Server Client Certificates (X.509), 128 bit encryption WebDAV, SOAP, SMTP Integrated SAP Environment Usual SAP development deployment infrastructure Internationalization Monitoring system management User management, authorization concept Stard Web documents HTML XML / XSLT Common SAP communication RFC, BAPI, IDOCs, ALE, Page based Web programming Business Server Pages (like JSP) SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 18 RFC Varieties Synchronous RFC Asynchronous RFC With without returning values With without keeping remote session With without server group selection load balancing Transactional/Queued RFC (exactly once) Exactly one execution determined order with Queued RFC SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 20

6 RFC Features Calling Functions in SAP Web Application server remotely Provided Services Name server (realized as an ABAP transaction) Execution of remote functions Marshaling/Unmarshaling of parameters Compression/Uncompression of data Delta Management for tables parameter Load balancing heuristic group based load distribution at connection setup Tracing Logging of runtime behaviour error situation Debugging Analyzing the execution of the remote function Statistics Evaluation of function processing time Security Authentication, Authorization Auditing SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 21 Distribution Transparency: Sync. RFC Hide the complexity of a distributed system for easier use of distributed system software REPORT SMILY. CALL FUNCTION FunctionName DESTINATION Target IMPORTING EXPORTING TABLES EXCEPTIONS COMMUNICATION_FAILURE = 1 SYSTEM_FAILURE = 2 WRITE: ':-)' Destination Target FUNCTION FunctionName. ENDFUNCTION. SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 23 Remote Function Call (RFC) : Name Server Transaction for Maintenance of RFC destinations Connection Parameter host Port Protocol Security Logon procedure Logon data SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 22 Parallelisation with RFC Goal: Improved Performance response time How to: Split-up of the program into various tasks Parallel execution of individual tasks Synchronisation of tasks PROGRAM SMILY. T1 T1 T2 T2 Syncpoint T3 T3 Problems: Determination of size of individual tasks (Granularity problem) Load-balancing (avoid overload) base-access (Timeout) Synchronisation of tasks (Online, Batch) SAP System SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 24 T4 T4

7 Asynchronous RFC, without Response REPORT SMILY. CALL FUNCTION FunctionName DESTINATION Target 1a 1a DESTINATION Target EXPORTING STARTING NEW TASK TaskName TABLES EXPORTING EXCEPTIONS TABLES EXCEPTIONS 1b 1b COMMUNICATION_FAILURE = 1 SYSTEM_FAILURE = 2 COMMUNICATION_FAILURE = 1 SYSTEM_FAILURE = 2 Destination Target FUNCTION FunctionName. 2b 2b ENDFUNCTION. WRITE: ':-)'. 2a 2a SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 25 RFC Serialization A call sends a container of destination information to the target system. The call checks if the target was correct transmits the respective data. Destination info Security data Call for Function Parameter for destination Parameter for security data Parameter Parameter x Next comes the Log-on to the target system (exchange of security data). If everything was correct, access is granted. Then call for function checks if the function is available in the target system - if Yes, the respective parameters are allocated via the Dictionary. The next step is the reading of parameters execution of function modules. Results of executed function modules are sent back to the calling system. All parameters are read in reverse order. SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 27 Transactional RFC REPORT SMILY. CALL FUNCTION FunctionName STARTING NEW Task TaskName IN BACKGROUND TASK DESTINATION Target EXPORTING TABLES EXCEPTIONS COMMUNICATION_FAILURE = 1 SYSTEM_FAILURE = 2 COMMIT WORK. WRITE: ':-)'. 1a 1a 1b 1b 2a 2a TRFC-Administration TRFC Scheduler FUNCTION TRFC_etc. 2b 2b ENDFUNCTION. ARFCSSTATE ARFCSDATA SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 26 process Types Dispatcher Process Main process for creation administration of processes Dialog Processes Hle dialog tasks, e. g. GUI, RFC, HTTP, HTTPS, SMTP Restricted execution processing time Batch Processes Hle background tasks Enqueue Process SAP enqueue (locking) infrastructure Hle lock mechanism for transaction processing Update Processes Hanlde Datebase modifications Spool Processes Hle printing issues Gateway Process ICM Process Hle RFC HTTP/HTTPS/SMTP communication SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 28

8 Process Administration How to hle more users than work processes without blocking a single work process Dispatcher Queue Dispatcher Queue Client-WP Server-WP Client Application Application Gateway The Request is queued. The first available WP in the client system takes the request to the gateway. Once the gateway has taken over, the Client-WP is free again to take the next request in the queue. The gateway sends the request to the Server-Queue. The first available Server- WP executes the request sends the result to the gateway. Once the gateway has taken over the executed request, the Server-WP is free again to hle the next request. SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 29 Session Re-Activation The dispatcher WP to user stored data the memory continues with the request user context another user served by user context the same! Dialog Process 1 dispatcher assigns a free user 1 takes the data from user 1 out of memory (No copying) ) with the execution of request. By this method,, no context is overwritten by user. The user may be by various WPs the context data will always be SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 31 for User 1 for User 3 for User 1 Dialog Process 2 Session Inactivation Scenario: : # Users >> # Processes WP ~ virtual CPUs When a user (e.g., any action), his Dialog Process 1 user pauses any sending action ), his session is inacivated. The work data in sets pointers efficiently retrieve reactivation without for User 1 work process stores all user in the shared memory pointers to the memory to retrieve the data on without copying. Shared Memory for User 1 for User 3 Dialog Process 2 SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 30 You should have learned Memory management in SAP is necessary because work processes serve a large number of front end users. Each work process must be capable of storing the user context for each user loading it again when required. processes use every pause of the user to execute work for another user. The user context is stored in the shared memory retrieved by a free WP when the user continues to work. The stored user context data must not be copied! It is retrieved by the use of memory pointers. There always exists only one data set per user context at any time. processes, by their working principle, must be seen as virtual CPUs. SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 32

9 Performance local data WP local data WP Application Server Application Server Bottleneck DB cache DB WP DB Server base clients << number of user sessions base Locks only occur within DB-LUWs Lifetime of base locks is short Less Lock conflicts deadlocks SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 34 Application Interactive Dialog Task Application SAP Transaction Concept Minimize base Lock Time Post 1st Enqueue Lock Create Update Request, start Update Task Make SAP locks persistent pass lock ownership to Update Task Update request pending Update Task Multiple base LUWs SAP- DB SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 33 Duration of SAP Locks Release all inherited SAP locks Commit Update Single SAP LUW, starting in Dialog Task, continued in Update Task Duration of SAP locks Duration of database locks Enqueue API Enqueue API Enqueue clientlayer Task hlercommunication processes SAP Instances Enqueue clientlayer..... Task hlercommunication processes SAP Web AS base Architecture App Server memory consumption Message-Server Table Buffer SAP work process SAP work process SAP work process LAN communication DB work process DB work process DB work process DB memory consumption base cache base Service processes Physical I/O Operating system base files SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 35 App Server CPU consumption DB CPU consumption Enqueue-WP Task hlercommunication Application Enqueue serverlayer Enqueue API processes SAP- central instance with Enqueue-Server Lock tablefunctionality Lock tablefunctionality SAP-locking table SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 36

10 Questions SAP AG 2003, SAP Web AS Principles, Aghadavoodi/Becker / 37