Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Objective
  2. Desktop
  3. Basic Modelling Environment
  4. Architecture
  5. Applications
  6. Error Handling, Logging and Viewing
  7. Tool Summary
  8. Red Flags
  9. Required Additions to SLC Control System
  10. Required Solutions
  11. Job List
  12. Questions
  13. R&D
  14. DetailsError Handling, Logging and Viewing
  15. Glossary
  16. References

Anchor
obj
obj

...

Package

Implementation

Fast Feedback

Dealt with elsewhere

Configuration Control

Data Archiver

Exists in SLC for SLC devices ("History"). Data archiver for EPICS in LCLS is under discussion. Paul Chu reports that EPICS archiver itself considered too slow, so SNS use PVLogger. AIDA can presently acquire both SLC and EPICS Archiver data. Propose: when LCLS EPICS archiver is decided, write AIDA server, and implement additions to browser so both sources can be accessed via AIDA

Error Logging

See Error Handling, Logging and Viewing below

Watchdog

Anchor
toolsehtools

TOOL SUMMARY

This section summarises utilities that will be used to develop LCLS applications.

Tool

Function

x86 Linux RH, KDE/GTK-2 window system

(Native) Desktop O/S for applications. Note, Windows is NOT listed. As described in the architecture Windows clients will go through X11 See X11. x86 and GTK-2 specification is important so performance can be tuned.

Matlab

Ad-hoc analysis: acquiring data through aida, jca and XAL, performing computation and implementing results. Acquire hist data through Aida.
Physics Applications: apps may be implemented directly in Matlab using above tools, plus Accelerator Toolkit (AT) #inv_AT.

XAL

1) Modelling components (tracking); 2) OO device control, 3) Application framework, 4) Existing XAL applications.

Eclipse RPC

Integrated application launching. Rich Client Platform (RPC) for integrated applications shared with "EPICS Office" and gumtree.

Eclipse SWT/Jface

High performance Interactive Applications

XAL (JCA), AIDA (CORBA), JCA/CAJ

Data Interoperability. Getting and setting device data. Aida can also get history and model data to unix apps from the SLC control system.

Jcmlog, cmlog, Err

Error handling, logging and browsing. See error handling.

Cvs, make

Source repository and building. Distribution by simple "install" to an AFS or mounted NFS directory. See Filesystem. Note not ANT (question)

Oracle

Enterprise RDB. Stores the XAL geometry, and in architecture described here also the optics. Applications acquire optics from the db rather by tracking an XAL lattice at runtime.

OC4J or Jboss or Apache jakarta

Choose an Application Server. We're making heavy use of Oracle and XML, so displays based on contents of those datasources will go through an App server (AS). Pick one.

Java

Programming Language

Linux, Solaris

Server Hosts O/S

NFS

Production Host Filesystem? See Filesystem

AFS

Development Host Filesystem

Integrated Development Environments

Not a good idea to prescribe these for everyone. Three good open source choices for our technology stack are emacs+jdee, Netbeans (including matisse) and the Eclipse IDE. All three include CVS integration.

...

RED FLAGS

Some important choices or questions.

SLC CAMAC Magnet control and SLC BPM data acquisition by XAL Applications. The SLC CA server does not presently support "set" operations, so there is not presently a way for XAL applications, which use EPICS Ca through JCA, to change the value of CAMAC magents. Possible solutions are to add set to SLC CA, or to change XAL applications to use AIDA, or to accept that XAL applications can not control SLC CAMAC magnets - how bad is that (question). SLC BPM acquisition through JCA should also be verified, since the SLC BPM acqusition is oriented toward acquisitions of whole beamines.

...

XAL Modelled acceleration and solenoid. XAL does not model acceleration nor solenoid field

Archiver. Which one?

XAL file generation directly from Oracle. Is there a mechanism to flag items in the oracle db for inclusion in the lattice? Danger is people will edit the Oracle db to say move an item to a new z location or include a dummy bpm, and the lattice will change.

