20.08.2013 Views

OLE DB Goes Enterprise the PI System Data Provider - OSIsoft

OLE DB Goes Enterprise the PI System Data Provider - OSIsoft

OLE DB Goes Enterprise the PI System Data Provider - OSIsoft

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Copyright © 2007 <strong>OSIsoft</strong>, Inc. All rights reserved.<br />

<strong>OLE</strong> <strong>DB</strong> <strong>Goes</strong> <strong>Enterprise</strong><br />

<strong>the</strong> <strong>PI</strong> <strong>System</strong> <strong>Data</strong> <strong>Provider</strong><br />

Bodo Bachmann, Martin Freitag


Agenda<br />

Unified <strong>Data</strong> Access<br />

MiddleWare Standards<br />

<strong>PI</strong> <strong>OLE</strong><strong>DB</strong><br />

Application Integration Trends<br />

Demo 1+2<br />

Limitations<br />

New Goals<br />

<strong>PI</strong> DAS<br />

Copyright © 2007 <strong>OSIsoft</strong>, Inc. All rights reserved.<br />

2


Unified <strong>Data</strong> Access<br />

There is no Knowledge without Information<br />

and <strong>the</strong>re is no Information without <strong>Data</strong><br />

Today, data is usually stored in a variety of<br />

sources:<br />

<strong>Data</strong>bases, files, spreadsheets, emails,..<br />

Unified <strong>Data</strong> Access aims at<br />

transparent access to data via Middleware.<br />

Well known data access standards are:<br />

O<strong>DB</strong>C<br />

J<strong>DB</strong>C<br />

<strong>OLE</strong> <strong>DB</strong><br />

ADO.NET<br />

Copyright © 2007 <strong>OSIsoft</strong>, Inc. All rights reserved.<br />

J<strong>DB</strong>C<br />

O<strong>DB</strong>C<br />

<strong>OLE</strong> <strong>DB</strong><br />

ADO<br />

.NET Managed<br />

<strong>Provider</strong>s<br />

XML<br />

3


<strong>OLE</strong> <strong>DB</strong> / <strong>PI</strong> <strong>OLE</strong><strong>DB</strong><br />

<strong>OLE</strong> <strong>DB</strong> Object Linking and Embedding <strong>Data</strong>base provides<br />

and organizes COM objects for efficient, unified data access<br />

<strong>OLE</strong> <strong>DB</strong>, much like OPC, standardizes <strong>the</strong> data access; however,<br />

<strong>the</strong> big advantage <strong>OLE</strong> <strong>DB</strong> spec. offers is <strong>the</strong> implementation of a<br />

powerful script language ­ SQL<br />

<strong>PI</strong> <strong>OLE</strong><strong>DB</strong> provider allows applications (<strong>OLE</strong> <strong>DB</strong> consumers)<br />

working with <strong>PI</strong> data through SQL queries:<br />

<strong>PI</strong> Server<br />

Copyright © 2007 <strong>OSIsoft</strong>, Inc. All rights reserved.<br />

SQL<br />

Engine<br />

<strong>OLE</strong> <strong>DB</strong>/<br />

COM<br />

<strong>PI</strong> <strong>OLE</strong><strong>DB</strong> <strong>Provider</strong><br />

Client Application<br />

<strong>OLE</strong> <strong>DB</strong> Consumer<br />

SQL Queries<br />

4


<strong>PI</strong> <strong>OLE</strong><strong>DB</strong><br />

<strong>PI</strong> <strong>OLE</strong><strong>DB</strong> uses <strong>PI</strong> SDK for accessing <strong>the</strong> <strong>PI</strong> data. It’s SQL Engine<br />

implementation, currently built in <strong>the</strong> provider, thus translates SQL<br />

queries to appropriate <strong>PI</strong> SDK calls.<br />

Many popular client apps. ­ <strong>OLE</strong> <strong>DB</strong> consumers, can thus “script” <strong>PI</strong><br />

data, or have “built in” support for configuring <strong>OLE</strong> <strong>DB</strong> interfaces,<br />

e.g. MS Visual Studio.<br />

<strong>PI</strong> Server<br />

Copyright © 2007 <strong>OSIsoft</strong>, Inc. All rights reserved.<br />

<strong>PI</strong> SDK<br />

SQL<br />

Engine<br />

<strong>OLE</strong> <strong>DB</strong>/<br />

COM<br />

<strong>PI</strong> <strong>OLE</strong><strong>DB</strong> <strong>Provider</strong><br />

Client Application<br />

SQL Server<br />

Oracle, ADO.NET,<br />

Excel,<br />

J<strong>DB</strong>C/<strong>OLE</strong><strong>DB</strong>,…<br />

<strong>OLE</strong> <strong>DB</strong> Consumer<br />

5


Application Integration Trends<br />

Middleware data access standards:<br />

O<strong>DB</strong>C, J<strong>DB</strong>C drivers – procedural approach<br />

<strong>OLE</strong> <strong>DB</strong> providers – COM interfaces<br />

.NET providers – managed data providers<br />

