ocs for developers - osisoft
TRANSCRIPT
#PIWorld ©2019 OSIsoft, LLC
OCS for Developers
1
Chad Chisholm, Engineering Program Manager
Gregg Leblanc, VP of Product
Laurent Garrigues, Sr. Strategic Product Manager
#PIWorld ©2019 OSIsoft, LLC
#PIWorld ©2019 OSIsoft, LLC
Talking Points & Demos
• Sign in & Authentication
• PItoOCS Connections
• SDS Types & Streams
• SDS Storage Explorer
• OMF Connections
• OMF Message validation
• API Console
2
• Secondary indexes
• UOMs
• SDS Streams metadata & tags
• Access Controls
• Client Libraries
• Hyperscale demo
• Q&A
#PIWorld ©2019 OSIsoft, LLC
#PIWorld ©2019 OSIsoft, LLC
3
OSIsoft Cloud Services Features
• Managed, secure, multi-tenant data platform
• Operated & maintained by
• High speed, scalable, elastic data ingress
• Flexible, resilient, data storage
• Modern, secure REST APIs
• Built and deployed on
cloud.osisoft.com
#PIWorld ©2019 OSIsoft, LLC
#PIWorld ©2019 OSIsoft, LLC
4
OCS Components
OSIsoft Messaging Format
OMF
Applications
Open
Source
Edge Data
Store
PI
Connectors
PI
Systems
Native
Ingress A
dm
inis
tratio
n
Sharing
Seq. Data Store REST A
PIs
Visualiz. Context
Data Views - Python
- C#
- Java
- NodeJS
- Angular
- OAuth
- Users
- Roles
- ACLs
- Logs
#PIWorld ©2019 OSIsoft, LLC
5 5
Sign In & Authentication
• Identity Providers
• Sign in the OCS Customer Portal
• Users management
#PIWorld ©2019 OSIsoft, LLC
OCS Authentication
6
cloud.osisoft.com
Account A Account A
Account A Account B
Account A . . .
Account A Account Z
Customer
choice
Identity Providers
. . . Cu
sto
mer
Ch
oic
e(s
)
#PIWorld ©2019 OSIsoft, LLC
7 7
PI to OCS
• Overview
• Deployment
#PIWorld ©2019 OSIsoft, LLC
OCS Account
PI Server PI Server PI Server PI Server
Namespaces . . .
PI OCS
Agent
PI OCS
Agent
PI OCS
Agent
PI OCS
Agent
Sequential Data Store
PI System Connections
#PIWorld ©2019 OSIsoft, LLC
9 9
SDS Types & Streams
• Simple Types
• Complex types
#PIWorld ©2019 OSIsoft, LLC
Seq. Data Store
Sequential Data Store - SDS
REST A
PIs
Type(s) Stream(s)
Timestamp
Pressure
Depth
Latitude
Quality Information
Speed
Longitude
Timestamp
Pressure
Depth
Latitude
Quality Information
Speed
Longitude
Timestamp
Pressure
Depth
Latitude
Quality Information
Speed
Longitude
Timestamp
Pressure
Depth
Latitude
Quality Information
Speed
Longitude
Pro
pert
ies
Pro
pert
ies
Namespace
#PIWorld ©2019 OSIsoft, LLC
Complex and Non-Time Index Data Type Example
11
Simple Data Type Indexed by Time
{“Latitude”: “29.7817”,
“Timestamp”: “2017-12-01”}
{“Longitude”: “-95.6112”,
“Timestamp”: “2017-12-01”}
{“Heading”; “42” ,
“Timestamp”: “2017-12-01”}
{“Heart-rate”: “143”,
“timestamp”: “2017-12-01”}
{“Temperature”: “98.6”,
“Timestamp”: “2017-12-01”}
{“StepCount”: “10,000”,
“Timestamp”: “2017-12-01”}
Complex Data Type Indexed by Time &
StepCount
{“Latitude”: “29.7817”,
“Longitude”: “-95.6112”,
“Heading”; “42” ,
“Heart-rate”: “143”,
“Temperature”: “98.6”,
“Timestamp”: “2017-12-01”,
“StepCount”: “10,000”}
#PIWorld ©2019 OSIsoft, LLC
12
Simple Type Timestamp
Quality bit
Depth
Timestamp
Quality bit
Pressure
Timestamp
Quality bit
Speed
Timestamp
Pressure
Depth
Quality Information
Speed
Complex Type Lot #
Density
Ph
Color
Date
Timestamp
Amperage
Voltage
Status
Power
… … …
Pla
tfo
rm P
res
su
re
Ba
tch
Me
as
ure
men
t
…
#PIWorld ©2019 OSIsoft, LLC
13 13
SDS Storage Explorer
• Type designer
• Stream creation
• Access Control
• Data retrieval
#PIWorld ©2019 OSIsoft, LLC
14 14
OMF Connections
• Create a new connection
• Get Client ID & Client Secret
• OMF Message validation
• OMF Explorer
#PIWorld ©2019 OSIsoft, LLC
Ingress
OMF Ingress
Client ID Subscribers Topics
1001010010100010100101000101010101000101010101
1001010010100010100101000101001
15
#PIWorld ©2019 OSIsoft, LLC
16 16
API Console – Basics
• Creating a stream
• Writing data to the stream
• Querying stream data
#PIWorld ©2019 OSIsoft, LLC
17 17
API Console – Advanced
• Secondary indexes
• UoM conversion
• TableH Output Format
#PIWorld ©2019 OSIsoft, LLC
18
Using Data via Jupyter
#PIWorld ©2019 OSIsoft, LLC
19
Selecting Data via Jupyter
#PIWorld ©2019 OSIsoft, LLC
20
Using Pandas, OCS, and then plotting…
#PIWorld ©2019 OSIsoft, LLC
21
#PIWorld ©2019 OSIsoft, LLC
22
Selecting via multiple indices
#PIWorld ©2019 OSIsoft, LLC
23 23
SDS Streams – Metadata
• PI to OCS generated metadata
• Create metadata
• Find streams by metadata
• area:sltc1
• tags:environmental
• query=pointid:1
#PIWorld ©2019 OSIsoft, LLC
24 24
Autorization – Access Control
• Identities
• Roles
• ACLs
• Namespaces
• SDS Types
• SDS Streams
#PIWorld ©2019 OSIsoft, LLC
OCS Authorization
25
cloud.osisoft.com
Customer
choice
Roles:
Engineer,
Display-Creator
Access Control:
Engineer : Read,
Admin: Full
GET https://.../data
#PIWorld ©2019 OSIsoft, LLC
26 26
Code Samples
• Client Libraries
• Nuget.org
• Console App
#PIWorld ©2019 OSIsoft, LLC
27 27
Hyperscale OCS Cluster
#PIWorld ©2019 OSIsoft, LLC
Smart Small…
OCS Scale Out*
11
* We’re pretty sure this is how it works…
#PIWorld ©2019 OSIsoft, LLC
Get Bigger…
#PIWorld ©2019 OSIsoft, LLC
Monitoring the Cluster…
#PIWorld ©2019 OSIsoft, LLC
Data
• ~2 Billion equivalent PI Tags
• ~100M AMI Meters
• 20 properties each
• ~64M events/sec ingress
• Trillions of events stored
OCS Cluster
• 477 nodes
• 3132 Cores
• 11TB of RAM
Some Numbers…
#PIWorld ©2019 OSIsoft, LLC
32
Questions?
Please wait for
the microphone
State your
name & company
Please remember
DOWNLOAD THE MOBILE APP
#PIWorld ©2019 OSIsoft, LLC
33