...

REQUIRED ADDITIONS TO SLC CONTROL SYSTEM

An LCLS model beamline, associated sectors and db additions in support of it, must be added.

SCP runtime problems on Linux fixed. At time of writing this includes a problem with dialog inputs, data has to be entered twice.

Pulse-id acquisition by Correlation Plots. Presently broken needs to be fixed.

...

REQUIRED SOLUTIONS

This section lists functional components of the LCLS modeling applications architecture which for which we need to decide on a vendor:

  1. Numerical Analysis package, for matrix manipulation and linear algebra. Some classes of XAL extend JAMA 4, this may be sufficient.
  2. J2EE compliant Application Server. Application Servers include technology for accessing databases (eg oracle) and displaying information to the web. This will be useful for displaying static control data, model information and other slow control configs etc, to the web and to the Integrated Control Program. Suggest Apache Jakarta, plus PHP, Xerces, Xalan, etc.

...

JOB LIST

Lists some jobs that might otherwise be forgotten.

  1. SQL script and other munging to get from Oracle db description of geometry and devices to a lattice description in an XAL input file.
  2. The XAL tracker. An XAL application which tracks the lattice and produces a 2nd XAL file containing the twiss parameters for each device, plus other per-element parameters.
  3. Add acceleration and solenoid elements to XAL.
  4. Check XAL's linear algebra support. Done: it uses JAMA -see ref.
  5. Create a Skills Matrix for applications, eg, XML and associated technologies (DOM, XSL etc), Oracle and associated technologies (SQL, PHP, persistence).

...

QUESTIONS

...

eh

ERROR HANDLING, LOGGING AND VIEWING

A programmer spends half their time handling errors, so making that as easy as possible is a productivity priority. For LCLS we will use the following technology stack:

Err package (see http://www.slac.stanford.edu/grp/cd/soft/err/Image Added) makes the process of rigorously handling errors easy. It allows a programmer to define an error code in a structured, recorded global way; and to use that code to issue errors and associated diagnostics from or linux, solaris, windows platforms in either java or C/C++, and issue them directly to CMLOG (or some other message logger). It includes support for exception chaining ("caused-by") and exception translation, so the end user can see what systematic thing caused their functional problem (E.g. of a error logged by Err in cmlog might be "UnableToTrackBeamlineException: LCLS ; caused by FileNotFoundException: LCLS.XML when attempting to steer LCLS".

Cmlog. cmlog is a message logger that can be used for error messages. It includes components for receiving messages to log from programs running on the network (either in hosts or IOCs), logging those errors in a database, and a viewer for browsing the logged messages.

jcmlog. jcmlog is a sophisticated error log viewer for CMLOG developed at SLAC recently for LCLS. It is in general much faster and smother than the nominal CMLOG viewer from Jlab and includes facilities for handling the particular requirements of Err (above) such as horizontal scroll for long messages.

Anchor
tools
tools

TOOL SUMMARY

This section summarises utilities that will be used to develop LCLS applications.

Tool

Function

x86 Linux RH, KDE/GTK-2 window system

(Native) Desktop O/S for applications. Note, Windows is NOT listed. As described in the architecture Windows clients will go through X11 See X11. x86 and GTK-2 specification is important so performance can be tuned.

Matlab

Ad-hoc analysis: acquiring data through aida, jca and XAL, performing computation and implementing results. Acquire hist data through Aida.
Physics Applications: apps may be implemented directly in Matlab using above tools, plus Accelerator Toolkit (AT) #inv_AT.

XAL

1) Modelling components (tracking); 2) OO device control, 3) Application framework, 4) Existing XAL applications.

Eclipse RPC

Integrated application launching. Rich Client Platform (RPC) for integrated applications shared with "EPICS Office" and gumtree.

Eclipse SWT/Jface

High performance Interactive Applications

XAL (JCA), AIDA (CORBA), JCA/CAJ

