Title: INT10: Understanding the AppServer InsideOut
1INT-10 Understanding the AppServerInside-Out
Pat Bonser David Lund
Progress Software
2OpenEdge 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
3Understanding 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
4OpenEdge Application Server
OpenEdge Clients
Web services
Open Clients(Non-OpenEdge)
OpenEdgeApplicationServer
OpenEdgeManagement
OpenEdgeRDBMS
OpenEdgeReplication
OpenEdgeDataServers
5OpenEdge Application Server Components
AppServer Architecture
AppServer
AppServer Agents
Application Broker
ABL Business Logic
NameServer
6Application Server Components
AppServer Broker
AppServer
Application Broker
NameServer
- Manages pools of re-usable AppServer agents
- Manages client connections and requests for
AppServer agents to execute ABL
7Application Server Components
AppServer Agents
- Executes OpenEdge ABL procedures
- Reuse of AppServer agents
- Determined by Operating mode
AppServer
AppServer Agents
Application Broker
NameServer
8Application Server Components
NameServer
Location transparency
Inventory (A and B)
Clients
NameServer
9Underlying 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)
Database Brokers
Databases
(Optional)
10Creating 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
11Configuring and Monitoring AppServers
- Use Progress Explorer or command line tools
- Configurations saved in ubroker.properties file
12Admin Server
Admin Server Reads on startup
conmgr.properties (includes db connections)
Progress Explorer Is a user interface Into the
Admin Server
13Admin Server
Admin Server
Changes saved
ubroker.properties
Progress Explorer user interface used to make
changes to the Admin Server
Information about ubroker.properties can be found
in file C\Progress\OpenEdge\properties\ubroker.pr
operties.README
14AppServer Configuration Getting Started
- Broker
- Operating mode
- Working directory
- Port number
- NameServer
15AppServer Configuration Getting Started
- Agent
- Startup parameters
- PROPATH
- Pool Range
Less is more Manage with fewest agents
possible
16Client Connection to the AppServer
Getting Started Client Side ABL Code
17Connecting 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
- 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
To use NameServer or NOT?
18Example Secure AppServer Connections
SSL enable client connections to the AppServer
AppServer Enable SSL Set Key Store
ABL Client Specify ssl parameter
AppServerS//localhost5162/asSecureMang").
.NET Open Client Use S in connection
string
19Example Secure AppServer Connections
SSL enable AppServer connection to database
AppServer -ssl parameter on -db connection
Database Server Specify -ssl parameter
20How'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
21Understanding the AppServer Inside-Out
Agenda
- Architecture Components
- Connection Management
- Open Clients
- Diagnostics, Logging Debugging
- Migration Steps for Deployed Applications
22Connection 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
23Session 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
- Session free model
- Client send requests on any available connection
- Requests handled in parallel
- Operating Mode
- State-free
24Session 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
25Session Managed Model
State-Aware and State-Reset Operating Modes
AppServer
AppServer Agents
Client 1
Agent 1
Client 2
Agent 2
NameServer
Data
Client 3
Agent 3
Application Broker
Client 4
Message Queue
26Session Managed Model
Stateless Operating Mode
AppServer
AppServer Agents
Client 1
Agent 1
Client 2
Application Broker
Agent 2
NameServer
Data
Client 3
Agent 3
Client 4
27Session-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
28Session-free Model
State-free Operating Mode
ABL Clients
AppServer
AppServer Agents
Client 1
Open Clients
Client 2
Application Broker
NameServer
Web Service Client
Web Services Adapter
Client 3
logical connection pool
29Key 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
30Changing 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
31Maintaining 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
32Maintaining 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
33Which 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
34Deploying Multiple AppServers
Context management Through design
State-aware
PROPATH
State-reset
PROPATH
Application Code
Stateless
PROPATH
Make each call to an AppServer that matches
your needs.
State-free
AppServers
PROPATH
35Asynchronous Programming
- Asynchronous programming increases complexity
Client code Calling procedures asynchronously
Client code Event handling procedure
36Example Sequential vs. Parallel Execution
Session Managed Queued Always complete in order
submitted
Session Free Better use of resources Return
order unpredictable
37Configuration Procedures
- ABL procedures available to you to manage context
- Activate/Deactivate
- (stateless state-free)
- Connect/Disconnect
- (all session managed modes)
- Startup/Shutdown
- (state-aware stateless)
38Example Connect Procedure
ABL Client Handling connection issues
AppServer Connect Procedure Set return string
39Example 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
40Transaction 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!
41Understanding the AppServer Inside-Out
Agenda
- Architecture Components
- Connection Management
- Open Clients
- Diagnostics, Logging Debugging
- Migration Steps for Deployed Applications
42Open 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
43Proxy Generator
Exposing the Business Logic
44Open 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
45To 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
46Understanding the AppServer Inside-Out
Agenda
- Architecture Components
- Connection Management
- Open Clients
- Diagnostics, Logging Debugging
- Migration Steps for Deployed Applications
47Logging Infrastructure
- Log Files
- Unified Format
- Log Entry Types
- Logging Levels
- Log size threshold
- LOG-MANAGER
- Log File Analysis
- LogRead Utility
48Log 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
49Diagnostics, Logging Debugging
Where to look for an AppServer Application
- What about the Client?
- -clientlog logfilename
50Log Entry Types
- Server/Client Executables
- ABLMessages1
- ABLTrace
- DB.Connects
- DynObjects.
- QryInfo
- SAX
- ProEvents.
- Other
- AIA
- ASPlumbing
- ASDefault
- NSPlumbing
- UBroker.
- WSADefault
- MsgrTrace
1Client only
51Logging Levels
- Setting logginglevel
- StartUp Parameter
- LOG-MANAGER system handle
- Ubroker.properties file
- Logginglevel Values
- 0 None
- 1 Errors
- 2 Basic
- 3 Verbose
- 4 Extended
52LOG-MANAGER
System handle attributes methods
- Attributes
- ENTRY-TYPES-LIST
- LOG-ENTRY-TYPES
- LOGFILE-NAME
- LOGGING-LEVEL
- LOG-THRESHOLD
- NUM-LOG-FILES
- TYPE
- Methods
- CLOSE-LOG
- CLEAR-LOG
- WRITE-MESSAGE
53Log File Analysis LogRead Utility
PSDN.progress.com
- GUI Utility
- View, filter, sort, merge,
translate log files
54Log File Analysis LogRead Utility
- Browse, Filter or Query Log
55Log File Analysis LogRead Utility
PSDN.progress.com
56Log File Analysis LogRead Utility
PSDN.progress.com
?
57Debugging 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
58Enabling Debugging
Debugging is NOT enabled by default
- Client
- Start ? Programs ? OpenEdge ? Proenv
- AppServer
59Attachable Mode
Debugging Code Remotely
- Ready the AppServer agent for debugging
- -debugReady port-number
- proDebugConfig
- Start Attachable Debugger
- Start ? Programs ? OpenEdge ? Debugger
60Attachable Debugger
61Attachable Debugger
62Remote Code is Available
Debug as usual
63Detach from Process
64Understanding the AppServer Inside-Out
Agenda
- Architecture Components
- Connection Management
- Open Clients
- Diagnostics, Logging Debugging
- Migration Steps for Deployed Applications
65Migrating 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
66Migrating a Deployed Application
Deploying the Upgrade
Data
67Migrating 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
68In 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!
69For 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
70Related 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
71Understanding The AppServer Inside-Out
Questions?
72Thank you foryour time
73(No Transcript)