for <strong>the</strong> .NET environment<br />

Products that benefit from MiddleWare standards:<br />

Microsoft SQL Server Integration Services (SSIS)<br />

Oracle Fusion<br />

OPC Universal Architecture<br />

In Service Oriented Architecture (SOA), data is accessed via a limited set of entry<br />

points (services). A MiddleWare component that reduces <strong>the</strong> number of such<br />

entry points thus perfectly fits SOA requirements.<br />

Copyright © 2007 <strong>OSIsoft</strong>, Inc. All rights reserved.<br />

6


Demo 1 ­ <strong>PI</strong> <strong>OLE</strong><strong>DB</strong> and SSIS<br />

Example 1 will show <strong>the</strong> configuration steps needed to Extract <strong>PI</strong><br />

data, Transform it to XML, attach to an e­mail and send (Load) to a<br />

given recipient. This ETL package, created in SSIS, will finally be<br />

automated; that is, executed on a periodical basis.<br />

Utilizing MS SQL Server Tools (DTS and SSIS) for <strong>Data</strong> Exchange between <strong>PI</strong> and R<strong>DB</strong>MS,<br />

White Paper<br />

The example will utilize:<br />

­ SSIS (SQL Server Integration Services) and Visual Studio 2005<br />

­ <strong>PI</strong> <strong>OLE</strong><strong>DB</strong> provider<br />

Copyright © 2007 <strong>OSIsoft</strong>, Inc. All rights reserved.<br />

<strong>PI</strong> Server<br />

Source<br />

<strong>PI</strong> <strong>OLE</strong><strong>DB</strong><br />

SQL Server Agent<br />

Scheduler<br />

.NET SSIS Script<br />

E­Mail<br />

Recipient<br />

7


Demo 1 ­ <strong>PI</strong> <strong>OLE</strong><strong>DB</strong> and SSIS<br />

Copyright © 2007 <strong>OSIsoft</strong>, Inc. All rights reserved.<br />

8


Demo 2 – Views / J<strong>DB</strong>C bridge<br />

Demo 2 shows creating a View from a Java application and accessing <strong>PI</strong> data<br />

from a J<strong>DB</strong>C based client tool ­ <strong>the</strong> DbVisualizer.<br />

As <strong>the</strong>re is no native <strong>PI</strong> J<strong>DB</strong>C driver today, a third party J<strong>DB</strong>C / <strong>OLE</strong> <strong>DB</strong> bridge<br />

is used.<br />

J<strong>DB</strong>C to <strong>PI</strong> <strong>OLE</strong><strong>DB</strong> using 3rd party bridges, White Paper<br />

The example utilizes:<br />

­ DbVisualizer from Onseven Software AB<br />

­ JadoZoom J<strong>DB</strong>C / <strong>OLE</strong> <strong>DB</strong> bridge from infoZoom<br />

­ <strong>PI</strong> <strong>OLE</strong><strong>DB</strong> provider<br />

MS Windows<br />

<strong>PI</strong> Server<br />

Copyright © 2007 <strong>OSIsoft</strong>, Inc. All rights reserved.<br />

DbVisualizer<br />

(Java)<br />

J<strong>DB</strong>C / <strong>OLE</strong> <strong>DB</strong><br />

Bridge<br />

<strong>PI</strong> <strong>OLE</strong><strong>DB</strong><br />

RMI<br />

Server<br />

RMI<br />

Client<br />

Platform<br />

Independent<br />

Node<br />

9


Demo 2 – Views / J<strong>DB</strong>C bridge<br />

Copyright © 2007 <strong>OSIsoft</strong>, Inc. All rights reserved.<br />

10


Demo 2 – Views / J<strong>DB</strong>C bridge<br />

Copyright © 2007 <strong>OSIsoft</strong>, Inc. All rights reserved.<br />

11


Current Limitations<br />

<strong>PI</strong> Server centric<br />

Performance<br />

Copyright © 2007 <strong>OSIsoft</strong>, Inc. All rights reserved.<br />

RPC‘s not granular enough, SDK overhead<br />

SQL Engine on client side<br />

Performance problems on WAN<br />

Mix of threading models<br />

Although multithreaded, needs to serialize into apartment threaded SDK<br />

No events<br />

No UNICODE<br />

No custom functions<br />

Except Views<br />

E.g. Functions that can interpret binary structures<br />

No execution plan exposed<br />

Is a problem when trying to find best query strategy<br />

12


Goals<br />

Access to <strong>the</strong> <strong>PI</strong> <strong>System</strong>, not just <strong>the</strong> <strong>PI</strong> Server<br />

Copyright © 2007 <strong>OSIsoft</strong>, Inc. All rights reserved.<br />

JOIN AF Server + multiple <strong>PI</strong> Servers<br />

Go beyond <strong>OLE</strong> <strong>DB</strong> standard<br />

Suitable as low level data access mechanism<br />

Application development<br />

Middle ware<br />

Support multiple SQL based data access standards<br />

e.g. J<strong>DB</strong>C, ADO.NET<br />

