dev-8: appserver ™ mode case studies simon epps solutions engineer

47
DEV-8: AppServer Mode Case Studies Simon Epps Solutions Engineer

Upload: irma-stevens

Post on 08-Jan-2018

221 views

Category:

Documents


0 download

DESCRIPTION

© 2008 Progress Software Corporation3 AppServer Environment The Components Broker Agents Business Logic AppServer Data NameServer Clients

TRANSCRIPT

Page 1: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

DEV-8: AppServer™ Mode Case Studies

Simon EppsSolutions Engineer

Page 2: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation2

Agenda

AppServer Fundamentals• AppServer Environment

Distributed Computing Design Considerations AppServer Operating Modes Case Studies

Page 3: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation3

AppServer Environment

The Components

Bro

ker

Agents

Business

Logic

AppServer

Data

Nam

eSer

ver

Clients

Page 4: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation4

AppServer Environment

NameServer

AppServer2

App1

Client1

AppServer1

App1

AppServer3

App1

Nam

eSer

ver

Page 5: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation5

AppServer Environment

Inside the AppServer Agent

Agent Startup

Agent Shutdown

Client Connect

Client Disconnect

Begin Request

End Request

Sess

ion

Con

nect

ion

Req

uest

Three levels of execution context

Differ in when they are set and how long they last

Operating modes handle context differently

Page 6: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation6

Agenda

AppServer Fundamentals Distributed Computing Design Considerations

• Authentication and Authorization• User Context Management• Application State Management• Performance and Scalability

AppServer Operating Modes Case Studies

Page 7: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation7

Authentication and Authorization

Get the user login Lookup the user-id in authentication system Validate a “shared-secret” Check that the user account is valid Create login context info container

• Identify using unique token• Seal to prevent tampering

Authentication Process

Page 8: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation8

Authentication and Authorization

Lookup the login context info Lookup user’s access-control data Check access-controls on access to

application resources

Authorization Process

Page 9: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation9

AuthenticationClient/Server Environment

Lookup User Account

Authenticate User

Retrieve Acct Info

Create Login Context

User Accts

Access Control

ClientC

olle

ct L

ogin

C

rede

ntia

ls

User Input

Audit Log

Page 10: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation10

AuthorizationClient/Server Environment

Authorization Manager

Data

Client

User Input

Business

Logic

Access Control

Audit Log

Page 11: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation11

AuthenticationN-Tier Environment

Application Server

User Input

Lookup User Account

Authenticate User

Retrieve Acct Info

Create Login Context

Collect Login

Credentials

Client

Request Authentication

Retain Token Access Control

Audit Log

User Accts

Page 12: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation12

AuthorizationN-Tier Environment

Application Server

User Input

Client

Service Request

Authorization Manager

Business

Logic

Audit LogAccess Control

User Accts

Page 13: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation13

User Context Management

Client/Server

User Authentication Process

Client

User Input

DEFINE VAR user_name as char.

DEFINE VAR user_id as char.

DEFINE VAR user_lang as char.

Business

Logic

User Accts

Page 14: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation14

User Context Management

N-Tier

User Context

Application Server

User Input

Client

Service Request

Authentication Process

Authentication Request

User Context Object

Business Logic

User Accts

Audit Log

Page 15: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation15

Application State Management

Client/Server

Inventory Data

Client

DEF VAR tot as dec init 0.DEF QUERY qInv FOR Inventory.OPEN QUERY qInv FOR EACH Inventory.GET FIRST qInv.DO WHILE AVAILABLE(qInv): tot = tot + qInv.amount. GET NEXT qInv.END.

Page 16: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation16

Application State Management

N-Tier

Application ServerClient

Procedure initQry()

Procedure getAmt()

tot = 0.

RUN initQry() on hAS.

Repeat while more:

RUN getAmt() on hAS.

tot = tot + amt.

End.

Inventory Data

Define QUERY qInv

For Inventory.

Page 17: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation17

Performance and Scalability

Client/Server

Data

Client

User Business

Logic

User

User

User

Page 18: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation18

Performance and Scalability

N-Tier

Data

Client

Client

Client

Client

Application Resources

Application ServerClient

Client

Page 19: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation19

Agenda

AppServer Fundamentals Distributed Computing Design Considerations AppServer Operating Modes

• State-reset• State-aware• Stateless• State-free

Case Studies

Page 20: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation20

State-Reset/State-aware Operating Modes

Connection Process

ABL

AppServer

Data

Client2

Client1

Client3

Client4X

Nam

eSer

ver

Agent

Agent

Agent

Bro

ker

Page 21: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation21

State-Reset/State-aware Operating Modes

Inside the AppServer Agent

Agent Startup

Agent Shutdown

Client Connect

Client Disconnect

Begin Request

End Request

Startup Procedure

Shutdown Procedure

Connect Procedure

Disconnect Procedure

Sess

ion

Con

nect

ion

Req

uestClient bound to Agent for

CONNECTION Context

Page 22: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation22

Stateless Operating Mode

Connection Process

Bro

ker

Agents

ABL

AppServer

Data

Client2

Client1

Client3

Client4

Nam

eSer

ver

Page 23: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation23

Stateless Operating Mode

Inside the AppServer Agent

Agent Startup

Agent Shutdown

Client Connect

Client Disconnect

Begin Request

End Request

Startup Procedure

Shutdown Procedure

Connect Procedure

Disconnect Procedure

Sess

ion

Con

nect

ion

Req

uestClient bound to Agent

for REQUEST Context

Activate Procedure

Deactivate Procedure

