40
An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. [email protected] www.go-faster.co.uk

An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. [email protected]

Embed Size (px)

Citation preview

Page 1: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

An introduction to BEA Tuxedo

David KurtzGo-Faster Consultancy Ltd.

[email protected]

www.go-faster.co.uk

Page 2: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

2

Who am I?

Oracle DBAIndependent consultant

ex-PeopleSoft UK

Performance TuningPeopleSoft ERP

Oracle RDBMS

Oak Tablewww.oaktable.net

Bookwww.psftdba.com

Page 3: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

3

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.

Page 4: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

4

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!

Page 5: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

5

Tuxedo

Architectural Overview

How it worksThe DBA is often has the best mix of skills to assimilate this technology

Intimate relationship with the database

Page 6: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

6

BEA says:

Tuxedo is:

“middleware for building scalable multi-tier client/server applications in heterogeneous distributed environments.”

Page 7: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

7

T.U.X.E.D.O.

Transactions under

UniX

Extended for

Distributed

Operations

Page 8: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

8

Tuxedo Products

BEA TSAMTuxedo Systems Application Monitor

I think this is what I used to know as ATMI

XA Transaction

BEA SALTServices Architecture Leveraging Tuxedo

SOAP over HTTP

Page 9: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

9

What is Tuxedo?

I’m the DBA. Why should I care?

Intimate relationship with database

Sizing and ConfigurationAffects your database

And therefore performance of system

DBA best placed to understand this technology.

Page 10: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

10

Tuxedo Concepts

Remote subroutine callUsually synchronous

Sometimes not

Message protocolAmongst other things.

PeopleSoft only uses ATMIApplication-to-Transaction Monitor Interface

Page 11: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

11

What is Tuxedo?

The knots on the ends of the string?

Page 12: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

12

PresentationLogic

PanelLoad

PanelSave

FieldChange

etc...

PeopleSoft Two-tier client

Page 13: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

13

PresentationLogic

PanelLoad

PanelSave

FieldChange

etc...

Server SideClient Side

Tuxedo C

lient

Tuxedo S

erver

PeopleSoft Three-tier client

PeopleSoft created generic services

Page 14: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

14

PresentationLogic

ApplicationLogic

ApplicationLogic

ApplicationLogic

etc...

Server SideClient Side

Tuxedo C

lient

Tuxedo S

erver

Three-tier client

More conventional to make a business transaction into a service.

Page 15: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

15

Advantage of Middleware

Application Logic removed from clientFew client-server communications

Reduced resource overhead

And it isn’t in the database eitherDatabase CPUs must be licensed

Scalable middle-tier

Page 16: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

16

Simple Application Server

Delivered by BEA%TUXDIR%\samples\atmi\simpapp

Remote Call ‘Hello World’ program

simpcl.c

TuxedoMIB

ubbsimple

TOUPPER()simpserv.c

TOUPPER service

TOUPPER service

client Tuxedo process

server process

Page 17: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

17

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);}

Page 18: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

18

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);}

Page 19: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

19

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);

Page 20: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

20

Simple Client

4. Release memory and disconnect

/* Free Buffers & Detach from System/T */tpfree(sendbuf);tpfree(rcvbuf);tpterm();return(0);

Page 21: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

21

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;

Page 22: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

22

Simple Server

Each service is a sub-routine.

TOUPPER(TPSVCINFO *rqst){ int i; for(i = 0; i < rqst->len-1; i++) rqst->data[i] = toupper(rqst->data[i]); /* Return the transformed buffer to the requestor.

*/ tpreturn(TPSUCCESS, 0, rqst->data, 0L, 0);}#

Page 23: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

23

Simple Domain

The domain has one server that advertises one service.

*SERVERSDEFAULT: CLOPT="-A"

Simpserv SRVGRP=GROUP1 SRVID=1

*SERVICESTOUPPER

Page 24: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

24

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

Page 25: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

25

Processes, Messages & Memory

Unix IPC memory structuresBulletin Board

Shared Memory Segment

QueuesIPC Queues

SemaphoresTo protect Bulletin Board, WSL and JSH

Page 26: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

26

PeopleSoft 2-Tier Client

