hello openroad! an introduction to rapid application...

Post on 01-Oct-2020

4 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

Hello World!Taking your Ingres Data to the Web

David Tondreau, Architect

1

2

Agenda

• Brief Recap from Last Week’s Webinar

• An Introduction to the OpenROAD Server

• Partitioning Applications

• Building Service Call Procedures

• Deploying 4GL Logic on the Server

• Enabling Clients to Access Server Logic

• Enabling Client Access through a Firewall

3

A Simple Client/Server Application

4

Client/Server Communications

Ingres/Net

5

Client/Server Scale-Out Problem

6

OpenROAD Server

• Supports deployment of server-side 4GL business logic• Makes OpenROAD 4GL business logic available to:

• OpenROAD desktop, browser and mobile clients• J2EE (Java applets, servlets, & beans)• .NET (C#, ASP.Net, VB.Net)• Browsers (HTML, ASP, JSP)• Other clients (Visual Basic, C++, etc.)

• Supports publishing of OpenROAD 4GL object classes as Web services

• Visual server farm administration utility

7

The “N-Tier” Solution

8

OpenROAD Server Communications

Ingres/Net

Ingres/NetDCOM

9

OpenROAD 2006’s HTTP Transport

• Allows partitioned OpenROAD clients to run on the internet

• Replaces the DCOM protocol between the client and the OpenROAD Server with HTTP

• Uses a “gatekeeper” application running in a Web server (e.g., Apache, IIS)

• Web Server forwards calls to the OpenROAD Server

10

Web Communications

Ingres/Net

Ingres/Net

Ingres/Net

DCOM

DCOMHTTP

11

Packaging Applications with the eClient

• Package partitioned OpenROAD clients into digitally signed browser controls

• Wrap with simple HTML page

• Host them on our web server

• Run them in a web browser

12

Ingres Data On the Web

13

Getting to the Web Step 1: Partitioning

1. Separate user interface from business logic

2. Add “Service Call Procedures” to provide remote access

3. Enable the thin client to connect to the server and call SCPs

Ingres/NetDCOM

14

Getting to the Web Step 2: Publishing

Ingres/NetDCOMHTTP

1. Implement a “gatekeeper” application that exposes selected SCPs to the web

2. Change the client to connect using the HTTP protocol

3. Package the application so it can be run in a browser

15

DbSessionObject System Class

• Contains the functions required to connect an OpenROAD client or server application to a database

• A DbSessionObject is created automatically if connecting to the current or a named database

• Available to all source components

Attributes• Database• DBMSError• ErrorNumber• Flags• Ingres• PreFetchRows• RowCount• ServerClass• ServerType• SessionID• State

Methods• CommitWork()• Connect()• Disconnect()• NewDBComponent()• OpenNewConnection()• RaiseDBEvent()• RegisterDBEvent()• RemoveDBEvent()• RollbackWork()• SequenceValue()• SetAutoCommit()• WriteDBComponent()

16

Using Built-In Database Session

{ SELECT :curObject.task_code = task_code, :curObject.task_name = task_name FROM task WHERE project_id = :curObject.project_id AND task_id = :curObject.task_id;}

17

Changing the Database Session

declare dbSession = DbSessionObject;enddeclare{ if (dbSession.Connect(Database=‘project2’) = ER_OK) then curMethod.DbSession = dbSession; endif; SELECT :curObject.task_code = task_code, :curObject.task_name = task_name FROM task WHERE project_id = :curObject.project_id AND task_id = :curObject.task_id;}

18

RemoteServer System Class

• Contains the functions required to connect to an application running in the OpenROAD Server and call it’s SCPs

• A global instance of the class is defined by the runtime but never automatically connects

• Available to all source components

Attributes• Errorcode

• Errortext

• Flags

• Image

• Location

• ServerType

Methods• Call4GL()

• Initiate()

• Release()

19

Using the RemoteServer Connection

{ CurRemoteServer.Initiate( location = ‘localhost’, image = ‘ProjectServer.img’, type = RP_SHARED);

CurRemoteServer.Call4GL( ‘TaskObject_LoadTask’, Task = BYREF(curObject));

CurRemoteServer.Release();}

20

Connecting via an HTTP Gatekeeper

{ CurRemoteServer.Initiate( Location='http://localhost/taskserver/srs.ashx', Image='TaskServer', Routing='http', Type=RP_SHARED);

CurRemoteServer.Call4GL( ‘TaskObject_LoadTask’, Task = BYREF(Task));

CurRemoteServer.Release();}

21

More Questions? See You In The Forums!

top related