SERVER-CONNECTION-ID SERVER-CONNECTION-CONTEXT

Page 24: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation24

State-Free Operating Mode

Connection Process

Client1

Nam

eSer

ver

AppServer1

App1

AppServer2

App1

AppServer3

App1

Data

Page 25: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation25

State-free Operating Mode

Inside the AppServer Agent

Agent Startup

Agent Shutdown

Client Connect

Client Disconnect

Begin Request

End Request

Startup Procedure

Shutdown Procedure

Sess

ion

Con

nect

ion

Req

uestClient bound to Agent

for REQUEST Context

Activate Procedure

Deactivate Procedure

Page 26: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation26

Agenda

AppServer Fundamentals Distributed Computing Design Considerations AppServer Operating Modes Case Studies

• Authentication and Authorization• User Context Management• Application State Management• Performance and Scalability

Page 27: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation27

Authentication and Authorization

State-reset/State-aware

AppServer

User Input

Client

CONNECT Procedure

CONNECT Request

Login Context Object

Business Logic

User Accts

Audit Log

Authentication Request

Authentication Process

Login Context Object

Service Request

User Input

Page 28: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation28

Authentication and Authorization

Stateless

User Context

AppServer

User Input

Client

Service Request

Authentication Process

Authentication Request

User Accts

Audit Log

SERVER-CONNECTION-ID Login Context Object

Business Logic

User Input

Page 29: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation29

Authentication and Authorization

State-free

User Context

AppServer

User Input

Client

Service Request

Authentication Process

Authentication Request

User Accts

Audit Log

Login Context Object

Business Logic

SERVER-CONNECTION-ID is NOT available

User Input

Page 30: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation30

User Context Management

State-reset/State-aware

Application Server

User Input

Client

Service Request

Authentication Process

Authentication Request

Business Logic

User Accts

Audit Log

DEF VAR user_name ...

DEF VAR user_lang ...

Set Session User-Id Once at Login

User Input

Page 31: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation31

User Context Management

Stateless

User Context

AppServer

User Input

Client

Service Request

Authentication Process

Authentication Request

User Accts

Audit Log

User Context Object

Business Logic

Set Session User-Id prior to each request

SERVER-CONNECTION-ID

User Input

Page 32: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation32

User Context Management

State-free

User Context

AppServer

User Input

Client

Service Request

Authentication Process

Authentication Request

User Accts

Audit Log

User Context Object

Business Logic

SERVER-CONNECTION-ID is NOT available Set Session User-Id

prior to each request

User Input

Page 33: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation33

Application State Management

State-reset/State-aware

Application Server

User Input

Client

Service Request

Authentication Process

Authentication Request

Business Logic

User Accts

Audit Log

DEF VAR tot ...

DEF QUERY qInv ...

User Input

Page 34: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation34

Application State Management

Stateless

Application Context

AppServer

User Input

Client

Service Request

Authentication Process

Authentication Request

User Accts

Audit Log

Application Context

Business Logic

SERVER CONNECTION

CONTEXT

SERVER-CONNECTION-ID

User Input

Page 35: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation35

Application State Management

State-free

Application Context

AppServer

User Input

Client

Service Request

Authentication Process

Authentication Request

User Accts

Audit Log

Application Context

Business Logic SERVER

CONNECTION CONTEXT is

NOT availableSERVER-CONNECTION-ID is NOT available

User Input

Page 36: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation36

Performance and Scalability

State-aware/State-reset

ABL

AppServer

Data

Client2

Client1

Clientn

Agent1

Agent2

Agentn

Client3 Agent3

Bro

ker

Page 37: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation37

Performance and Scalability

Stateless

Bro

ker ABL

AppServer

Data

Client2

Client1

Client3

Client4

Agent1

Agent2

Agent3

Clientn

Agentm

Page 38: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation38

Performance and Scalability

State-free

Clientn

Nam

eSer

ver

AppServer1

App1

AppServer2

App1

AppServerm

App1

Data

Page 39: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation39

Getting Started

Scalability is not a requirement• Small number of users• Application is somewhat static

Requires complex application state• Requires large critical sections• Makes extensive use of remote persistent

procedures Requires fastest possible response time

Consider State-reset or State-aware mode if your application…

Page 40: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation40

Getting Started

Need to support large number of users Manages small amounts of application state Critical sections are small Makes minimal use of remote persistent

procedures Makes short-lived remote procedure calls

Consider Stateless mode if your application…

Page 41: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation41

Getting Started

Requires maximum scalability Can be distributed across multiple systems

• Any request can execute on different systems Can make use of concurrent processing of

remote procedures

Consider State-free mode if your application…

Page 42: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation42

Getting Started

Organize your application into multiple services

Different services can use different operating modes

Consider multiple operating modes

Page 43: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation43

In Summary

Different operating modes are available to suit different application requirements

Choice of modes often requires tradeoff between scalability and complexity

Choose the mode or modes most appropriate for both short and long term goals

Page 44: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation44

For More Information, go to…

PSDN• Designing Common Business Services for the AppServer,

by Anthony Swindells• Understanding the AppServer, Inside-Out• A Stateful Application in a Stateless World

Documentation:• OpenEdge® Application Server: Developing AppServer

Applications• OpenEdge Application Server: Administration• OpenEdge Development: ABL Handbook, by John Sadd

Page 45: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation45

Questions?

Page 46: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation46

Thank You

Page 47: DEV-8: AppServer ™ Mode Case Studies Simon Epps Solutions Engineer

© 2008 Progress Software Corporation47