Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 73

INT-10: Understanding the AppServer

Inside-Out

Pat Bonser
David Lund
Progress Software

OpenEdge Application Server

Flexible and extensible part of a


Service-oriented architecture
Dynamic, standards-based
transaction engine
Provides user interface
independence
Enables business logic to be
easily distributed and reused
Centralized business logic
provides a single point to
manage access to data

2007 Progress Software Corporation

Understanding the AppServer Inside-Out


Agenda

Architecture & Components


Connection Management
Open Clients
Diagnostics, Logging & Debugging
Migration Steps for Deployed Applications

This presentation includes annotations with


additional, complementary information
3

2007 Progress Software Corporation

OpenEdge Application Server


Service Clients
Web
Service

Web
services

WebSpeed

GUI

Character

OpenEdge
Clients

Open Clients
(Non-OpenEdge)

OpenEdge
Management

Sonic
ESB

Open Clients

OpenEdge Clients

OpenEdge
Application
Server
OpenEdge
RDBMS

OpenEdge
Replication

OpenEdge
DataServers

2007 Progress Software Corporation

OpenEdge Application Server Components


AppServer Architecture
AppServer

Clients

NameServer

AppServer Agents

Application
Application
Broker
Broker

ABL
Business
Logic

Data

2007 Progress Software Corporation

Application Server Components


AppServer Broker

NameServer

AppServer

Application
Application
Broker
Broker

ABL
Business
Logic

Manages pools of re-usable AppServer agents


Manages client connections and requests for
AppServer agents to execute ABL

2007 Progress Software Corporation

Application Server Components


AppServer Agents

Executes OpenEdge
NameServer

ABL procedures
Reuse of AppServer
agents

AppServer

Application
Broker

AppServer Agents

ABL
Business
Logic

Determined by
Operating mode

2007 Progress Software Corporation

Application Server Components


NameServer

Location transparency

Machine A

Clients

NameServer

Inventory

70%

70%

Inventory (A and B)

Machine B

30%

Pay
roll
(C)

Inventory

30%

Machine C

Load balancing
8

Payroll

2007 Progress Software Corporation

Underlying components what makes it tick


Components that
need to be running:
* AdminServer
* AppServer
* NameServer
(optional)
* Database
brokers
(optional)

Admin
Server
AppServer
Broker
NameServer
(Optional)

Server Processes
(Agents)

Clients

Database Brokers
(Optional)
9

Databases
2007 Progress Software Corporation

Creating a new AppServer

AppServers are created based on the needs

of the Application
Naming of new AppServers should follow
some standard that indicates the function of
the AppServer
For example OrderEntry and Inventory

Do not name AppServers based on physical


implementation

For example incorporating the name of a


system
10

2007 Progress Software Corporation

Configuring and Monitoring AppServers

Use Progress Explorer or command line tools


Configurations saved in ubroker.properties file

11

2007 Progress Software Corporation

Admin Server
ubroker.properties
(includes AppServer)

Admin Server
Reads on
startup

Admin
Server

conmgr.properties
(includes db connections)

Progress Explorer
Is a user interface
Into the Admin Server

12

Progress
Explorer

2007 Progress Software Corporation

Admin Server
ubroker.properties

Changes saved

Progress Explorer user interface


used to make changes to the
Admin Server

Admin
Server

Progress
Explorer

Information about ubroker.properties can be found in file


C:\Progress\OpenEdge\properties\ubroker.properties.README
13

2007 Progress Software Corporation

AppServer Configuration Getting Started

Broker

14

Operating mode
Working directory
Port number
NameServer

2007 Progress Software Corporation

AppServer Configuration Getting Started

Agent
Startup
parameters
PROPATH
Pool Range
Less is more Manage with fewest agents possible

Consider the resources


used if you have many
AppServers each auto
starting many agents

15

2007 Progress Software Corporation

Client Connection to the AppServer


Getting Started Client Side ABL Code

1.

Create server handle


CREATE SERVER hdl.

2.

Connect to AppServer
ret = hdl:CONNECT(-S 5353 -H pisces
-AppService Account).

3.
4.

Run procedures
RUN AccountBL.p ON SERVER hdl
(INPUT account-number).

Disconnect

ret = hdl:DISCONNECT().

5.

Delete server handle


DELETE OBJECT hdl.

16

2007 Progress Software Corporation

Connecting to the AppServer


Connection Parameters
-H
TCP/IP host name or IP address

-S

Service name or port number

-AppService (logical name for service supported by NameServer)


Application Service registered with NameServer
-H and -S parameters will be used as NameServer host/port

-DirectConnect

To use
NameServer
or NOT?

Directly connect to a AppServer (Not using NameServer)


-H and -S parameters will be used as AppServer host/port

-URL
Can be used instead of above parameters
17