Client Connects Directly to the Database

What happens in 3-Tier? DATABASE

Page 27: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

27

Application Server Structure

Bulletin Board Liaison processAlways first process to be started

Reads configuration file

It creates BB shared memory segment

BBL

BB PSTUXCFG

Page 28: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

28

Listener Processes

Listens for incoming client requests

WSL WSH

BBL

BB32

1

Page 29: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

29

PSAPPSRV

DATABASE

WSL

WSH

BBLBB

APPQ

WSHQ

A Transaction

C++ clientPSAPPSRV is the application server process written by PeopleSoft.

1

2

3 45

678

Physical Cache Files

Windowsclient

Page 30: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

30

PSAPPSRV

DATABASE

JSL

JSH APPQ

JSHQ

Transaction from Java Client

PeopleSoft Internet Architecture

BBLBB

1

JREPSVR4

JREPOSITORY

2

JREPQ

5

3

6

7

8 9

10

11

13

PIA JVM

12

Page 31: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

31

IPC Resources

IPCSStandard Unix Command

so not in the Tuxedo documentation

Reports on IPC resourcesQueues

Memory Segments

Semaphores

BEA implementation on WindowsNo concept of group and ownership so always zero

Page 32: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

32

ipcs -aipcs -aIPCS status from BEA_segV8.1 as of Mon May 10 14:39:08 2004T ID KEY MODE CBYTES QNUM QBYTES LSPID LRPID STIME RTIME CTIMEMessage Queues:q 5632 0x00000000 --rw-rw-rw- 0 0 65536 0 0 no-entry no-entry 14:38:42q 257 0x0000bbe2 -Rrw-rw-rw- 0 0 65536 4072 1716 14:39:00 14:39:00 12:10:42q 515 0x00000000 -Rrw-rw-rw- 0 0 65536 0 0 no-entry no-entry 12:26:14q 516 0x00000000 -Rrw-rw-rw- 0 0 65536 2904 3952 13:12:51 13:12:51 12:26:14q 517 0x00000000 -Rrw-rw-rw- 0 0 65536 2904 3544 12:37:30 12:37:30 12:26:14q 518 0x00000000 --rw-rw-rw- 0 0 65536 0 0 no-entry no-entry 12:28:11q 519 0x00000000 --rw-rw-rw- 0 0 65536 1716 688 14:37:14 14:37:14 12:28:11q 520 0x00000000 --rw-rw-rw- 0 0 65536 0 0 no-entry no-entry 12:28:46q 521 0x00000000 --rw-rw-rw- 0 0 65536 0 0 no-entry no-entry 12:28:46q 522 0x00000000 -Rrw-rw-rw- 0 0 65536 3544 2548 12:37:26 12:37:26 12:30:13q 523 0x00000000 --rw-rw-rw- 0 0 65536 3544 2548 12:37:26 12:37:26 12:30:13q 524 0x00000000 -Rrw-rw-rw- 0 0 65536 0 0 no-entry no-entry 12:30:59q 525 0x00000000 -Rrw-rw-rw- 0 0 65536 1132 3648 14:39:07 14:39:07 12:30:59q 526 0x00000000 -Rrw-rw-rw- 0 0 65536 1132 2616 14:39:07 14:39:07 12:30:59q 783 0x00000000 -Rrw-rw-rw- 0 0 65536 2616 1708 12:46:04 12:46:04 12:32:22q 784 0x00000000 --rw-rw-rw- 13608 1 65536 2616 1132 14:39:08 14:39:07 12:33:04q 1297 0x00000000 --rw-rw-rw- 0 0 65536 1716 2904 12:37:30 12:37:30 12:33:04q 3602 0x00000000 --rw-rw-rw- 0 0 65536 0 0 no-entry no-entry 12:37:26q 532 0x00000000 --rw-rw-rw- 0 0 65536 1716 1132 14:38:53 14:38:53 14:38:51T ID KEY MODE NATTCH SEGSZ CPID LPID ATIME DTIME CTIMEShared Memory:m 50 0x0000bbe2 --rw-rw-rw- 27 646432 1716 4072 14:39:00 14:39:00 12:10:40m 101 0x00000000 --rw-rw-rw- 3 504 2196 3544 12:26:14 no-entry 12:26:14m 102 0x00000000 --rw-rw-rw- 3 1112 260 2616 12:30:59 no-entry 12:30:59T ID KEY MODE NSEMS OTIME CTIMESemaphores:s 1024 0x0000bbe2 --ra-ra-ra- 5 14:39:07 12:10:40s 3073 0x00000000 --ra-ra-ra- 52 13:34:04 12:10:40