Data Interoperability. Getting and setting device data. Aida can also get history and model data to unix apps from the SLC control system.

Jcmlog, cmlog, Err

Error handling, logging and browsing. See error handling.

Cvs, make

Source repository and building. Distribution by simple "install" to an AFS or mounted NFS directory. See Filesystem. Note not ANT (question)

Oracle

Enterprise RDB. Stores the XAL geometry, and in architecture described here also the optics. Applications acquire optics from the db rather by tracking an XAL lattice at runtime.

OC4J or Jboss or Apache jakarta

Choose an Application Server. We're making heavy use of Oracle and XML, so displays based on contents of those datasources will go through an App server (AS). Pick one.

Java

Programming Language

Linux, Solaris

Server Hosts O/S

NFS

Production Host Filesystem? See Filesystem

AFS

Development Host Filesystem

Integrated Development Environments

Not a good idea to prescribe these for everyone. Three good open source choices for our technology stack are emacs+jdee, Netbeans (including matisse) and the Eclipse IDE. All three include CVS integration.

Anchor
rfs
rfs

RED FLAGS

Some important choices or questions.

SLC CAMAC Magnet control and SLC BPM data acquisition by XAL Applications. The SLC CA server does not presently support "set" operations, so there is not presently a way for XAL applications, which use EPICS Ca through JCA, to change the value of CAMAC magents. Possible solutions are to add set to SLC CA, or to change XAL applications to use AIDA, or to accept that XAL applications can not control SLC CAMAC magnets - how bad is that (question). SLC BPM acquisition through JCA should also be verified, since the SLC BPM acqusition is oriented toward acquisitions of whole beamines.

Anchor
WindowsFilesystem
WindowsFilesystem

Windows filesystem.
If we do require native execution on Windows that decision should be made clearly and early, and resources assigned to implement the common executable and configuration file distribution so that Unix and Windows running applications are in sync and see the same configuration files. Java Web Start and Eclipse update site technology may be places to find solutions.

Anchor
XAL_nocoupling
XAL_nocoupling

XAL Plane Coupled modeling.
The existing XAL probes for calculating R-matrices, run on either the X-plane or Y-plane and returns only a 2x2 matrix for each element. That is, it's uncoupled. This is reflected in the fact that only the Twiss parameters can be stored into an XAL file - it only contains uncoupled optics. It may be that XAL is in fact tracking a plane coupled system, but only returning the X or Y plane block-matrices - need to verify. So, if plane coupled orbit correction is important for us, we need to verify what XAL is doing, add at least 4x4 probe API, also probably also 6x6 tracking.

XAL Modelled acceleration and solenoid. XAL does not model acceleration nor solenoid field

Archiver. Which one?

XAL file generation directly from Oracle. Is there a mechanism to flag items in the oracle db for inclusion in the lattice? Danger is people will edit the Oracle db to say move an item to a new z location or include a dummy bpm, and the lattice will change.

Anchor
additions
additions

REQUIRED ADDITIONS TO SLC CONTROL SYSTEM

An LCLS model beamline, associated sectors and db additions in support of it, must be added.

SCP runtime problems on Linux fixed. At time of writing this includes a problem with dialog inputs, data has to be entered twice.

Pulse-id acquisition by Correlation Plots. Presently broken needs to be fixed.

Anchor
solutions
solutions

REQUIRED SOLUTIONS

This section lists functional components of the LCLS modeling applications architecture which for which we need to decide on a vendor:

  1. Numerical Analysis package, for matrix manipulation and linear algebra. Some classes of XAL extend JAMA 4, this may be sufficient.
  2. J2EE compliant Application Server. Application Servers include technology for accessing databases (eg oracle) and displaying information to the web. This will be useful for displaying static control data, model information and other slow control configs etc, to the web and to the Integrated Control Program. Suggest Apache Jakarta, plus PHP, Xerces, Xalan, etc.

Anchor
jl
jl

