hello openroad! an introduction to rapid application...

21
1 Hello World! Taking your Ingres Data to the Web David Tondreau, Architect 1

Upload: others

Post on 01-Oct-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

1

Hello World!Taking your Ingres Data to the Web

David Tondreau, Architect

1

Page 2: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

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

Page 3: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

3

A Simple Client/Server Application

Page 4: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

4

Client/Server Communications

Ingres/Net

Page 5: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

5

Client/Server Scale-Out Problem

Page 6: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

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

Page 7: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

7

The “N-Tier” Solution

Page 8: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

8

OpenROAD Server Communications

Ingres/Net

Ingres/NetDCOM

Page 9: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

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

Page 10: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

10

Web Communications

Ingres/Net

Ingres/Net

Ingres/Net

DCOM

DCOMHTTP

Page 11: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

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

Page 12: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

12

Ingres Data On the Web

Page 13: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

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

Page 14: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

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

Page 15: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

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()

Page 16: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

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;}

Page 17: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

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;}

Page 18: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

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()

Page 19: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

19

Using the RemoteServer Connection

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

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

CurRemoteServer.Release();}

Page 20: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

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();}

Page 21: Hello OpenROAD! An Introduction to Rapid Application ...downloads.actian.com/online/media/pdf/Application...Hello OpenROAD! An Introduction to Rapid Application Development for Ingres

21

More Questions? See You In The Forums!