High Performance infrastructure<br />

New RPCs with improved granularity and compression<br />

Special pass through mechanism in AF SDK for massive data requests<br />

32 bit and 64 bit versions<br />

Scalable infrastructure<br />

Server side or client side deployment<br />

13


<strong>PI</strong> <strong>Data</strong> Access Server<br />

Three Tier Architecture<br />

• Multiple data access standards<br />

• Multiplatform<br />

• Application development<br />

• Access to <strong>PI</strong> <strong>System</strong> not just <strong>PI</strong> Server<br />

• Distributed Query Engine<br />

• High performing, scalable infrastructure<br />

• Events<br />

Copyright © 2007 <strong>OSIsoft</strong>, Inc. All rights reserved.<br />

<strong>PI</strong> DAS Clients<br />

<strong>PI</strong> DAS<br />

Back Ends<br />

14


Deployment Options<br />

Web Server Farm<br />

Copyright © 2007 <strong>OSIsoft</strong>, Inc. All rights reserved.<br />

<strong>PI</strong> DAS<br />

SQL Server<br />

<strong>PI</strong> DAS<br />

<strong>PI</strong> Server <strong>PI</strong> Server AF<br />

Server<br />

<strong>PI</strong> DAS<br />

Desktops<br />

15


<strong>PI</strong> <strong>Data</strong> Access Server<br />

Phase 1<br />

Phase 1: client side component<br />

The <strong>PI</strong> <strong>System</strong> <strong>Data</strong> <strong>Provider</strong> will implement<br />

<strong>the</strong> <strong>OLE</strong> <strong>DB</strong> data access standard<br />

In Phase 1, <strong>the</strong> data provider will embed <strong>the</strong><br />

SQL Engine logic<br />

Support for events<br />

Copyright © 2007 <strong>OSIsoft</strong>, Inc. All rights reserved.<br />

Client Application<br />

SQL<br />

Engine<br />

<strong>OLE</strong> <strong>DB</strong>/<br />

COM<br />

RPC / AF SDK<br />

Network<br />

<strong>PI</strong> Server <strong>PI</strong> Server<br />

AF Server<br />

<strong>PI</strong> <strong>System</strong><br />

<strong>Data</strong> <strong>Provider</strong><br />

16


<strong>PI</strong> <strong>Data</strong> Access Server<br />

Phase 2<br />

Phase 2: <strong>the</strong> data<br />

provider will be a<br />

light weight, client­<br />

side component<br />

More than one data access standard can<br />

be implemented<br />

<strong>Data</strong> filtering/reduction can happen:<br />

1. On back­end (query constrains)<br />

2. On <strong>PI</strong> DAS (JOINS)<br />

Copyright © 2007 <strong>OSIsoft</strong>, Inc. All rights reserved.<br />

Consumer / Client<br />

<strong>PI</strong> <strong>System</strong><br />

<strong>Data</strong> <strong>Provider</strong><br />

(<strong>OLE</strong> <strong>DB</strong>)<br />

<strong>PI</strong> Servers<br />

Consumer / Client<br />

<strong>PI</strong> <strong>System</strong><br />

<strong>Data</strong> <strong>Provider</strong><br />

(J<strong>DB</strong>C)<br />

Network<br />

<strong>PI</strong> DAS<br />

Network<br />

AF<br />

Server<br />

17


<strong>PI</strong> <strong>Data</strong> Access Server<br />

Phase 3<br />

Phase 3: implementation<br />

of o<strong>the</strong>r data access<br />

standards, scripting<br />

extensions, stored<br />

procedures<br />

Pre­compiled stored procedures will<br />

allow non­SQL based applications to<br />

connect to <strong>PI</strong> DAS<br />

External data sources can be<br />

integrated (JOINed) via AF<br />

<strong>Data</strong> References or direct, e.g. using<br />

<strong>OLE</strong> <strong>DB</strong>;<br />

<strong>PI</strong> DAS will operate as a distributed<br />

query engine for several data access<br />

standards.<br />

Copyright © 2007 <strong>OSIsoft</strong>, Inc. All rights reserved.<br />

Consumer /<br />

Client<br />

xxxxxxx<br />

<strong>PI</strong> Servers<br />

Consumer /<br />

Client<br />

<strong>OLE</strong> <strong>DB</strong><br />

Consumer /<br />

Client<br />

J<strong>DB</strong>C<br />

Network<br />

<strong>PI</strong> DAS<br />

Network<br />

AF<br />

Server<br />

Consumer /<br />

Client<br />

C++<br />

Library<br />

Third party<br />

data source<br />

18


Need to Know<br />

<strong>PI</strong> <strong>OLE</strong><strong>DB</strong> and <strong>PI</strong> <strong>System</strong> <strong>Data</strong> <strong>Provider</strong> will coexist<br />

New Table structure<br />

No M<strong>DB</strong> but AF tables<br />

Development effort spans multiple years<br />

Copyright © 2007 <strong>OSIsoft</strong>, Inc. All rights reserved.<br />

19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!