Presentation is loading. Please wait.

Presentation is loading. Please wait.

An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd.

Similar presentations


Presentation on theme: "An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd."— Presentation transcript:

1 An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd.

2 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk2 Who am I? Oracle DBA Independent consultant ex-PeopleSoft UK Performance Tuning PeopleSoft ERP Oracle RDBMS Oak Table Book

3 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk3 T&C If you can ’ t hear me say so now. Make sure that you ask questions as we go along. Trust nothing, trust nobody (especially me) Question everything.

4 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk4 Why am I talking about Tuxedo Tuxedo is now an Oracle product, it is a part of your Oracle estate Tuxedo used within PeopleSoft ERP (although no ‘ Tuxedo development ’ required) This presentation is a stalking horse. As a UKOUG director, I want to gauge the interest in the product. Somebody has to do it!

5 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk5 Tuxedo Architectural Overview How it works The DBA is often has the best mix of skills to assimilate this technology Intimate relationship with the database

6 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk6 BEA says: Tuxedo is: “ middleware for building scalable multi- tier client/server applications in heterogeneous distributed environments. ”

7 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk7 T.U.X.E.D.O. Transactions under UniX Extended for Distributed Operations

8 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk8 Tuxedo Products BEA TSAM Tuxedo Systems Application Monitor I think this is what I used to know as ATMI XA Transaction BEA SALT Services Architecture Leveraging Tuxedo SOAP over HTTP

9 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk9 What is Tuxedo? I ’ m the DBA. Why should I care? Intimate relationship with database Sizing and Configuration Affects your database And therefore performance of system DBA best placed to understand this technology.

10 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk10 Tuxedo Concepts Remote subroutine call Usually synchronous Sometimes not Message protocol Amongst other things. PeopleSoft only uses ATMI Application-to-Transaction Monitor Interface

11 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk11 What is Tuxedo? The knots on the ends of the string?

12 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk12 Presentation Logic Panel Load Panel Save Field Change etc... PeopleSoft Two-tier client

13 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk13 Presentation Logic Panel Load Panel Save Field Change etc... Server Side Client Side Tuxedo Client Tuxedo Server PeopleSoft Three-tier client PeopleSoft created generic services

14 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk14 Presentation Logic Application Logic Application Logic Application Logic etc... Server Side Client Side Tuxedo Client Tuxedo Server Three-tier client More conventional to make a business transaction into a service.

15 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk15 Advantage of Middleware Application Logic removed from client Few client-server communications Reduced resource overhead And it isn ’ t in the database either Database CPUs must be licensed Scalable middle-tier

16 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk16 Simple Application Server Delivered by BEA %TUXDIR%\samples\atmi\simpapp Remote Call ‘ Hello World ’ program simpcl.c Tuxedo MIB ubbsimple TOUPPER() simpserv.c TOUPPER service clientTuxedo process server process

17 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk17 Simple Client 1. Connects to Bulletin Board /* Attach to System/T as a Client Process */ if (tpinit((TPINIT *) NULL) == -1) { (void) fprintf(stderr, "Tpinit failed\n"); exit(1); }

18 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk18 Simple Client 2. Allocates memory for messages sendlen = strlen(argv[1]); if((sendbuf = (char *) tpalloc("STRING", NULL, sendlen+1)) == NULL) { (void) fprintf(stderr,"Error allocating send buffer\n"); tpterm(); exit(1); } if((rcvbuf = (char *) tpalloc("STRING", NULL, sendlen+1)) == NULL) { (void) fprintf(stderr,"Error allocating receive buffer\n"); tpfree(sendbuf); tpterm(); exit(1); }

19 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk19 Simple Client 3. Copy command line to message and send the message to the server (void) strcpy(sendbuf, argv[1]); ret = tpcall("TOUPPER", (char *)sendbuf, 0, (char **)&rcvbuf, &rcvlen, (long)0); (void) fprintf(stdout, "Returned string is: %s\n", rcvbuf);

20 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk20 Simple Client 4. Release memory and disconnect /* Free Buffers & Detach from System/T */ tpfree(sendbuf); tpfree(rcvbuf); tpterm(); return(0);

