500 likes | 1.08k Views
F8: Progress AppServer. Pat Bonser Technical Marketing Manager Progress Software. Agenda. What is the Progress AppServer ? Architecture Components Running remote procedures Operating Modes Open Client Summary. Progress AppServer.
E N D
F8: Progress AppServer Pat Bonser Technical Marketing Manager Progress Software
Agenda • What is the Progress AppServer ? • Architecture • Components • Running remote procedures • Operating Modes • Open Client • Summary
Progress AppServer • Foundation for Progress’ distributed computing strategy • The framework for developing and deploying 4GL procedures as distributed application components • Business logic encapsulated into components that can be deployed across the enterprise • RPC for the 4GL
Progress AppServer Character GUI DistributedApplication
Progress AppServer Architecture Character GUI Clients AppServer Application Servers 4GL Business Logic Application Broker NameServer
Progress AppServer Components • NameServer • Application Broker • Application Server Process • AppServer Internet Adapter - AIA & AIA/S • Clients • Progress • GUI, Character, WebClient, WebSpeed Agents • Open Clients • Java, ActiveX
NameServer • Location Transparency • Client requests an Application Service not a connection to a specific AppServer • Load Balancing • Multiple AppServers can register to support the same Application Service • Connection requests can be balanced across AppServers • Weight factor determines distribution • A “hot stand-by” using a weight factor of 0
NameServer • AppServer registers with NameServer the Application Service(s) it supports • Client requests an Application Service from the NameServer • Communication with NameServer UDP • Fault-tolerance for NameServer • NameServer Replication • NameServer Neighbors Application Service – logical name, eg: Inventory, Parts, Account, com.progress.orders
Application Broker • Typically started at system startup-time • Manages pools of re-usable application server processes • Manages client requests for 4GL procedure execution
Application Server Process • Executes Progress 4GL procedures • Application Server Processes are reused • Determined by AppServer Operating Mode
AppServer Internet Adapter Web Server INTERNET JSE AIA • Extends the AppServer to the Internet • HTTP & HTTPS Tunneling • Java Servlet • ALL Progress 4GL Clients AppServer
Running Remote Procedures 1. Create server handle AppServer 4GL Business Logic procedure b procedure a procedurec procedured 2. Connect to AppServer 3. RUN procedures 4. Disconnect 5. Delete server handle
Running Remote Procedures 4GL Client • CREATE SERVERhandle • handle:CONNECT(connection_parameters, userid, password, appserver_info) • RUN procedureA ON SERVERhandle • handle:DISCONNECT() • DELETE OBJECThandle
Running Remote Procedures Connection Parameters • -H IP address or TCP/IP host name of NameServer • -S Port Number or UDP service name of NameServer • -AppService Application Service registered with NameServer or • -URL To connect to AppServer using the AIA or AIA/S
Running Remote Procedures 4GL Client DEFINE VARIABLE hdl AS HANDLE.DEFINE VARIABLE ret AS LOGICAL.DEFINE VARIABLE account-number AS INTEGER.CREATE SERVER hdl.ret = hdl:CONNECT(“-S 5555 -H zeus -AppService Account”). RUN AccountInfo.p ON SERVER hdl (INPUT account-number). ret = hdl:DISCONNECT().DELETE OBJECT hdl.
Asynchronous Calls Client Server1 Server2 Standard AppServer Calls are synchronous, blocking the client during active call . . . . . . . . . . . . . . . . .Time With Asynchronous calls the client can make multiple calls to multiple servers RUN proc ON server ASYNCHRONOUS. . . . . . . .
Connecting to an AppServer AS=Inventory Host=zeus Port=3097 AS=Inventory Host=zeus Port==3097 NameServer AppServer Connect How does it work? Host=Gemini Port=5162 AS=Inventory Host=zeus Port=3097 Host=zeus Port=3097 Client handle:CONNECT(“-H Gemini -S 5162 -AppService Inventory”)
Running Remote Procedures Procedure foo NameServer Run AppServer Connect How does it work? Host=Gemini Port=5162 AS=Inventory Host=zeus Port=3097 Host=zeus Port=3097 Client RUN foo.r on SERVER handle
Replicated AppServers AS=Inventory AS=Inventory Host=herta Port=7394 Host=zeus Port=3097 NameServer AppServer AppServer Connect Connect How does it work? Host=zeus Port=3097 Weight=70 Client Host=Gemini Port=5162 AS=Inventory zeus, 3097, 70 herta, 7394, 30 Client handle:CONNECT(“-H Gemini -S 5162 -AppService Inventory”) Host=herta Port=7394 Weight=30
Replicated NameServers Host=172.20.0.7 Port=5162 AS=Inventory Host=zeus Port=3097 Host=zeus Port=3097 AS=Inventory Host=zeus Port==3097 NameServer NameServer Connect & Run AS=Inventory Host=zeus Port=3097 AS=Inventory Host=zeus Port=3097 AppServer Host=172.20.6.4 Port=5162 AS=Inventory How does it work? Host=zeus Port=3097 Client NameServer.NS1 portNumber=5162 hostName=172.20.255.255 Connect(“-H 172.20.255.255 -S 5162 -AppService Inventory”)
AppServer Operating Modes • Specified when an AppServer is configured • Determines how client requests are dispatched to individual Application Server processes • Will have significant impact on the design and performance of your application
AppServer Operating Modes • State-Aware • One client per application server process • Application server session objects maintained across connections • State-Reset • One client per application server process • Application server session automatically reset • Stateless • Many clients per application server process • Context must be managed externally
Choosing an Operating Mode State-Aware State-Reset Stateless • Design-time Decision • Factors Affecting Decision • Design Complexity • Resource Consumption • Performance • Request Throughput • Response Time • Application Context
State-reset State-aware Resource Considerations System Resources Stateless (Bound/Unbound) Stateless Throughput
State-reset State-aware Resource Considerations Response Time Stateless (Bound/Unbound) Development Costs Stateless
Open Client access to Progress GUI AppServer Character 4GL Business Logic PROXY PROXY
Open Client Interface • Maps 4GL concepts to Open Client concepts • Server handle is an application object • Persistent procedure handle is a procedure object • Non-persistent procedures, internal procedures and user defined functions map to object methods
Open Client Model ProcObject: AcctInfo App Object: Account AcctInfo.p Proc getPaymentsInfo Function getStartDate add.p remove.p update.p
Proxy Generation 4GL .r files Business logic ProxyGen Proxies Automation Object (DLL) Java classes
4GL Example to be run by Open Client /* AccountInfo.p Procedure */ DEFINE INPUT PARAM account-num AS INTEGER./* … AccountInfo.p code … */ /* AccountInfo.p Internal Procedures */ /* getPaymentsInfo returns payment records. */ PROCEDURE getPaymentsInfo: DEFINE INPUT PARAM from-date AS DATE. DEFINE INPUT PARAM TABLE FOR payee-list. DEFINE OUTPUT PARAM payments-num AS INTEGER. DEFINE OUTPUT PARAM TABLE FOR payments-info. /* ... getPaymentsInfo Code ... */ END PROCEDURE.
Java Client access to 4GL Example Account account = new Account(“AppServer://zeus:5162”, “wilner”,“futureproof”,null); AccountInfo info = account.createPO_AccountInfo(777); java.util.Date fromDate; java.sql.ResultSet payeeList;COM.progress.o4gl.IntegerHolder paymentsNum;COM.progress.o4gl.ResultSetHolder paymentsInfo;info.getPaymentsInfo(fromDate, payeeList, paymentsNum, paymentsInfo);
VB Client access to 4GL Example Dim acct As AccountLib.CAccount Set acct = new CAccount acct.OC_Connect("AppServer://zeus:5162", "wilner", "futureproof") Dim info As AccountLib.CPO_AccountInfo set info = acct.createPO_AcctInfo(777) Dim payeeList As ADODB.RecordsetDim payees As ProO4glActiveXLib.CProTempTable Dim payments As ProO4glActiveXLib.CProTempTable Set payees = new CProTempTable ' input Temp-Table Set payments = new CProTempTable ' output Temp-Table payees.DataSource = payeeList Dim paymentsNum as Long Dim fromDate as doubleCall info.getPaymentsInfo(fromDate, payees, paymentsNum, payments)
Configuration Flexibility • Multiple AppServers per machine • Multiple AppServers to support one Application Service • NameServer on the AppServer machine • NameServer on it’s own machine • NameServer on the client machine • Multiple NameServers
Scalability & Availability • Re-useable Servers • Replicated Servers • Stateless Servers • Message Queuing • Load Balancing • Location Transparency
Summary AppServer in a nutshell! • Open Interfaces • Highly Scalable • Location transparency, fault-tolerance, load balancing • Easy-to-use GUI-based configuration • “Internet-ready”