SOA13 Advanced App Server Topics Pat Bonser Advanced
SOA-13: Advanced App. Server™ Topics Pat Bonser
Advanced App. Server Topics Agenda § Architecture & Components § Connection Management • Session Managed Model • Session-Free Model § Diagnostics, Logging & Debugging § Migration Steps for Deployed Applications This presentation includes annotations with additional, complementary information SOA-13: Advanced App. Server Topics 2 © 2006 Progress Software Corporation
Distributed Applications Architecture RDER RUN Clients -O DATE I L A V esult return r RUN CHECK-CREDIT RUN SOA-13: Advanced App. Server Topics VALIDATE ORDER return result CHECK CREDIT Data UPDA TE-IN VENT ORY return result UPDATE INVENTORY 3 © 2006 Progress Software Corporation
Application Server Architecture Any Client Open. Edge® Application Server GUI App. Server Character Application Code Data ABL Web service Client SOA-13: Advanced App. Server Topics 4 © 2006 Progress Software Corporation
Application Server Architecture Web. Speed is a Client too! Open. Edge Application Server Web Browser Web. Speed Transaction Server GUI Speed Script App. Server Character Application Code Data ABL Web service Client SOA-13: Advanced App. Server Topics 5 © 2006 Progress Software Corporation
Application Server Components App. Server Architecture App. Server Clients Name. Server App. Server Agents SOA-13: Advanced App. Server Topics Application Broker ABL Business Logic 6 Data © 2006 Progress Software Corporation
Application Server Components App. Server Broker § Manages pools of re-usable SOA-13: Advanced App. Server Topics App. Server Name. Server § App. Server Agents Manages client connections and requests for App. Server Agents to execute ABL Application Broker 7 4 GL Business Logic © 2006 Progress Software Corporation
Application Server Components App. Server Agents § Executes Open. Edge • Determined by Operating mode SOA-13: Advanced App. Server Topics App. Server Name. Server § ABL procedures Reuse of App. Server Agents Application Broker 8 App. Server Agents ABL Business Logic © 2006 Progress Software Corporation
Application Server Components Name. Server Machine A Location transparency Clients Name. Server Inventory 70% Machine B Inventory (A and B) 30% Inventory Pay roll 30% (C) Machine C Load balancing SOA-13: Advanced App. Server Topics Payroll 9 © 2006 Progress Software Corporation
Application Server Components App. Server Internet Adapter § ALL Clients to Open. Edge App. Server Applications • Can connect remotely • Tunneling – HTTP (AIA) – HTTPS (AIA/S) § Java Servlet • Runs on Web Server with Java Servlet Engine Included with Open. Edge Application Servers SOA-13: Advanced App. Server Topics 10 © 2006 Progress Software Corporation
Advanced App. Server Topics Agenda § Architecture & Components § Connection Management • Session Managed Model • Session-Free Model § Diagnostics, Logging & Debugging § Migration Steps for Deployed Applications SOA-13: Advanced App. Server Topics 11 © 2006 Progress Software Corporation
Session Models & Operating Modes Connection management § Session managed model • Client sends requests over persistent connection – Requests handled sequentially • Operating Modes – State-reset – State-aware – Stateless Progress V 8. 2 Progress V 9 § Session-free model Open. Edge 10. 0 • Client send requests on any available connection – Requests handled in parallel • Operating Mode – State-free SOA-13: Advanced App. Server Topics 12 © 2006 Progress Software Corporation
Session Models & Operating Modes Connection management § Specified when App. Server is configured § Determines how client requests dispatched to § individual Application Server Agents Design time considerations • Design & development of application – Application context • Performance Goals – System resources, network response – Request throughput and response time SOA-13: Advanced App. Server Topics 13 © 2006 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 App. Server Broker – Many clients per application server agent • Context must be managed externally SOA-13: Advanced App. Server Topics 14 © 2006 Progress Software Corporation
Session Managed Model state-aware & state-reset Operating Modes App. Server Client 2 Client 3 Client 4 SOA-13: Advanced App. Server Topics Name. Server Client 1 Application Broker App. Server Agents ABL Data Message Queue 15 © 2006 Progress Software Corporation
Session Managed Model Stateless Operating Mode App. Server Client 2 Client 3 Client 4 SOA-13: Advanced App. Server Topics Name. Server Client 1 Application Broker App. Server Agents ABL Data Message Queue 16 © 2006 Progress Software Corporation
Advanced App. Server Topics Agenda § Architecture & Components § Connection Management • Session Managed Model • Session-Free Model § Diagnostics, Logging & Debugging § Migration Steps for Deployed Applications SOA-13: Advanced App. Server Topics 17 © 2006 Progress Software Corporation
Session-free Model State-free Operating Mode ABL Clients App. Server Client 1 App. Server Agents Web Service Client 3 Web Services Adapter Client 2 SOA-13: Advanced App. Server Topics Name. Server Open Clients Application Broker ABL Data 18 © 2006 Progress Software Corporation
Session-free Model State-free Operating Mode § Logical Connection • No connection maintained between Client and Application Server Agent § Pooled Connections • ABL requests on the server handle • Web service requests on the WSA • Open Client requests on the App. Object § Requests dispatched similar to stateless except • Multiple requests from one client run in parallel • Each request runs independently § Context must be managed externally SOA-13: Advanced App. Server Topics 19 © 2006 Progress Software Corporation
Session-free Model Design Considerations § Avoid dependency on other calls! • Procedures can execute concurrently • Order of completion NOT predictable § Context Management • Session or task level • Client or Server • When to delete SOA-13: Advanced App. Server Topics 20 © 2006 Progress Software Corporation
Why & When to use Session-free Model § Some applications inherently NOT connection oriented • Requests executed regardless of other requests • Should not be tied to one App. Server Connection – i. e. standalone request for information § Efficiency and Performance • • Parallel execution on any App. Server Efficient use of resources Performance gains Scalability SOA-13: Advanced App. Server Topics 21 © 2006 Progress Software Corporation
What about ASYNC Calls? Does Async mean parallel execution? RUN proc ON server ASYNCHRONOUS. . § Session-managed Model • Allow multiple remote procedures to be executed • Run serially on same App. Server § Session-free Model • Will allow procedures to execute concurrently SOA-13: Advanced App. Server Topics 22 © 2006 Progress Software Corporation
Session-free Model Coding Example – RUN ASYNCHRONOUS § Internal procedure run in procedure handle • Each call to internal procedure queued on the client RUN bl. p ON SERVER h. App. Srv ASYNCHRONOUS SET h. Rq 2 EVENT-PROCEDURE bl-evt-proc IN THIS-PROCEDURE (INPUT-OUTPUT TABLE order-table, OUTPUT i. Count). PROCEDURE bl-evt-proc: DEFINE INPUT PARAMETER TABLE FOR order-table. DEFINE INPUT PARAMETER i. Count as INT NO-UNDO. SOA-13: Advanced App. Server Topics 23 © 2006 Progress Software Corporation
Enhanced Syntax to support to Session-free § CONNECT() • Method • Properties § CANCEL-REQUESTS() method § CLIENT-CONNECTION-ID attribute SOA-13: Advanced App. Server Topics 24 © 2006 Progress Software Corporation
CONNECT() method § -session. Model • Default Session-managed • Set to Session-free to use the session-free model f. Ok = h. App. Srv: CONNECT(“ -URL App. Server: //host: port/servicename -session. Model Session-free”). § Model and mode must match • Session-free Client can only connect to • State-free App. Server SOA-13: Advanced App. Server Topics 25 © 2006 Progress Software Corporation
CONNECT() § Session-free connection • • • Pool of re-usable socket connections App. Server handle points to pool Managed transparently by Client Connections allocated as needed Tunable using CONNECT() properties SOA-13: Advanced App. Server Topics 26 © 2006 Progress Software Corporation
CANCEL-REQUESTS() method § Session managed Model • Raises STOP for request currently running • Purges send request queue of pending requests § Session-free Model • Raises STOP for ALL requests currently running • Purges queued requests SOA-13: Advanced App. Server Topics 27 © 2006 Progress Software Corporation
CLIENT-CONNECTION-ID attribute § Character attribute on a server handle associated with session-managed applications • Session-managed – Returns connection ID string for the App. Server connection associated with the server handle • Session-free – Logical connection to the App. Server is represented by a pool of App. Server connections – Returns the unknown value SOA-13: Advanced App. Server Topics 28 © 2006 Progress Software Corporation
Name. Server Load Balancing § Session managed Model • On Client connection to the App. Server • Same App. Server serves all requests from a client § Session-free Model • On each request SOA-13: Advanced App. Server Topics 29 © 2006 Progress Software Corporation
Persistent Procedures in a Session-free Model § A context is created for the internal procedures § All internal procedures on a remote procedure • Will execute on the same App. Server • Will execute serially – Losing parallel advantage – Reducing scalability SOA-13: Advanced App. Server Topics 30 © 2006 Progress Software Corporation
Advanced App. Server Topics Agenda § Architecture & Components § Connection Management • Session Managed Model • Session-Free Model § Diagnostics, Logging & Debugging § Migration Steps for Deployed Applications SOA-13: Advanced App. Server Topics 31 © 2006 Progress Software Corporation
Logging Infrastructure § Log Files • Unified Format § Log Entry Types § Logging Levels § Log size threshold § LOG-MANAGER § Log File Analysis • Log. Read Utility SOA-13: Advanced App. Server Topics 32 © 2006 Progress Software Corporation
Diagnostics, Logging & Debugging Where to look for an App. Server Application § Which Log? Admin. Server admserv. log Name. Server ns 1. ns. log AS Broker asbroker 1. broker. log AS Agent asbroker 1. server. log AIA aia 1. aia. log Database dbname. lg § What about the Client? • -clientlog logfilename SOA-13: Advanced App. Server Topics 33 © 2006 Progress Software Corporation
Log Entry Types § Server/Client Executables § Other • • 4 GLMessages 1 4 GLTrace DB. Connects Dyn. Objects. * Qry. Info SAX Pro. Events. * • • AIA* ASPlumbing ASDefault NSPlumbing UBroker. * WSADefault Msgr. Trace 1 Client only SOA-13: Advanced App. Server Topics 34 © 2006 Progress Software Corporation
Logging Levels § Setting logginglevel • Start. Up Parameter • LOG-MANAGER system handle • Ubroker. properties file § Logginglevel Values • • • 0 – None 1 – Errors 2 – Basic 3 – Verbose 4 - Extended SOA-13: Advanced App. Server Topics 35 © 2006 Progress Software Corporation
LOG-MANAGER System handle attributes & methods § Attributes • • ENTRY-TYPES-LIST LOG-ENTRY-TYPES LOGFILE-NAME LOGGING-LEVEL LOG-THRESHOLD NUM-LOG-FILES TYPE SOA-13: Advanced App. Server Topics § Methods (Open. Edge 10. 1 A) • CLOSE-LOG • CLEAR-LOG • WRITE-MESSAGE 36 © 2006 Progress Software Corporation
Log File Analysis – Log. Read 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 SOA-13: Advanced App. Server Topics 37 © 2006 Progress Software Corporation
Log File Analysis – Log. Read Utility § Browse, Filter or Query Log SOA-13: Advanced App. Server Topics 38 © 2006 Progress Software Corporation
Log File Analysis – Log. Read Utility PSDN. progress. com § Select Logs to Merge § File Merge SOA-13: Advanced App. Server Topics 39 © 2006 Progress Software Corporation
Log File Analysis – Log. Read Utility PSDN. progress. com § Analyze the Merge SOA-13: Advanced App. Server Topics 40 © 2006 Progress Software Corporation
Debugging App. Server Code Application Debugger – Debug Modes § Application Mode, supports distributed • Step into App. Server 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 SOA-13: Advanced App. Server Topics 41 © 2006 Progress Software Corporation
Enabling Debugging is NOT enabled by default § Client • Start →Programs → Open. Edge → Proenv § App. Server SOA-13: Advanced App. Server Topics 42 © 2006 Progress Software Corporation
Attachable Mode Debugging Code Remotely § Ready the App. Server Agent for debugging • -debug. Ready port-number • pro. Debug. Config § Start Attachable Debugger • Start → Programs → Open. Edge → Debugger SOA-13: Advanced App. Server Topics 43 © 2006 Progress Software Corporation
Attachable Debugger Local Remote SOA-13: Advanced App. Server Topics 44 © 2006 Progress Software Corporation
Attachable Debugger SOA-13: Advanced App. Server Topics 45 © 2006 Progress Software Corporation
Remote Code is Available Debug as usual SOA-13: Advanced App. Server Topics 46 © 2006 Progress Software Corporation
Detach from Process SOA-13: Advanced App. Server Topics 47 © 2006 Progress Software Corporation
Advanced App. Server Topics Agenda § Architecture & Components § Connection Management • Session Managed Model • Session-Free Model § Diagnostics, Logging & Debugging § Migration Steps for Deployed Applications SOA-13: Advanced App. Server Topics 48 © 2006 Progress Software Corporation
Migrating a Deployed Application Planning an Upgrade § Considerations • Whats’s New? – Enhanced Capabilities • Operating Modes • Configurations - Fault Tolerance § Steps before deployment • Upgrade Licenses • Convert/Migrate Database • Migrate Code SOA-13: Advanced App. Server Topics 49 © 2006 Progress Software Corporation
Migrating a Deployed Application Deploying the Upgrade Client Code SOA-13: Advanced App. Server Topics Name. Server Clients Name. Server Existing Agents App. Server Application Broker New Server Code Data 50 © 2006 Progress Software Corporation
Migrating a Deployed Application Deploying the Upgrade § Register New App. Server(s) • With existing Name. Server § Configure new Name. Server § Shutdown Clients § Upgrade Client (license & application) § Reconnect clients to new App. Server(s) § Shutdown old Name. Server SOA-13: Advanced App. Server Topics 51 © 2006 Progress Software Corporation
For More Information, go to… § PSDN • Log. Read Utility • White Papers & Presentations § Relevant Exchange Sessions: • ARCH– 3: Context Management in the Open. Edge Reference Architecture • SOA-5: Accessing the App. Server from Anywhere & Everywhere • SOA– 10: Application Servers, Web Services and Integration Info Exchange SOA-13: Advanced App. Server Topics 52 © 2006 Progress Software Corporation
Documentation & Education § Open. Edge Documentation • Getting Started: Application and Integration Services • Application Server: Administration • Application Server: Developing App. Server Apps • Development: Debugging and Troubleshooting § Open. Edge Education • Developing Distributed App. Server Applications • Distributed App. Server Application Administration • Distributed App. Server Application Development SOA-13: Advanced App. Server Topics 53 © 2006 Progress Software Corporation
Advanced App. Server Topics Questions? SOA-13: Advanced App. Server Topics 54 © 2006 Progress Software Corporation
Thank you for your time SOA-13: Advanced App. Server Topics 55 © 2006 Progress Software Corporation
SOA-13: Advanced App. Server Topics 56 © 2006 Progress Software Corporation
- Slides: 56