JOB LIST

Lists some jobs that might otherwise be forgotten.

  1. SQL script and other munging to get from Oracle db description of geometry and devices to a lattice description in an XAL input file.
  2. The XAL tracker. An XAL application which tracks the lattice and produces a 2nd XAL file containing the twiss parameters for each device, plus other per-element parameters.
  3. Add acceleration and solenoid elements to XAL.
  4. Check XAL's linear algebra support. Done: it uses JAMA -see ref.
  5. Create a Skills Matrix for applications, eg, XML and associated technologies (DOM, XSL etc), Oracle and associated technologies (SQL, PHP, persistence).

Anchor
qs
qs

QUESTIONS

  1. Anchor
    verifyAFSclient
    verifyAFSclient
    Verify AFS client for Windows is not workable.
  2. Anchor
    bestWindowsX11
    bestWindowsX11
    Find best performing Windows X11 server for JFC/Swing clients.
  3. Anchor
    q_dbgeoonly
    q_dbgeoonly
    How complex is the conversion of Oracle DB to XAL lattice? Does the db contain enough to emit a lattice? Mark Woodley warns that there are probably many things necessary in the XAL lattice which need not be in the DB (marker points), and many things in the DB which should not be in the lattice. This latter class includes things like dummy BPMs, so not simply the case that everything of a given class should be in the lattice. People change the z of things in the DB. May be a good idea to have a "Skeleton" XAL file (maybe processed by xsl/php).
  4. Anchor
    kmodtobdes
    kmodtobdes
    Verify there is no "KMOD to BDES" requirement?
    1. That is, is there a Lattice Diagnostics requirement for online applications, and a need to keep magnet "fudge factors"?
    2. Which XAL applications allow one to update the EPICs magnet k-values after a successful model run?
  5. Does XAL really not model acceleration? If not how is it useful for SNS?
  6. Verify that XAL does not model a plane coupled system.
  7. Does XAL offer matrix manipulation, linear algebra and fitting adequate for the LCLS? Ans: yes, uses JAMA.
  8. How long does XAL take to parse an XAL beamline? It has to build a DOM tree, which can't be negligible. Since that is a requirement of every XAL application at initialization its an important performance bottleneck.
  9. Anchor
    q_numbeamlines
    q_numbeamlines
    How many beamline descriptions should there be?
  10. What is the canonical list of XAL physics apps?
  11. Does LCLS need SVD based orbit minimization? Is there an orbit minimization in XAL?

Anchor
rnd
rnd

R&D

This section outlines some constrained R&D we should do to check architecture decisions.

Matlab

Anchor
inv_at
inv_at

Accelerator Toolkit (AT)

See what applications are available in Accelerator Toolkit (AT). Use of matlab for applications depends on desirability of the functionality offered, responsiveness of the application in the context of a large accelerator's operations, and importantly, ability to secure licensing with manageable cost/benefit.

Specifically: Do AT applications appear to offer support for configurations necessary in a large machine (e.g. choosing from available bpms and correctors in an orbit correction package). How does it handle errors? Are bpm statuses communicated to the user interface and graphics?

Matlab Plotting

Can Matlab be used as a general purpose charting engine? This would be very much more desirable than XAL's charting if having charted the data for a plot one could easily "drop into matlab" to further analyse the data just plotted.

Anchor
inv_fs
inv_fs

Filesystem and distributing software releases

Should the production executables (XAL java jar files etc) and configuration files be on AFS or NFS? Operative points in the question are that both XAL and Eclipse require that the user specify a "workspace" at startup, which defines their particular configuration. This workspace must always be writable, so AFS token expiry after 25 hrs use, can be problematic. Simplest solution is makefile "install" to a mounted NFS directory - but that directory has to be accessible by all head nodes (that is, all linux desktops running the applications).

Eclipse includes two software distribution mechanisms: first requires "pull" (the user initiates the update), 2nd is Java Web Start, which checks for updates at predefined intervals.