21 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk21 Simple Server %TUXDIR%/include/atmi.h /* interface to service routines */ struct tpsvcinfo { #define XATMI_SERVICE_NAME_LENGTH 32 char name[XATMI_SERVICE_NAME_LENGTH]; /* service name invoked */ long flags; /* describes service attributes */ char *data; /* pointer to data */ long len; /* request data length */ int cd; /* connection descriptor */ long appkey; /* application authentication client key */ CLIENTID cltid; /* client identifier for originating client */ }; typedef struct tpsvcinfo TPSVCINFO;

22 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk22 Simple Server Each service is a sub-routine. TOUPPER(TPSVCINFO *rqst) { int i; for(i = 0; i len-1; i++) rqst->data[i] = toupper(rqst->data[i]); /* Return the transformed buffer to the requestor. */ tpreturn(TPSUCCESS, 0, rqst->data, 0L, 0); } #

23 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk23 Simple Domain The domain has one server that advertises one service. *SERVERS DEFAULT: CLOPT="-A" Simpserv SRVGRP=GROUP1 SRVID=1 *SERVICES TOUPPER

24 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk24 Anatomy of the Application Server PeopleSoft works in the same way as the simple server Except there are more servers and more services. Runs on different nodes, so there is a listener process

25 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk25 Processes, Messages & Memory Unix IPC memory structures Bulletin Board Shared Memory Segment Queues IPC Queues Semaphores To protect Bulletin Board, WSL and JSH

26 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk26 PeopleSoft 2-Tier Client Client Connects Directly to the Database What happens in 3-Tier? DATABASE

27 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk27 Application Server Structure Bulletin Board Liaison process Always first process to be started Reads configuration file It creates BB shared memory segment BBL BB PSTUXCFG

28 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk28 Listener Processes Listens for incoming client requests WSL WSH BBL BB 32 1

29 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk29 PSAPPSRV DATABASE WSL WSH BBL BB APPQ WSHQ A Transaction C++ client PSAPPSRV is the application server process written by PeopleSoft Physical Cache Files Windows client

30 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk30 PSAPPSRV DATABASE JSL JSHAPPQ JSHQ Transaction from Java Client PeopleSoft Internet Architecture BBL BB 1 JREPSVR 4 JREPOSITORY 2 JREPQ PIA JVM 12

31 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk31 IPC Resources IPCS Standard Unix Command so not in the Tuxedo documentation Reports on IPC resources Queues Memory Segments Semaphores BEA implementation on Windows No concept of group and ownership so always zero

32 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk32 ipcs -a IPCS status from BEA_segV8.1 as of Mon May 10 14:39: T ID KEY MODE CBYTES QNUM QBYTES LSPID LRPID STIME RTIME CTIME Message Queues: q x rw-rw-rw no-entry no-entry 14:38:42 q 257 0x0000bbe2 -Rrw-rw-rw :39:00 14:39:00 12:10:42 q 515 0x Rrw-rw-rw no-entry no-entry 12:26:14 q 516 0x Rrw-rw-rw :12:51 13:12:51 12:26:14 q 517 0x Rrw-rw-rw :37:30 12:37:30 12:26:14 q 518 0x rw-rw-rw no-entry no-entry 12:28:11 q 519 0x rw-rw-rw :37:14 14:37:14 12:28:11 q 520 0x rw-rw-rw no-entry no-entry 12:28:46 q 521 0x rw-rw-rw no-entry no-entry 12:28:46 q 522 0x Rrw-rw-rw :37:26 12:37:26 12:30:13 q 523 0x rw-rw-rw :37:26 12:37:26 12:30:13 q 524 0x Rrw-rw-rw no-entry no-entry 12:30:59 q 525 0x Rrw-rw-rw :39:07 14:39:07 12:30:59 q 526 0x Rrw-rw-rw :39:07 14:39:07 12:30:59 q 783 0x Rrw-rw-rw :46:04 12:46:04 12:32:22 q 784 0x rw-rw-rw :39:08 14:39:07 12:33:04 q x rw-rw-rw :37:30 12:37:30 12:33:04 q x rw-rw-rw no-entry no-entry 12:37:26 q 532 0x rw-rw-rw :38:53 14:38:53 14:38:51 T ID KEY MODE NATTCH SEGSZ CPID LPID ATIME DTIME CTIME Shared Memory: m 50 0x0000bbe2 --rw-rw-rw :39:00 14:39:00 12:10:40 m 101 0x rw-rw-rw :26:14 no-entry 12:26:14 m 102 0x rw-rw-rw :30:59 no-entry 12:30:59 T ID KEY MODE NSEMS OTIME CTIME Semaphores: s x0000bbe2 --ra-ra-ra- 5 14:39:07 12:10:40 s x ra-ra-ra :34:04 12:10:40

33 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk33 Q3602 PSMONITORSRV PID 3260 MONITOR Q520 Q521 Q532 JSH PID 2616 WSH PID 3544 PSAPPSRV PID 1132 PSAPPSRV PID 2904 DATABASE WSL PID 2196 WSH PID 3952 BBL PID 1716 BB M50 Key BBE2 CPID bytes PSWATCHSRV PID 668 WATCH Q518 APPQ Q784 PSSAMSRV PID 2620 PSSAMSRV PID 2548 SAMQ Q522 Q516 Q517 Q515 Q1297 Q519 Q523 M101 CPID bytes PIA JVM JSL PID 260 JSH PID 3648 Q525 Q526 Q524 M52 CPID bytes JREPSVR PID 1708 Q783 JREPOSITORY Physical Cache Files Q257 Windows client

34 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk34 tmadmin and ipcs Tuxedo command line interface utility Issue administrative commands Monitor application server Reads IPC status printqueue

35 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk35 pq or printqueue > pq Prog Name Queue Name # Serve Wk Queued # Queued Ave. Len Machine PSSAMSRV.exe SAMQ GO-FASTER+ JSL.exe GO-FASTER+ WSL.exe GO-FASTER+ JREPSVR.exe GO-FASTER+ PSMONITORSRV.e MONITOR GO-FASTER+ PSAPPSRV.exe APPQ GO-FASTER+ BBL.exe GO-FASTER+ PSWATCHSRV.exe WATCH GO-FASTER+ ipcs -a IPCS status from BEA_segV8.1 as of Mon May 10 14:39: T ID KEY MODE CBYTES QNUM QBYTES LSPID LRPID STIME RTIME CTIME Message Queues:... q 784 0x rw-rw-rw :39:08 14:39:07 12:33:04...

36 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk36 Tuxedo application server Weblogic Server JVM JSLJSH Servlet engine Servlet container JSH Web server servlet Client Thread PeopleSoft PIA servlet Servlet thread Servlet thread Servlet thread Client thread PIA in BEA Weblogic Cookie HTTP browser

37 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk37 Connection Concentration Fairly typical picture 35,000 users 1000 concurrent connections 1000 users active in the last n minutes where n is the Java + JSH timeout therefore need 1000 threads, maybe 4 JVMs 100 JSH assumes 10 clients per JSH PSAPPSRV processes each PSAPPSRV connects to database 1 database But, we didn ’ t use shared database server processes users 1000 connections 1000 Java Threads 4 JVMs 100 JSHs PSAPPSRVs 1 database

38 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk38 X/Open Distributed Transaction Processing In an XA environment different resource managers Tuxedo server processes May connect to different resources (databases) At the very least they are different sessions on the same database. One distributed transaction They are commit or rollback together. Tuxedo can be used as a Transaction Manager (coordinator) From Oracle Application Developers ’ Guide - Fundamentals

39 Introduction to BEA TuxedoUKOUG2008 ©www.go-faster.co.uk39 Summary Tuxedo Architecture Unix IPC based Queues, Shared Memory, Semaphores Same on Windows Sort of! Function calls Connection Concentration Scalable middleware Transaction Monitor

40 Questions


Download ppt "An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd."

Similar presentations


Ads by Google