1 / 13

Accelerator Integrated Data Access

Accelerator Integrated Data Access. Software Framework, APIs Status and Further Work. Stanford Linear Accelerator Center George McIntyre, Greg White, Robert Sass, Ron MacKenzie, Judy Rock, Jingchen Zhou July 20th 2002. Design requirements. AIDA Architecture. AIDA Network. Client. Server.

chaz
Download Presentation

Accelerator Integrated Data Access

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Accelerator Integrated Data Access Software Framework, APIs Status and Further Work Stanford Linear Accelerator Center George McIntyre, Greg White, Robert Sass, Ron MacKenzie, Judy Rock, Jingchen Zhou July 20th 2002

  2. Design requirements AIDA Architecture AIDA Network Client Server AIDA Directory Service AIDA Data Provider AIDA (Da API) AIDA DA Service Devices

  3. AIDA Architecture • Directory Service is the key • Location found by URL in “slaconly” • All AIDA participants Bootstrap by finding the Directory Service first • Services register with the Directory service when they come on line as authorised handlers of a named set of service requests for a particular group(s) of clients • The Directory service can now respond correctly to all clients in the relevant group (including DA) with this service’s interface

  4. AIDA Architecture • Clients can call a service via the DA • Can ask the DA to parse and compile queries as well as reconstitution of results • Clients can call the Service directly • Clients can parse and compile a target reference so that • It is validated for correctness and its structure is determined • All service references are resolved so that data access can be ultra rapid

  5. AIDA Vision Directory Service Schema Client Client Server DA 1 AIDA Data Provider AIDA (Da API) Devices 2 1 Simple transform of query for immediate target DP DP DS 3 2. Query is translated into a new query for the intermediate service provider 3 3. The query is sent from this service provider along the chain(s) to the eventual DPs who each have their own specific message

  6. Directory Service Schema • Name//attribute • Can map to one or more service chain • Transformation syntax • Based on regex and • Takes chains of sed like arguments • Different transforms for each servers may be specified • Data Provider is called in series "chained" -

  7. Directory Service Schema • Maps a flat EPICS name space to a structured name space. • Eg Attribute VAL.HIST or MODEL.TWISS.X.BETA • VAL references the EPICS data provider. • VAL.HIST references the Archiver data provider • MODEL.* gets from MODEL data provider • Visibility of Data Providers and AIDA Servers based on Group • Production • Development • New servers • Meta Data • Optional type and length • If not supplied they need to be discovered by the data provider (e.g. history must discover length), but for instance the slc database data provider must be given the length in order to make an acquisition.

  8. AIDA Query Syntax – Java Examples package test.java; import java.util.*; // The following libraries must me imported for all AIDA clients // da defines objects used in AIDA clients // util defines common objects available thoughout the AIDA system import edu.stanford.slac.aida.lib.da.*; import edu.stanford.slac.aida.lib.util.common.*; import edu.stanford.slac.aida.lib.util.except.*;

  9. AIDA Query Syntax – Java Examples class Tests { private DaObject da; // Data Access object public Tests (String [] args) { try { da = new DaObject(args); // Initialise AIDA for this appl. } catch ( Exception e ) { System.err.println( e.getMessage() ); e.printStackTrace(); } }

  10. Call by reference – simple type private void simpleTest01() { try { // Create a reference to an Accelerator value DaReference r = new DaReference("QUAD:LI05:901//BCON", da); // Set the type for the simple get operation (if unknown after compile in previous line) r.setType(DaValue.Type.FLOAT); Float v = (Float)da.get(r); // Get data using the reference, may be reused } catch (Exception e) { // Do something; } return }

  11. History with context using the DaObject private void simpleTest02() { try { da.setParam("STARTTIME", "2001-09-06 12:04"); da.setParam("ENDTIME", "2001-09-06 12:10"); DaValue v = da.getDaValue("HB60:DCCT:SUMY//VAL.HIST"); } catch (Exception e) { // Do something; } return }

  12. Parametric, constrained, complex query private void simpleTest03() { try { da.setParam("ENDTIME=2001-09-06 12:10;STARTTIME=2001-09-06 12:04"); query = "val={HB60:DCCT:SUMY//VAL}"; query+= ",history={HB60:DCCT:SUMY//VAL.HIST[(#LENGTH-4)-]}"; DaValue v = da.getDaValue(target); } catch (Exception e) { // Do something; } return }

More Related