2007 Progress Software Corporation

Example: Secure AppServer Connections


SSL enable client connections to the AppServer
AppServer
Enable SSL
Set Key Store

ABL Client
Specify ssl
parameter

Ret = hdl:CONNECT(" -S 5162 -H localhost


AppService asSecureMang -ssl").

AppServerS://localhost:5162/asSecureMang").

18

.NET Open Client


Use S in
connection string
2007 Progress Software Corporation

Example: Secure AppServer Connections


SSL enable AppServer connection to database
AppServer
-ssl parameter
on
-db connection

Database
Server
Specify -ssl
parameter

19

2007 Progress Software Corporation

How's Your AppServer Doing?


Name of AppServer
Operating Mode
Active Servers
Busy Servers
Locked
Servers
Available
Servers
Active Clients
Client Queue
Depth
Total Requests
Request wait time
Request
Duration
20

2007 Progress Software Corporation

Understanding the AppServer Inside-Out


Agenda

Architecture & Components


Connection Management
Open Clients
Diagnostics, Logging & Debugging
Migration Steps for Deployed Applications

21

2007 Progress Software Corporation

Connection Management
Session Models and Operating Modes

Specified when AppServer is configured


Determines how client requests are dispatched

to individual Application Server Agents


Design time considerations
Design and development of application
Application context

Performance Goals
System resources, network response
Request throughput and response time

22

2007 Progress Software Corporation

Session Models and Operating Modes


Connection management

Session managed model

Client sends requests over persistent connection


Requests handled sequentially

Operating Modes
State-reset
State-aware
Stateless

First available Progress V8.2


First available Progress V9

Session free model

Client send requests on any available connection


Requests handled in parallel

Operating Mode
State-free
23

First available OpenEdge 10.0A


2007 Progress Software Corporation

Session Managed Model


Operating Modes

State-reset
One client per Application Server Agent
Session state is reset on disconnect

State-aware
One client per Application Server Agent
Session state is maintained across connections

Stateless
Connection managed by AppServer Broker
Many clients per application server agent

Context must be managed programmatically


24

2007 Progress Software Corporation

Session Managed Model


State-Aware and State-Reset Operating Modes
AppServer AppServer Agents

Client 1

Client 3

NameServer

Client 2

Agent 1

Agent 2

ABL
Data

Agent 3

Client 4

Application
Application
Broker
Broker

Message
Queue

25

2007 Progress Software Corporation

Session Managed Model


Stateless Operating Mode
AppServer AppServer Agents

Client 1

Client 3

NameServer

Client 2

Agent 1

Agent 2
Application
Application
Broker
Broker

ABL
Data

Agent 3

Client 4

26

Message
Queue

2007 Progress Software Corporation

Session-free Model
State-free Operating Mode

Logical Connection
Pooled Connections
Logical pool of physical connections
ABL requests on the server handle
Web service requests on the WSA
Open Client requests on the AppObject

Multiple requests from one client run in parallel


Each request runs independently
Context must be managed programmatically
27

2007 Progress Software Corporation

Session-free Model
State-free Operating Mode
ABL Clients

AppServer AppServer Agents

Client 1

Agent 1

Web Service
Client
Client 3

Web Services
Adapter

Client 2

NameServer

Open Clients
Agent 2

Application
Application
Broker
Broker

ABL
Data
Agent 3

Message
Queue

Agent 4

= logical connection pool


28

2007 Progress Software Corporation

Key term - Bounded

Bounded means that there are resources


being retained on the AppServer
State-aware, state-reset always bounded
Stateless, state-free can become bounded

Performance considerations
Stateless, state-free need to send messages
to the broker and the agent when bounded
State-aware, state-reset after connection only
send messages to the agent

29

2007 Progress Software Corporation

Changing to a bound state

Stateless
Provides programmatic control to change to/from
bounded
SERVER-CONNECTION-BOUND-REQUEST
Set to True to become bound, False unbound

Stateless and state-free


Calling persistent procedure causes to be bound
Deleting persistent procedure unbound

Determine state using attribute


SERVER-CONNECTION-BOUND
30

2007 Progress Software Corporation

Maintaining state between calls

Easiest using a bounded connection


State can be maintained with an unbound
connection (but requires work by programmer)
Complexity of implementation increases
Developer is responsible for implementing
For example
Use a database to hold state information
Use a GUID as an index to associate state (new
10.1A)
Save state information
Save/restore states using configuration procedures
UUID - Universally Unique Identifier
GUID - Globally Unique Identifier

31

2007 Progress Software Corporation

Maintaining state between calls

Maintaining state using stateless operating mode


Session does not need to be bound
Attribute to save/recall context information
Set/recall attributed programmatically
OpenEdge makes value available the next time the
client connects to any agent
SERVER-CONNECTION-CONTEXT

Unique ID for the client


Can be used to verify that it is the same client
SERVER-CONNECTION-ID
32

2007 Progress Software Corporation

Which Model (Operating Mode) to Use?


It depends

Implementation Considerations
Efficient use of resources
Optimize performance
Maximize scalability

Use state free model if you can


Dont need context, or seldom need context
Parallel execution on any available AppServer

Next consider stateless operating mode


Better scalability than other session managed
options
33

2007 Progress Software Corporation

Deploying Multiple AppServers


Context
management
Through design

State-aware
PROPATH

State-reset
PROPATH

Clients

Stateless

Application
Code

PROPATH

Make each call to


an AppServer
that matches
your needs.

State-free
PROPATH

AppServers
34

2007 Progress Software Corporation

Asynchronous Programming
Asynchronous programming increases complexity

Client code
Calling procedures
asynchronously

Client code
Event handling procedure

35

2007 Progress Software Corporation

Example: Sequential vs. Parallel Execution


Session Managed Queued
Always complete in order submitted

36

Session Free Better use of resources


Return order unpredictable

2007 Progress Software Corporation

Configuration Procedures

ABL procedures available


Activate/Deactivate
(stateless & state-free)

Connect/Disconnect
(all session managed modes)

Startup/Shutdown
(state-aware & stateless)

37

to you to manage context

2007 Progress Software Corporation

Example: Connect Procedure


ABL Client
Handling connection issues

AppServer Connect Procedure


Set return string

38

2007 Progress Software Corporation

Example: Controlling AppServer Entry Points

Export list
Enforce secure access to the AppServer
Used as a filter checking if requested
procedure is on the list
Activate Procedure

Setting Activate.p as the


activate procedure in
Progress Explorer

39

2007 Progress Software Corporation

Transaction Management

Standard ABL transaction management built


in support

Scoped at most to duration of a single remote


procedure call to the AppServer

Automatic transactions

Transactions can span more than one remote


procedure call to the AppServer
Controlled via attributes and methods
Necessitates having a persistent procedure
running
Use with caution!

40

2007 Progress Software Corporation

Understanding the AppServer Inside-Out


Agenda

Architecture & Components


Connection Management
Open Clients
Diagnostics, Logging & Debugging
Migration Steps for Deployed Applications

41

2007 Progress Software Corporation

Open Clients

Provide access to business logic on the


AppServer for non-ABL clients

Open Client developer need not be aware of


OpenEdge concepts such as ABL

Start by determining:
Which procedures to expose through the
interface
How the procedures will be called

42

2007 Progress Software Corporation

Proxy Generator
Exposing the Business Logic
ABL
.r files

ProxyGen

Java Clients

Java Classes

.NET Clients

.NET Assemblies

Web service consumers


Sonic ESB
43

WSM (used at deployment for WSDL)


WSM & WSDL
2007 Progress Software Corporation

Open Client OpenAPI


Introduced in OpenEdge 10.1A

Purpose
Allows an arbitrary procedure to be run on the
AppServer without the need to generate a proxy

Supported for Java and .NET Open Clients


What is it composed of?
A set of classes that are used in place of
generated proxies

44

2007 Progress Software Corporation

To Proxy or not?

Recommendation
Generate proxies unless there is a business reason
to use the OpenAPI

Additional work is required to use OpenAPI


All setup work done by programmer
Programmer must know:
Procedure and function names, paths, no. of
parameters and their types, return types for functions

No compile time checking

45

2007 Progress Software Corporation

Understanding the AppServer Inside-Out


Agenda

Architecture & Components


Connection Management
Open Clients
Diagnostics, Logging & Debugging
Migration Steps for Deployed Applications

46

2007 Progress Software Corporation

Logging Infrastructure

Log Files
Unified Format

Log Entry Types


Logging Levels
Log size threshold
LOG-MANAGER
Log File Analysis
LogRead Utility
47

2007 Progress Software Corporation

Log File Format


Consistency

Unified log file format


RDBMS, OpenEdge Replication, OpenEdge
client, AppServer, WebSpeed

New fields for entries


Date, timezone, process and thread id, severity
level

Fixed length, aligned fields


Error number before message text
Increased readability
Easier to parse
48

2007 Progress Software Corporation

Diagnostics, Logging & Debugging


Where to look for an AppServer Application

Which Log?
AdminServer admserv.log

NameServer ns1.ns.log

AS Broker

asbroker1.broker.log

AS Agent

asbroker1.server.log

AIA

aia1.aia.log

WSA

wsa1.wsa.log

Database

dbname.lg

What about the Client?


-clientlog logfilename

49

2007 Progress Software Corporation

Log Entry Types

Server/Client Executables Other

ABLMessages1
ABLTrace
DB.Connects
DynObjects.*
QryInfo
SAX
ProEvents.*

AIA*
ASPlumbing
ASDefault
NSPlumbing
UBroker.*
WSADefault
MsgrTrace

Client only

50

2007 Progress Software Corporation

Logging Levels

Setting logginglevel
StartUp Parameter
LOG-MANAGER system handle
Ubroker.properties file

Logginglevel Values

51

0 None
1 Errors
2 Basic
3 Verbose
4 Extended
2007 Progress Software Corporation

LOG-MANAGER
System handle attributes & methods

Attributes

52

ENTRY-TYPES-LIST
LOG-ENTRY-TYPES
LOGFILE-NAME
LOGGING-LEVEL
LOG-THRESHOLD
NUM-LOG-FILES
TYPE

Methods
CLOSE-LOG
CLEAR-LOG
WRITE-MESSAGE

2007 Progress Software Corporation

Log File Analysis LogRead Utility


PSDN.progress.com

GUI Utility
View, filter,
sort, merge,
& translate log files
Log file format
Date format
Advanced
Time adjustment
Promsgs translation
Date Range Filter
53

2007 Progress Software Corporation

Log File Analysis LogRead Utility

Browse, Filter or Query Log

54

2007 Progress Software Corporation

Log File Analysis LogRead Utility


PSDN.progress.com

Select Logs to Merge

File Merge

55

2007 Progress Software Corporation

Log File Analysis LogRead Utility


PSDN.progress.com

Analyze the Merge

56

2007 Progress Software Corporation

Debugging AppServer Code


Application Debugger Debug Modes

Application Mode, supports distributed


Step into AppServer code from Client session

Attachable Mode
Attach to remote process
Debug attached process only
No access to calling process
Can be used when
Server not local
No monitor attached
Easier to debug from where you are

57

2007 Progress Software Corporation

Enabling Debugging
Debugging is NOT enabled by default

Client
Start Programs OpenEdge Proenv

AppServer

58

2007 Progress Software Corporation

Attachable Mode
Debugging Code Remotely
Ready the AppServer agent for debugging
-debugReady port-number

proDebugConfig

Start Attachable Debugger


Start Programs OpenEdge Debugger
59

2007 Progress Software Corporation

Attachable Debugger

Local
Remote

60

2007 Progress Software Corporation

Attachable Debugger

61

2007 Progress Software Corporation

Remote Code is Available


Debug as usual

62

2007 Progress Software Corporation

Detach from Process

63

2007 Progress Software Corporation

Understanding the AppServer Inside-Out


Agenda

Architecture & Components


Connection Management
Open Clients
Diagnostics, Logging & Debugging
Migration Steps for Deployed Applications

64

2007 Progress Software Corporation

Migrating a Deployed Application


Planning an Upgrade

Considerations
Whatss New?
Enhanced Capabilities

Operating Modes
Configurations - Fault Tolerance

Steps before deployment


Upgrade Licenses
Convert/Migrate Database
Migrate Code

65

2007 Progress Software Corporation

Migrating a Deployed Application


Deploying the Upgrade

ABL
Client
Code

66

NameServer

Clients

NameServer

AppServer
Existing Agents

Application
Application
Broker
Broker

New

ABL
Server
Code

Data

2007 Progress Software Corporation

Migrating a Deployed Application


Deploying the Upgrade

Register New AppServer(s)


With existing NameServer

Configure new NameServer


Shutdown Clients
Upgrade Client (license & application)
Reconnect clients to new AppServer(s)
Shutdown old AppServer(s)
Shutdown old NameServer
67

2007 Progress Software Corporation

In Summary
OpenEdge AppServer is a fundamental component of SOBA

AppServer is the center of the Universe


The Business Logic Universe

Many ways to access that universe!

OpenEdge Clients (GUI, TTY, Batch, WebClient)


WebSpeed Clients
Microsoft .NET
Java
Web service consumers
Sonic ESB
A client is not always a User!

68

2007 Progress Software Corporation

For More Information, go to

PSDN (http://www.psdn.com)
LogRead Utility & Tutorial
White Papers & Presentations
Documentation

Progress eLearning Community


OpenEdge Development with Sonic ESB
Services Oriented Integration with Sonic ESB

69

2007 Progress Software Corporation

Related Exchange Sessions

COMP-11 Best Practices for Deploying

AppServer and WebSpeed


DEV-22 You've Got a Problem, Here's How to
Find It

. . . many other sessions in the ARCH, DEV & INT


tracks include information on the Application
Server

70

2007 Progress Software Corporation

Understanding The AppServer Inside-Out

Questions?

71

2007 Progress Software Corporation

Thank you for


your time

72

2007 Progress Software Corporation

73

2007 Progress Software Corporation

You might also like