frank hilhorst president progressive consulting inc. open source data sharing

33
Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Upload: louise-simon

Post on 30-Dec-2015

244 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Frank HilhorstPresident Progressive Consulting Inc.

Open Source Data Sharing

Page 2: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Introducing myself • Started working with PROGRESS version 6

in 1993

• Principle Software architect

• PLATON mortgage loan system

• JAZZ hospitality billing system

• Started Progressive Consulting Inc in 2006

• Ahstanga yoga afficionado

Page 3: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Introducing Progressive Consulting

• Focus on integrating OpenEdge applications with other technologies

• UI integration

• Back end integration

• Motto

• Making the world as open to OpenEdge as OpenEdge is to the world

Page 4: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Published tools

• TurboCgi

• TurboComet

• TurboStomp

• TurboQuery

• Download beta release from

• http://www.progressiveconsultinginc.com/news

Page 5: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Dictionary meaning of data sharing

•The ability to share the same data resource with multiple applications or users

Page 6: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Sharing data between the PROGRESS environment and an Open Source

environment

• Copy data definitions and data

• From PROGRESS to Open Source environment

• From Open Source environment to PROGRESS

• Access and manipulate data definitions and data

• From PROGRESS in Open Source DB

• From Open Source enviroment in Progress DB

Page 7: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Structure of this presentation • Introduction to open source databases and

JDBC

• Project to create a data server for open source database

• Why and how

• Demo data server

• Architecture of data server

• Comparing Progress with other databases

• How to install and use the JDBC data server toolkit

Page 8: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Introduction to open source

databases and JDBC

Page 9: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Dominant open source databases

Database CharactaristicsSample

applicationsMySql •Connectors supported

•JDBC•ODBC•ADO.NET

•Drupal•Wordpress

Apache Derby •Connectors supported•JDBC•ODBC

•ActiveMQ•Apache service mix

PostgressQL •Connectors supported•JDBC•ODBC•ADO

•HoneyBird ERP•LedgerSMB

Page 10: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

What is JDBC (Java Database connectivity)?

• OO Interface that supports

• SQL standard (create, update, insert, delete)

• Defines the following JAVA objects

• Statement

• PreparedStatement

• CallableStatement

• Resultset

Page 11: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

OpenEdge support for JDBC

• Jars provided

• openedge.jar

• pool.jar

• sqlexp (SQL explorer)

• sqldump

• sqlload

• sqlschema

Page 12: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

How to provide JDBC access to a PROGRESS database

• Create a user sysprogress

• Start up database with SQL server enabled

• Option 1: Use 1 broker

• Proserve -H .. -S .. -ServerType both

• Option 2: Use (separate) secondary login broker

• Proserver -H .. -S .. -m3 -ServerType SQL

Page 13: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Testing the JDBC connection with the SQL explorer

•sqlexp -url jdbc:datadirect:openedge://localhost:30201;databaseName=sports -user sysprogress -password sysprogress

•select name, address from PUB.customer

Page 14: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Project to create a data server for

open source database

Page 15: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Altisource Application environment

Progress DB

RabbitMq

Legacy Application

Transfor-mationEngine

MySql DB

Next Generation

Modules

Page 16: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Demo

Page 17: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

What we are going to demo •Using the TurboQuery Dictionary

• Create database in mySql

• Copy sports database from PROGRESS to mySql DB

• Add a table and fields

• Copy mySql database back to a PROGRESS database

•Show how to populate a progress dataset from the mySql database

•Make changes to that dataset and commit those changes to the mySql database

•Commit the changes

Page 18: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Architecture of data server

Page 19: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Architecture of data server

MySql DB

Tomcat

Web Service

ABL/OOLayer

ProgressClient

SQLStatement

SQLStatement

JSONDataset

SQL ResultSet

Page 20: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

How to get data from the foreign database

•Use TurboQuery dataset generator to get dataset definitions

•Instantiate QueryManager class

•Use QueryManager:GetData to populate dataset

Page 21: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

What the code looks like

Page 22: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

How to update the foreign database

•Populate the dataset

•Turn on tracking changes

•Make changes

•Commit the changes

Page 23: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

What the code looks like

Page 24: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Classes of the ABL/OO layer

QueryManager

JdbcSchemaMapper ProgressSchemaMapper

JdbcToProStmntGeneratorProToJdbcStmntGenerator

•CreateTable•CreateIndex•DumpTableData

•Format•TransformFieldName•TransformTableName

•Format•TransformFieldName•TransformTableName

•getJdbcSchemaAttrName•TransformFieldName•TransformTableName

•InsertInto•DeleteFrom•FormatBufferFieldValue

•JdbcMode •JdbcMode

•JdbcMode •JdbcMode

•GetData•GetDataAndDefs•CommitChanges

•JdbcMode•jdbcSchemaMapper

Page 25: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Comparing Progress with open source databases

Page 26: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

High level comparisonProgress database Open Source Databases

Strongly typed database Weakly typed database

• Variable record length• Block based

• Fixed record length (mostly)• Not block based

• Table & field name space rules• Hyphen allowed• Spaces not allowed• 32 character maximum length

• Table & field name space rules• Hyphen not allowed• Spaces allowed• Can be very long

No support for foreign keys constraints

Support for foreign keys constraints

Page 27: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Comparing data typesProgress mySql Apache Derby

Character • char• varchar• text• tinytext

• char• varchar• long varchar

Date Date date

Integer • Smallint• Smallint unsigned• Mediumint• Mediumint unsigned

• smallint• time • integer

Int64 • Int• Int unsigned• bigint• bigint unsigned

• bigint• double• real

DecimaL • float• double• decimal• numeric

• decimal• numeric

Datetime • timestamp• datetime

timestamp

Raw • binary• varbinary

• varchar for bit data• long varchar for bit data

blob • tinyblob• blob• mediumblob• longblob

blob

Page 28: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

How to install and use the

JDBC data server toolkit

Page 29: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

How to install TurboQuery beta version

•Download TurboQuery.zip from this Url

• http://www.progressiveconsultinginc.com/news.html

•Unzip file to c:\

• Should get the following directory structure

Page 30: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

How to install TurboQuery beta version (continued)

•Make sure JAVA version 6 or higher is installed

• JAVA -version

•In C:\TurboQuery\ini\Progress.ini

•Point the DLC variable to your OpenEdge root directory

Page 31: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

How to install TurboQuery beta version (continued)

• Using the Icons in the Shortcuts directory

• Start Sports DB database server

• Start Apache Derby server

• Start Jetty Servlet engine

Page 32: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

What is next for TurboQuery?

• Batch update for data definitions

• Paged SQL queries

• Extending support for more OpenSource databases

• Externalization of database specific mappings

• SPRING/MAVEN based JDBC driver configuration

Page 33: Frank Hilhorst President Progressive Consulting Inc. Open Source Data Sharing

Questions?