Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman...

29
Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University 2 SUNY Binghamton

Transcript of Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman...

Page 1: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

Instruments and Sensors as Grid Services

Donald F. (Rick) McMullen1

Kenneth Chiu2

John C. Huffman1

Kia Huffman1

Randall Bramley1

1Indiana University2SUNY Binghamton

Page 2: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

2

Motivations

• Instruments and sensors are not well integrated into grids

• Data is acquired, processed and stored before it “hits the grid”.

• Need methodology for interacting with instruments and sensors in real time from grid applications

• Some abstraction of sensor and instrument functionality is needed to make grid applications that use them more robust and flexible.

Page 3: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

3

Goals

• Integrate instruments and sensors (e.g. real-time data sources) into a Grid computing environment with Grid services interfaces.

• Abstract instrument capabilities and functions to reduce data acquisition and analysis applications’ dependence on specialized knowledge about particular instruments.

• Move production of metadata as close to instruments as possible and facilitate the automatic production of metadata.

• Develop a standard, reusable methodology for “grid enabling” instruments.

• Collaborate with scientists in academia and industry in a broad range of disciplines who either develop instruments or whose work depends on the details of using them.

Page 4: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

4

Increasing number of sensors

Increasingbandwidth per sensor

Increasing real-time application

X-Ray Crystallography

Electron Microscope

Radio Telescope

Ground motion sensor array

Traffic sensors

Wireless ‘mote’sensor network

• Simple 2-D analysis of instrument taxonomy• At lease five dimensions identified in more detailed analysis• Project must address enough points (classes) to assure breadth of applicability

Page 5: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

5

Initial Applications• High brilliance X-ray crystallography

– Large instrument application– Deeply integrated into bio and medical discovery research methodology– Mature analysis software and large user community

• Robotic telescopes– Small numbers of sensors: CCD, environmental; some control aspects:

filters, aiming, dome.– Global coordination needed for scheduling– Aggregation of disparate sensors into a “composite”

instrument• Small sensors

– Minimal memory and CPU– Wireless connectivity– Developing parallel project to use ad hoc/swarm networks for data

collection for real-time simulation and prediction– Updating of data flows in response to sensor/network reconfiguration.

Page 6: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

6

CIMA implementation targets

MICA Mote wireless sensor/controller board

PC104 industrialcontroller board

Synchrotron beamline

(APS/ALS)

Large scientific instruments

Embedded sensorsand controllers

verylarge

systems,few

elements

verysmall

systems,many

elements

Page 7: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

7

MMSF Automated Telescope

• Typical remote access automated observatory

• System has 33 distinct “sensors”, 12 controllers– Open/close of roof based on a

Polaris transparency monitor and rain detector – simple grid of wires detecting rain drops

– Telescope direction and dome control

– Filter selection and telescope focus

– Liquid nitrogen fills of the CCD dewar jars ….

Page 8: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

8

MMSF Observatory Features

• Instruments producing data without units– Temperature, humidity cutoffs determined empirically

as resistances, not degrees or %

• Hierarchical and co-located instruments– Single platform holds three instruments, so orienting

one changes orientation of all

• Updates to equipment occurs frequently• Data transferred via 28k modem line –

middleware needs to work locally, directly between instruments and sensors

Page 9: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

9

Observatory Data Architecture• Control Data

– object control – instrument control

• Object Data (i.e., object of scientific interest)– Full spectrum from raw unitless data to derived data

artifacts• Instrument package

– system package data (multiple attributes output)– system sensor data (single attribute output)– nonsystem sensor data (weather data from NOAA)– calibration data– access protocols

Page 10: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

10

X-Ray Crystallography

InstrumentServices

PortalInstrumentManager

DataArchive

WAN LAN

LAN

Non-grid service

Grid service

Persistent

Non-persistent

Proxy Box

Page 11: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

11

LTER

• Automatic updating of flows• Provenance• SOAP/ARTS (Antelope Real-Time System)

Data-logger

QAAgent

Env.Agent

QAAgent

Oracle

WebServer

WebBrowser

Config. Event (CIMA)

Other Connection

Trout Lake Station

University ofWisconsin Campus

Buoy

ORB

ARTS Connection

Sensors

Env. Event (CIMA)

JDBC/ODBC Connection

WebBrowser

Config.Agent

Config.Agent

Config.Agent

Config.Agent

1

2

3

3

4

Other Locations

Page 12: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

12

Further applications currently being explored

Robotic telescopes- Bradford robotic telescope, Oxenhope observatory,Faulkes telescope project

Electron Microscopy-U. Queensland EM group – regional scale, multiple instruments - KISTI 2nd largest EM (after Osaka)

Industrial monitoring and control, e.g. Train axles- Ore trains – Km long, derailment is very expensive to fix- Temperature sensors on axles monitor bearing status, anticipate wheel failure

Environmental monitoring- Water use- contaminants

Page 13: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

13

Architecture

Page 14: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

14

Common Instrument Middleware Architecture (CIMA) Elements

