osisoft cloud services core infrastructure for developing partner applications · 2017-10-21 ·...

67
EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC OSIsoft Cloud Services Core Infrastructure for Developing Partner Applications Presented by Laurent Garrigues, Gregg Le Blanc, Paul Kaiser

Upload: ngonguyet

Post on 29-Jun-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

OSIsoft Cloud Services

Core Infrastructure

for Developing

Partner Applications

Presented by

Laurent Garrigues, Gregg Le Blanc, Paul Kaiser

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Agenda

• Overview

• Platform Tour

• Demo

• Partner Preview Program

• Q&A

2

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

3

Integrate with

other

Cloud

Platforms

Make the PI

System more

serviceable

Offer Managed

Services for the

PI System

Deliver native,

complementary

Cloud Services

On Premises IaaS PaaS SaaS

Managed

by

OSIsoft

0%

100%

Cloud

Maturity

The Four Components of our

Cloud Strategy

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

IT Hardware Process Equipment Control Hardware Other Operational Data

• Facilities

• Logistics

Customer B

Site Ente

rprise

Customer C

Site Ente

rprise

Customer A

Site Ente

rprise

Business Partners Expertise Providers Service Providers

OSIsoft

Cloud Services

Cust. A Cust. B Cust. C

BP

BP

SP

SP

EP

EP

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

OSIsoft Cloud Services (OCS) Overview

• Managed, secure, data platform

– Multi-tenant

– PaaS & SaaS

• Built on Microsoft Azure

• High speed, scalable, data ingress

• Flexible, resilient, data storage

• Modern, secure APIs

• and more…

5

OSIsoft Cloud Services

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

An Infrastructure Approach…

Security

Authentication

Sign-up

Provisioning

Cloud Services Infrastructure

Logging

Telemetry

Scale out

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Data

Queuing Data Sharing

Broker

PI Cloud Connect

An Infrastructure Approach…

Cloud Services Infrastructure

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Cloud Connect

Ingress Storage Calculations < - - >

Extending The Platform…

Cloud Services Infrastructure

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Cloud Connect

Enable Partners & App Providers…

Cloud Services Infrastructure

Third Parties

Commercial Offerings

Partners Apps

Developer

Toolkit

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Ingress Storage Calculations < - - >

Let’s Explore these Services

Your OCS account

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Organizing data… Namespaces / Types / Streams / Events

11

Account: Annual Analytics

Namespace: Drilling Data Namespace: Meters

Type: Simple measurement

Stream: Platform 709-G

Stream: Platform 432-N

New event New event New event New event New event

Type Type

Type Type

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Ingress Overview

• RESTful ingress

• OSIsoft Message Format

– OMF v1.0

• High throughput

• Low maintenance

• See OMF Talk later today

• Distributed storage layer

– CRUD

– “Open Access”

• Almost any language

• Security based on WAAD

• Redundancy

• High fidelity

• Scalable & elastic

12

Storage Overview

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Ingress & Storage: How to Represent Data?

{ "temperature":"30.43", "timestamp":"2016-04-..." } { "pressure":"101.5", "timestamp":"2016-04-..." }

{ "heart-rate":"143", "timestamp":"2016-04-..." }

{ "latitude":"29.7817", "timestamp":"2016-04-..." } { "longitude":"-95.6112", "timestamp":"2016-04-..." } { "heading":"42", "timestamp":"2016-04-..." }

{ "latitude":"29.7817", "longitude":"-95.6112", "heading":"42", "heart-rate":"143", "temperature":"30.43", "pressure":"101.5", "timestamp":"2016-04-..." }

Individual sensors “Fitness band”

If you like… You might also enjoy…

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Data is organized around a primary index

Note that these can be “sparse” events…

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

OCS Data Storage is a (Time) Series Database

15

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Data Structure: Types – Simple Cases

16

Type: Simple Double

Timestamp: DateTime

Value: Double

Quality info: Boolean

Type: Simple Integer

Timestamp: DateTime

Value: Integer

Quality info: Boolean

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Data Structure: Types – Complex Cases

17

Type: Platform pressure

Timestamp: DateTime

Pressure: Double

Edited: DateTime?

Depth: Double

Area code: Integer

Quality info: String

Type: Batch measurement

Lot number: Integer

pH: Single

Tested: DateTime?

Color: String

Weight: Double

Quality info: String

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Stream: Platform 434-E

Type: Complex type

Name: Platform 432-N

Description: Fronts…

Tags: Drilling, EU,…

Indexes: Depth, Time…

Stream: Platform 709-G

Type: Complex type

Name: Platform 432-N

Description: Fronts…

Tags: Drilling, EU,…

Indexes: Depth, Time…

Data Storage: Streams (instances of a Type)

18

Type: Platform pressure

Timestamp: DateTime

Pressure: Double

Edited: DateTime?

Depth: Double

Area code: Integer

Quality info: String

Stream: Platform 432-N

Type: Platform pressure

Name: Platform 432-N

Description: Fronts…

Tags: Drilling, EU,…

Indexes: Depth, Time…

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Data Ingress: You have two choices

• OSIsoft Message Format (OMF)

– http://omf-docs.osisoft.com/

• Construct messages

– Type

– Container

– Data

• POST to Ingress endpoint

• Documentation:

– OCS Storage API

– https://cloud.osisoft.com/ documentation

• Construct:

– Type(s)

– Streams

• POST Data

– C# Libraries & Sample Code

– Sample Code for

• Python

• JavaScript

– Node.js & Angular

• Java

19

OCS Ingress Service OCS Storage API

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Data Ingress: OMF Type

• JSON structure

• Sent with headers:

– messagetype = type

– action = create

• Has:

– classification = dynamic

{

"id": "TankMeasurement",

"version": "1.0.0.0",

"type": "object",

"classification": "dynamic",

"properties": {

"Time": {

"format": "date-time",

"type": "string",

"isindex": true

},

"Pressure": {

"type": "number",

"name": "Tank Pressure",

"description": "Tank Pressure in Pa"

},

"Temperature": {

"type": "number",

"name": "Tank Temperature",

"description": "Tank Temperature in K"

}

}

20

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Data Ingress: OMF Container

• A “container” for OCS is a

“Stream”

• JSON structure

• Sent with headers:

– messagetype =

container

– action = create

[{

"id": "Tank1Measurements",

"typeid": "TankMeasurement",

"typeVersion": "1.0.0.0"

}, {

"id": "Tank2Measurements",

"typeid": "TankMeasurement",

"typeVersion": "1.0.0.0"

}]

21

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Data Ingress: OMF Data

• A “data message” for OCS

• JSON structure

• Sent with headers:

– messagetype = data

– action = create

{

"containerid": "Tank1Measurements",

"values": [{

"Time": "2017-01-11T22:23:23.430Z",

"Pressure": "12.0",

"Temperature": "100.1"

}, {

"Time": "2017-01-11T22:24:23.430Z",

"Pressure": "11.5",

"Temperature": "101.2"

}]

}, {

"containerid": "Tank2Measurements",

"values": [{

"Time": "2017-01-11T22:23:23.430Z",

"Pressure": "14.0",

"Temperature": "90.1"

}, {

"Time": "2017-01-11T22:24:23.430Z",

"Pressure": "15.1",

"Temperature": "91.2"

}]

}

22

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Data Ingress: Connecting the dots

• To use OCS Ingress

– Create a Publisher

Token

– Create a Topic

– Create a Subscription

• Choose OCS Storage

• Visit the OMF Talk later!

• To use the OCS API

– Create Client ID /

Secrets

– Code

23

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Using OCS Ingress for OMF Messages

• Name

• SAS Key

• Expiration

• URI for POST messages

Publisher 1 - n

Map Publisher(s) to a Topic

Topic

• Combine Topics*

• Choose OCS Storage

• Choose Namespace

Subscriber

24

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Data Ingress: Streaming data New event - New event -

New event - New event -

28

Stream: Platform 432-N

Type: Platform pressure

Name: Platform 432-N

Description: Fronts…

Tags: Drilling, EU,…

Indexes: Depth, Time…

New event

Timestamp: 24-Oct-2017…

Pressure: 134.0254

Edited: null

Depth: -256.12

Area code: 254

Quality info: Quest…

Stream: Platform 432-N

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Data Egress: Example Streaming Data

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

OSIsoft Cloud Services… What else?

30

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Ingress Storage Calculations < - - >

OCS and You… in the fullness of time

Your OCS account

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

A Lap Around OCS

in 10 Minutes

32

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Ingress Storage Calculations

The data you’ll se in OCS

Your OCS account

Contract

Based

Messages

Devices

PI System

Smart

Meters

Wind

Stuff

* App may not be that interesting

Interesting*

App

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Platform Tour

• https://cloud.osisoft.com

• Documentation

• Code samples

• Service status page

34

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

35

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

36

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

37

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

38

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Platform Tour

• Logging in

– You have a WAAD?

– We have a WAAD for you!

• Users / Roles

• Application keys

39

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

40

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

41

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

42

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

43

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

44

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Platform Tour

• Data storage

• Namespace

• Types

• Streams

45

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

46

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Platform Tour

• Data Ingress

• Publications

• Topics

• Subscriptions

• OMF

47

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Platform Tour

• API Console

48

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

49

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

50

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

51

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Demo

• GetWindowValues

• Trend vs. Trend

• Dashboard

52

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Checking out your data

53

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Trend 1 and Trend 2

54

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Extra Credit: Dashboards and data in Node-RED

55

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Series Indices – Getting the data you want

56

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

How the data type and query changes things

57

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Did we say Calculations?

58

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Using Calculations per Namespace in OCS

• Name

• Schedule

• Interval

• Stream Alias

Template(s) 1 - n

Write your Template-

relative JavaScript

Script(s)

• Deploy

• Start / Stop

• Unique scheduling

Calculation(s)

59

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Template

60

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Code

61

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Calculation Instantiation

62

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

OCS and You

• Ingress

– OMF

– Direct API Access

• Storage

– Time series and more!

– Complex Types

• Egress

– Flexible API

• Calculations

– Template-based

63

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

The OCS Partner Program

Preview

65

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Typical scenario

from devices

microservice

service activated/used

Asset Owner

Application Provider

Ingress

Calculations

Ad

min

istr

atio

n

Storage

REST A

PIs

Ingress

Calculations

Ad

min

istr

atio

n

Storage

REST A

PIs

Community

From / To

PI Systems

Custom App.

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Partner Preview Program – Overview

• Kick-off mid-November

– Gradual onboarding

• Requirements

– App./Solution concept

– Development resources

– Target market / customers

• Resources

– OCS account, developers, discussion forum

67

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

68

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Laurent Garrigues

[email protected]

SaaS Program Manager

OSIsoft, LLC Gregg Le Blanc [email protected]

Director, Applied Research Technology

OSIsoft, LLC Paul Kaiser [email protected]

Director, Cloud Services

OSIsoft, LLC

69

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

70

Questions

Please wait for the

microphone before asking

your questions

Please remember to…

Complete the Online Survey

for this session

State your

name & company

EMEA USERS CONFERENCE 2017 LONDON #OSISOFTUC ©2017 OSIsoft, LLC

Thank You

this.Dispose(true);