16
History Server & API Christopher Larrieu Jefferson Laboratory

History Server & API Christopher Larrieu Jefferson Laboratory

Embed Size (px)

Citation preview

Page 1: History Server & API Christopher Larrieu Jefferson Laboratory

History Server & API

Christopher Larrieu

Jefferson Laboratory

Page 2: History Server & API Christopher Larrieu Jefferson Laboratory

Goals

• Simple interface to archived data

• Efficient access to distributed data sources

• Useful data manipulation capabilities

• Portable integration with existing EPICS tools

Page 3: History Server & API Christopher Larrieu Jefferson Laboratory

CADataStore: abstract interface to read CA data from file, db, etc.• archive

– Provides channel listing, creates data range objects

• range– Describes data for one channel on time range

• channel_state– Complete information for one channel associated with

one point in time.

• range_iterator– Access sequential channel states by updating

channel_state

Page 4: History Server & API Christopher Larrieu Jefferson Laboratory

Server Specialization

• Server accesses CA archive via CADataStore object• Different derived classes for different archives

– LANL_DataStore wraps around Kay’s archive API– JLAB_DataStore wraps around JLAB archive API– RDB_DataStore ?– *_DataStore

• Derived classes compiled as shared object code, loaded at run-time.– Narrow interface eases specialization, but captures

essential functionality.

Page 5: History Server & API Christopher Larrieu Jefferson Laboratory

Server Schematic

LANL_DataStore

Channel Archiver API

History ServerHistory

DataClient

Page 6: History Server & API Christopher Larrieu Jefferson Laboratory

Server Components

• Data access plug-in (derived from CADataStore)

• Exported network interface– Archive description (name, acquisition mode,

etc.)– Data manipulation (transform library)– Data production (data stream, iterator)

• Network communication component

Page 7: History Server & API Christopher Larrieu Jefferson Laboratory

Client Components

• Consumer code (e.g. data mining, visualization)

• Library API– Directory Services– Data manipulation (transform library)– Data consumption (stream from server)

• Network communication component

Page 8: History Server & API Christopher Larrieu Jefferson Laboratory

DataStoreDirectory

• Provides hierarchical structure to signal names

• Enumerates registered history servers– Name– Location– Data quality

• Maps signal names to history servers

Page 9: History Server & API Christopher Larrieu Jefferson Laboratory

DataSequence

• Describes a stream of sequenced data• Every element contains

– Indexing attribute (scalar, numeric) (e.g. time)– Primary attribute (e.g. value)– Ancillary attributes (e.g. status, severity, units)– Attribute dependencies (e.g. alarm depends upon value)

• Elements are iterated over via the indexing attribute, and return primary attribute as default value.

Page 10: History Server & API Christopher Larrieu Jefferson Laboratory

DataTransform

• Reads input sequence, generates output sequence.

• Generic transforms operate upon primary attribute.

• Specialized transforms operate on known attributes.

Page 11: History Server & API Christopher Larrieu Jefferson Laboratory

Example 1: Binning Transform

• Parameters: bin width

• Input: (index,value) pairs (e.g. time, value)– All other attributes discarded

• Output: (count, mean, variance, min, max) tuples, indexed by bin number, with mean as primary attribute.

Page 12: History Server & API Christopher Larrieu Jefferson Laboratory

Example 2: Discrete Fourier Transform

• Input (index, value) pairs (e.g. time, value)– All other attributes discarded

• Output (frequency, amplitude) pairs, index by frequency, with amplitude as primary attribute.

Page 13: History Server & API Christopher Larrieu Jefferson Laboratory

Standard Transforms

• Binning• Interpolating• Decimating• DFT, IDFT• Digital Filter• Averaging• Rasterizing• Attribute Mapping• Attribute Filtering

Page 14: History Server & API Christopher Larrieu Jefferson Laboratory

Network Communication

• CORBA– Transparent binary compatibility

– Easy communication between distributed objects

– Integrate with other CORBA-enabled tools

• MICO– open source implementation

– branded CORBA 2.3 compliant by OMG

– Portable: Unix (hp-ux, linux, solaris, aix, etc.), Win32

– C++, Java bindings

Page 15: History Server & API Christopher Larrieu Jefferson Laboratory

Uses in EPICS

• Portable CA Server interface can supply history data to ca clients (e.g. medm) .

• Adaptor library supporting Kay’s API: current applications become network capable.

• New applications: java tools, etc.

Page 16: History Server & API Christopher Larrieu Jefferson Laboratory

Intended Use at JLAB

• StripTool history plug-in

• Replacement for current XARR interface

• Operator / user scripting.

• DARTH (vaporous data-mining tool)