Page 33: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

33

Q3602

PSMONITORSRVPID 3260

MONITOR Q520

Q521

Q532

JSHPID 2616

WSHPID 3544

PSAPPSRVPID 1132

PSAPPSRVPID 2904

DATABASE

WSLPID 2196

WSHPID 3952

BBLPID 1716

BBM50

Key BBE2CPID 1716

646432 bytes

PSWATCHSRVPID 668

WATCH Q518

APPQ Q784

PSSAMSRVPID 2620

PSSAMSRVPID 2548

SAMQ Q522

Q516

Q517

Q515

Q1297

Q519

Q523

M101CPID 2196504 bytes

32

4

5

6

7

1

8PIA JVM

JSLPID 260

JSHPID 3648

Q525

Q526

Q524

M52CPID27961112 bytes JREPSVR

PID 1708

Q783

JREPOSITORY

9

10

11

12

13 Physical Cache Files

Q257

Windowsclient

Page 34: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

34

tmadmin and ipcs

Tuxedo command line interface utilityIssue administrative commands

Monitor application server

Reads IPC statusprintqueue

Page 35: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

35

pq or printqueue

> pqProg Name Queue Name # Serve Wk Queued # Queued Ave. Len Machine--------- ------------------- --------- -------- -------- -------PSSAMSRV.exe SAMQ 2 - 0 - GO-FASTER+JSL.exe 00095.00200 1 - 0 - GO-FASTER+WSL.exe 00001.00020 1 - 0 - GO-FASTER+JREPSVR.exe 00094.00250 1 - 0 - GO-FASTER+PSMONITORSRV.e MONITOR 1 - 0 - GO-FASTER+PSAPPSRV.exe APPQ 2 - 1 - GO-FASTER+BBL.exe 48098 1 - 0 - GO-FASTER+PSWATCHSRV.exe WATCH 1 - 0 - GO-FASTER+

ipcs -aIPCS status from BEA_segV8.1 as of Mon May 10 14:39:08 2004T ID KEY MODE CBYTES QNUM QBYTES LSPID LRPID STIME

RTIME CTIMEMessage Queues:...q 784 0x00000000 --rw-rw-rw- 13608 1 65536 2616 1132 14:39:08

14:39:07 12:33:04...

Page 36: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

36

Tuxedo application

server

Weblogic Server

JVM

JSL JSH

Servlet engineServlet container

JSHJSH

Web server servlet

ClientThread PeopleSoft PIA servlet

Servletthread

Servletthread

Servletthread

Clientthread

PIA in BEA Weblogic Cookie

HTTPbrowser

Page 37: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

37

Connection Concentration

Fairly typical picture35,000 users1000 concurrent connections

1000 users active in the last n minuteswhere n is the Java + JSH timeouttherefore need 1000 threads, maybe 4 JVMs

100 JSHassumes 10 clients per JSH

10-20 PSAPPSRV processeseach PSAPPSRV connects to database

1 database

But, we didn’t use shared database server processes.

35000 users

1000 connections1000 Java Threads

4 JVMs

100 JSHs

10-20 PSAPPSRVs

1 database

Page 38: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

38

X/Open Distributed Transaction Processing

In an XA environmentdifferent 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

Page 39: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Introduction to BEA Tuxedo UKOUG2008 ©www.go-faster.co.uk

39

Summary

Tuxedo ArchitectureUnix IPC based

Queues, Shared Memory, Semaphores

Same on WindowsSort of!

Function calls

Connection Concentration

Scalable middleware

Transaction Monitor

Page 40: An introduction to BEA Tuxedo David Kurtz Go-Faster Consultancy Ltd. david.kurtz@go-faster.co.uk

Questions