Anchor
details
details

DETAILS

This section gives details behind architectural statements made above.

Anchor
dh
dh

Why so definite about x86 Linux RH with KDE/GTK-2?

To create a high performance user interface we should lock down the desktop hardware. We can support more than one such configuration, such as x86 Windows and x86 Linux with GTK, but for high performance UIs we need to build for specific desktops, so we have to know what they will be a-priori. Eg, when building SWT/Jface apps, one has to target a gives set of desktops so the appropriate libraries can be included in the build

...

  1. That is, is there a Lattice Diagnostics requirement for online applications, and a need to keep magnet "fudge factors"?
  2. Which XAL applications allow one to update the EPICs magnet k-values after a successful model run?

...

R&D

This section outlines some constrained R&D we should do to check architecture decisions.

Matlab

...

Accelerator Toolkit (AT)

See what applications are available in Accelerator Toolkit (AT). Use of matlab for applications depends on desirability of the functionality offered, responsiveness of the application in the context of a large accelerator's operations, and importantly, ability to secure licensing with manageable cost/benefit.

Specifically: Do AT applications appear to offer support for configurations necessary in a large machine (e.g. choosing from available bpms and correctors in an orbit correction package). How does it handle errors? Are bpm statuses communicated to the user interface and graphics?

Matlab Plotting

Can Matlab be used as a general purpose charting engine? This would be very much more desirable than XAL's charting if having charted the data for a plot one could easily "drop into matlab" to further analyse the data just plotted.

...

Filesystem and distributing software releases

Should the production executables (XAL java jar files etc) and configuration files be on AFS or NFS? Operative points in the question are that both XAL and Eclipse require that the user specify a "workspace" at startup, which defines their particular configuration. This workspace must always be writable, so AFS token expiry after 25 hrs use, can be problematic. Simplest solution is makefile "install" to a mounted NFS directory - but that directory has to be accessible by all head nodes (that is, all linux desktops running the applications).

Eclipse includes two software distribution mechanisms: first requires "pull" (the user initiates the update), 2nd is Java Web Start, which checks for updates at predefined intervals.

...

DETAILS

This section gives details behind architectural statements made above.

...

Why so definite about x86 Linux RH with KDE/GTK-2?

To create a high performance user interface we should lock down the desktop hardware. We can support more than one such configuration, such as x86 Windows and x86 Linux with GTK, but for high performance UIs we need to build for specific desktops, so we have to know what they will be a-priori. Eg, when building SWT/Jface apps, one has to target a gives set of desktops so the appropriate libraries can be included in the build.

...

ERROR HANDLING, LOGGING AND VIEWING

A programmer spends half their time handling errors, so making that as easy as possible is a productivity priority. For LCLS we will use the following technology stack:

Err package (see http://www.slac.stanford.edu/grp/cd/soft/err/Image Removed) makes the process of rigorously handling errors easy. It allows a programmer to define an error code in a structured, recorded global way; and to use that code to issue errors and associated diagnostics from or linux, solaris, windows platforms in either java or C/C++, and issue them directly to CMLOG (or some other message logger). It includes support for exception chaining ("caused-by") and exception translation, so the end user can see what systematic thing caused their functional problem (E.g. of a error logged by Err in cmlog might be "UnableToTrackBeamlineException: LCLS ; caused by FileNotFoundException: LCLS.XML when attempting to steer LCLS".

Cmlog. cmlog is a message logger that can be used for error messages. It includes components for receiving messages to log from programs running on the network (either in hosts or IOCs), logging those errors in a database, and a viewer for browsing the logged messages.

jcmlog. jcmlog is a sophisticated error log viewer for CMLOG developed at SLAC recently for LCLS. It is in general much faster and smother than the nominal CMLOG viewer from Jlab and includes facilities for handling the particular requirements of Err (above) such as horizontal scroll for long messages.

NAMES

Light relief - what are we going to call this system?

...