• Schema for instrument functionality (and ontology for schema attributes);

• Data model for representing instrument metrics and calibration;• A small, high performance, embeddable Web Services stack, initially in

Java, including Proteus support for multi-protocol, multimodal transport;

• Service implementation for accessing the instrument’s functionality and metrics via the Proteus-mediated interface;– Ability to dynamically insert new protocols into running instances

• OGSA and WS-RF compliant functions to register with a location service, authenticate users, provide access control to instrument controls and data, send and receive events, and co-schedule the instrument into a Grid computing and storage context.

Page 15: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

15

Overview

Physical Network Transport

Data Pipeline

AcquisitionComponent

AcquisitionCode

InstrumentAccess

AnalysisComponent

AnalysisCode

InstrumentAccess

CurationComponent

CurationCode

InstrumentAccess

Instrument

Sensor 1

Controller

Sensor 2

InstrumentPresentation

Scientist

InstrumentAccess

RemoteAccess

GUI

Device-Independent Application Module

Device-Dependent Virtualization Module

Shared Implementation

Page 16: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

16

InstrumentHardware

Controller

ServiceImplementation

InstrumentAccess

InstrumentPresentation

OGSI

Proteus

SOAPBinaryFormat

TCP/IPOther Network

Protocols

Instrument-Specific CIMA

Instrument-Independent CIMA

Existing Instrument Code

Page 17: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

17

Example CIMA minimal knowledge bootstrap procedure

Application CIMA instrument

“send description”

“RDF description”

Proteus/SOAP calls

Application parses description for ports to

read for calibration and voltage

“read calibration port”

“calibration”

“read thermocouple port”

“thermocouple voltage”

Service Implementation (SI) returnsdescription of itself and instrument

SI returnsstored calibration

SI calls controller function to read and return voltage

Application reads thermocouple voltage

then computes and displays a

temperature

Globus init, user authentication, and instrument lookup

Page 18: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

18

Instrument

Services• Instrument

– get– set

• Sensor– get– set

• ChannelSource– get– set– register

• ChannelSink– receive– get– set

Sensor

ChannelSource

ChannelSource

Sensor

SensorChannelSource

ChannelSource

ChannelSink

Page 19: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

19

Parcels

• Wish to unify our data models, etc.• Toolkit must be application-independent as

much as possible.• Attributes

– Type (string)– Globally unique ID (string)– Encoding

• CDATA, Binary, ASCII, Base64– Location

• Inline, URL, Other

• Parcel Sets– Special data used for connectivity information.

Page 20: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

20

Technologies

Page 21: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

21

Technologies

• Web services– XML, SOAP, WSDL, binary XML

• Grid services– OGSA/OGSI, WS-RF, DAIS

• Axis C++ gSOAP

• Proteus (SC 2002)

• XBS (HPC 2004)

• Schema-specific parsing

Page 22: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

22

Proteus Motivation

• Web Services for scientific computing– SOAP performs well as a lingua franca

• But suffers from performance problems for scientific data

– Solution: establish initial communication with SOAP, and then switch to a faster protocol.

• Grid intermediaries

Page 23: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

23

Proteus Overview

• Provides multiprotocol RMI system to applications– Can wrap existing protocol implementations with dynamic

invocation

• Facilitates use of SOAP as common language– Switch to faster protocols if supported by both sides.

• Mediates between protocol providers and applications– Applications use Proteus client API– Providers use Proteus provider API

• Allows a new provider to be added (at run-time) without changing application

• Generic serialization/deserialization allows marshalling code to be reused for multiple protocols

Page 24: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

24

Multiprotocol

Network

Proteus

Client

ProviderA

ProviderB

Proteus

Client

ProviderA

ProviderB

Protocol A

Protocol B

Process 1 Process 2

Page 25: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

25

Proteus

Protocol A Provider

Application

Protocol B Provider

Proteus APIs

Client API

Provider API

Page 26: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

26

Schema-Specific Parsing

• XML processing stages (conceptual)– Well-formedness

• Lexical and syntactic, defined by core XML specification.

– Validity• Conformance to a schema, mainly structural

– Application

Page 27: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

27

Merging Stages

Application

Validation

Well-formedness

Application

Validation

Well-formedness

Application

Validation

Well-formedness

User written

Merged

Fully articulated Implicitly validated Schema-specific parsing

Page 28: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

28

Compiler-Based Approach

• Front-end parses schema into intermediate representation.

• Back-end generates code from intermediate representation.

• Intermediate representation is a generalized automata.

XMLSchema

IR

RELAXNG

C (fast)

C(low-pow)

Java

Page 29: Instruments and Sensors as Grid Services Donald F. (Rick) McMullen 1 Kenneth Chiu 2 John C. Huffman 1 Kia Huffman 1 Randall Bramley 1 1 Indiana University.

29

Summary

• Create standards for accessing broad spectrum instruments and sensors.

• Incompatible components should still have some base level of interoperability.