170 likes | 331 Views
AIDA Oracle Data Provider Prototype. A Simple, Robust, API to Oracle Greg White, 11-June-2008. What are we talking about. Gets data from Oracle like this:. Code like this in a client:. ACCL:IN20:300:L0A_A EPICS ACCL:IN20:300:L0A_P EPICS ACCL:IN20:400:L0B_A EPICS
E N D
AIDA Oracle Data Provider Prototype A Simple, Robust, API to Oracle Greg White, 11-June-2008
What are we talking about Gets data from Oracle like this: Code like this in a client: ACCL:IN20:300:L0A_A EPICS ACCL:IN20:300:L0A_P EPICS ACCL:IN20:400:L0B_A EPICS ACCL:IN20:400:L0B_P EPICS ACCL:LI21:180:L1X_A EPICS ACCL:LI21:180:L1X_P EPICS ACCL:LI21:1:L1S_A EPICS ACCL:LI21:1:L1S_P EPICS BLEN:LI21:265:ARAW EPICS BLEN:LI21:265:BRAW EPICS BLEN:LI21:280:ARAW EPICS … …
Accelerator Independent Data Access Clients in production • SCORE • Bunch Length Measurement • LEM LIte • bc2_energy_feedback.m • bpms_vs_z_gui.m • control_klysStatGet.m • control_klysStatSet.m • control_phaseGet.m • control_phaseSet.m • delta_klys_devices.m • example_bpms.m • example_magnet.m • example_trycatch.m • get_archive.m • JitterGui.m • KLYS_SBST_phase_scan.m • L23_set_phase.m • lcls_comp.m • meas_dispersion_gui.m • model_magnetSet.m • model_phaseSet.m • model_rMatGet.m • model_twissGet.m • orbit_correction.m • orbitDemo.m • or_meas.m • phase_control.m • Phase_Scans.m • plotHistory.m • PlotMaster.m • plotOrbitDemo.m • quad_align.m • RF_status.m • watcher.m • xy_traj_fit_setup.m • control_klysStatGet.m • control_klysStatSet • Feedback • BSA API • Model checks • control_phaseGet.m • control_phaseSet.m • corrPlot_gui.m • emittance_gui.m • emittance_process.m • laser_cathodeAlign.m • magnet_plotter.m • matching.m • meas_dispersion_gui.m • model_k1Get.m • model_magnetSet.m • model_nameConvert.m • model_phaseSet.m • model_rMatElement.m • model_rMatGet.m • model_sigma2Twiss.m • model_sigmaTrans.m • model_twiss2Sigma.m • model_twissGet.m • model_twissPhase.m • model_twissTrans.m • orbit_correction.m • or_meas.m • profmon_activate.m • profmon_gui.m • profmon_imgPlot.m • profmon_multi_gui.m • quad_align.m • tcav_gui.m • util_appPrintLog.m • wirescan_fitOrbit.m • wirescan_gui.m • aidaGetHistory.m
Aida Directory Service Gets data from Oracle like this: Code like this in a client: Aida Directory Service DB (in APEX) ACCL:IN20:300:L0A_A EPICS ACCL:IN20:300:L0A_P EPICS ACCL:IN20:400:L0B_A EPICS ACCL:IN20:400:L0B_P EPICS ACCL:LI21:180:L1X_A EPICS ACCL:LI21:180:L1X_P EPICS ACCL:LI21:1:L1S_A EPICS ACCL:LI21:1:L1S_P EPICS BLEN:LI21:265:ARAW EPICS BLEN:LI21:265:BRAW EPICS BLEN:LI21:280:ARAW EPICS … … Irmis, LCLS_infrastructure etc
Use CasesBASCIALLY, ALL EPICS META-DATA and NON-EPICS CONTROL DATA • BSA Names • e.g. get “root names” of all BSA Devices • All Static device data • e.g. Z position, magnet gamma, Keff etc. • All Model data in the db • e.g. MAD design, XAL model data server etc. • Secret Decoder Ring • Physics Name <-> EPICS Name <-> SLC Name
Why not inline SQL & JDBC? • Schema is independent of Code! • Code Model is independent of Data Access API Therefore: • 1 & 2 enable centrally managed schema, queries, APIs • Enables DB group to change the schema without affecting code • Enables DB group to change the query without affecting code • Enables DB group to change/optimize query API (in-line SQL / SQL script / stored procedure / compiled query) without affecting code.
Why AIDA? • AIDA’s Database Access code is robust • JDBC is easy, but hard to do RIGHT. • Fixes Oracle thin client stale bug. • AIDA’s Database Access can be optimized • Central management of schema and queries, right in the database the DB group already knows
Performance Major Components of Performance Fixed: • Host machine speed • Transport protocol speed (IIOP = ~2 ms) • Data object serialization/deserialization ( Aida’s DaValue = ~2 - 8 ms, depends on VM warmup) • Oracle baseline (SLACPROD, SQL, irmisdb) Sum for AIDA RDB < ~40 ms for LCLS//BSAnames (mccas0, compiled DaReference) Variable and optimizations: • Data Size • Oracle schema/query interaction (indexing etc) • Oracle query API (inline SQL > stored procedure > compiled query) • JVM/codepath warmup, Oracle caching.
Performance II: AIDA (a + b + c) Simple, using DaValue Direct to server using DaReference
Performance III (c + d) Performance Demo
Tools add_IAT.sql Adds a new name and transform remove_IA.sql Removes a name (and transform) update_IAT.sql Updates the transform of a name
Next Steps • Requirements! • Of Aida’s DpRdb server: • Performance. • Query argument substitution? • APIs? (SQL, compiled query, stored procedure, external SQL?) • Of Name Database: • Which names? Naming Scheme? Query APIs? • Database requirements themselves! • Identify Roles for Names and Query maintenance. • Education. Tools for Directory DB management. • Standardize names. Encapsulate machine topology.