WebKTL

WebKTL is our first prototype implementation of an AJAXian interface between KTL keywords and web clients.  The motivation for experimenting with web-enabled instrument and telescope interfaces is described in our SPIE 2006 paper, and our prototype examples are described in the accompanying poster.   The next version of webktl will separate the KTL data sources from the core webktl server, and this will allow any data  that can be modelled as keyword/value pairs to be served by webktl.  For example, we will be connecting interfaces to database  tables as well as KTL services using webktl

The live versions of the examples from our SPIE poster are:

[[ NOTE: WebKTL is very much a work in progress, and at this writing, only the Mozilla / Firefox browser families are known to work without trouble.  IE6 works if you have ActiveX controls enabled for these web pages, but IE5 doesn't support the W3C standards used here.  Safari 1.3.2 has a bug that causes it to frequently crash and burn when you quit one of the examples (it appears to have no handling for the asynchronous routines' loss of context when the parent window closes). Opera is bad with SSL connections, because it creates a new session id on every callback; we have a workaround for this, but it is not yet ready. ]]
Example 1.   A Few Live Keywords. The first webktl example shows a simple example of a handful of service keywords that are made to update at about 1 Hz.  If you inspect the source code, you'll see that it's ordinary HTML markup, plus these additions:
  • It loads the ajax4webktl library of routines that implement the ajaxian hooks;
  • It calls refreshServiceData() (part of the ajax4webktl library) to start periodic updates of some KTL keywords;
  • It adds special id attributes on the HTML keyword fields so that refreshServiceData() callback can find the correct area to update.
And at just 23 lines, it's quite short.
Example 2.  Using Multiple Services; Putting Live Data into Links. The second example shows three KTL services monitored on a single page, and also illustrates that the ajax4webktl routines can put the KTL data into any part of an HTML page, not just into a child text node.  Like Example 1, this is laid out without any CSS to help make it attractive.  At 95 lines, it's still pretty short.
Example 3. Adding CSS to a WebKTL Page.  This shows very similar data to that of Example 2, but this adds about 150 lines of CSS to make the display more attractive and have a more useful layout.
Example 4.  Beyond Monitoring: Instrument Control with WebKTL. Our last example shows that it's pretty easy to do instrument control with the webktl tools.  This one takes about 115 lines of HTML and 90 lines of CSS.  However, if you inspect the HTML, you'll see there's a lot of Javascript embedded within it to implement some of the control features.  That's undesirable -- we want these files to be composed almost entirely of markup language, not programming language.  Therefore, one of our next steps will be to move the Javascript logic into the ajax4webktl file, and add special markup attributes to trigger the logic.

For further information, etc, please contact:

William Deich
UCO / Lick Observatory    |    E-mail: will@ucolick.org
University of California    |    Phone: (831) 459-3913
Santa Cruz, CA 95064    |    Fax: (831) 459-2298