%ADASS_PROCEEDINGS_FORM%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% SAMPLE1.TEX -- ADASS XII (2002) ASP Conference Proceedings sample
% paper with minimal markup. Based on the sample from ADASS XI (01).
%
% This is a simple example.  If you want to see a more comprehensive
% sample paper,  take a look at sample2.tex.
%
% Much of the input will be enclosed by braces (i.e., { }).  The
% percent sign, "%", denotes the start of a comment; text after it
% will be ignored by LaTeX.  You might also notice in some of the
% examples below the use of "\ " after a period; this prevents LaTeX
% from interpreting the period as the end of a sentence and putting
% extra space after it.   
% 
% You should check your paper by processing it with LaTeX.  For
% details about how to run LaTeX as well as how to print out the User
% Guide, consult the README file.  
%
% If you do not have access to the LaTeX software or a laser printer
% at your site, you can still prepare your paper following the
% instructions in the User Guide.  In such cases, the editors will
% process the file and make any necessary editorial adjustments.
% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
\documentclass[11pt,twoside]{article}  % Leave intact
\usepackage{adassconf}

% If you have the old LaTeX 2.09, and not the current LaTeX2e, comment
% out the \documentclass and \usepackage lines above and uncomment
% the following:

%\documentstyle[11pt,twoside,adassconf]{article}

\begin{document}   % Leave intact

%-----------------------------------------------------------------------
%			    Paper ID Code
%-----------------------------------------------------------------------
% Enter the proper paper identification code.  The ID code for your
% paper is the session number associated with your presentation as
% published in the official conference proceedings.  You can
% find this number locating your abstract in the printed proceedings
% that you received at the meeting or on-line at the conference web
% site; the ID code is the letter/number sequence proceeding the title 
% of your presentation.  
%
% This will not appear in your paper; however, it allows different
% papers in the proceedings to cross-reference each other.  Note that
% you should only have one \paperID, and it should not include a
% trailing period.
%

\paperID{P9-17}
%%%% ID=P9-17

%-----------------------------------------------------------------------
%		            Paper Title 
%-----------------------------------------------------------------------
% Enter the title of the paper.
%
% EXAMPLE: \title{A Breakthrough in Astronomical Software Development}
%
% If your title is so long as to fill the page header when you print it,
% then please supply a short form as a \titlemark.
%
% EXAMPLE:
%  \title{Rapid Development for Distributed Computing, with Implications
%         for the Virtual Observatory}
%  \titlemark{Rapid Development for Distributed Computing}
%

\title{Web Services in Telescope Interoperability}

%\titlemark{ }

%-----------------------------------------------------------------------
%		          Authors of Paper
%-----------------------------------------------------------------------
% Enter the authors followed by their affiliations.  The \author and
% \affil commands may appear multiple times as necessary.  List each
% author by giving the first name or initials first followed by the
% last name.  Authors with the same affiliations should grouped
% together. 
%
% Try to limit the front matter to no more than three \author
% commands.  Group authors with the same affiliations.  Too many
% \author commands fills the first page of the paper with little
% actual text.

\author{Markku Verkkoniemi}
\affil{Nordic Optical Telescope, Email: mverkkon@not.iac.es}

\author{Jacob W. Clasen}
\affil{Nordic Optical Telescope, Email: jclasen@not.iac.es}

\author{Peter M. S\o rensen}
\affil{Nordic Optical Telescope, Email: pms@not.iac.es}

%-----------------------------------------------------------------------
%			 Contact Information
%-----------------------------------------------------------------------
% This information will not appear in the paper but will be used by
% the editors in case you need to be contacted concerning your
% submission.  Enter your name as the contact along with your email
% address.

\contact{Markku Verkkoniemi}
\email{mverkkon@not.iac.es}

%-----------------------------------------------------------------------
%		      Author Index Specification
%-----------------------------------------------------------------------
% Specify how each author name should appear in the author index.  The 
% \paindex{ } should be used to indicate the primary author, and the
% \aindex for all other co-authors.  You MUST use the following
% syntax: 
%
% SYNTAX:  \aindex{LASTNAME, F. M.}
% 
% where F is the first initial and M is the second initial (if
% used).  This guarantees that authors that appear in multiple papers
% will appear only once in the author index.  
%
% EXAMPLE: \paindex{Crabtree, D.}
%          \aindex{Manset, N.}
%          \aindex{Veillet, C.}
%
% NOTE: this information is also used to build the author list that
% appears in the table of contents.  Authors will be listed in the order
% of the \paindex and \aindex commmands.
%

\paindex{Verkkoniemi, M.}
\aindex{Clasen, J. W.}
\aindex{Sorensen@S\o rensen, P. M.}

%-----------------------------------------------------------------------
%                     Author list for page header
%-----------------------------------------------------------------------
% Please supply a list of author last names for the page header. in
% one of these formats:
%
% EXAMPLES:
% \authormark{LASTNAME}
% \authormark{LASTNAME1 \& LASTNAME2}
% \authormark{LASTNAME1, LASTNAME2, ... \& LASTNAMEn}
% \authormark{LASTNAME et al.}
%
% Use the "et al." form in the case of seven or more authors, or if
% the preferred form is too long to fit in the header.

\authormark{Verkkoniemi, Clasen \& S{\o}rensen}

%-----------------------------------------------------------------------
%			Subject Index keywords
%-----------------------------------------------------------------------
% Enter up to 6 keywords describing your paper.  These will NOT be
% printed as part of your paper; however, they will be used to
% generate the subject index for the proceedings.  There is no
% standard list; however, you can consult the indices for past ADASS
% proceedings (http://adass.org/adass/proceedings/).

\keywords{telescope, operations, interoperability, SOAP}

%-----------------------------------------------------------------------
%			       Abstract
%-----------------------------------------------------------------------
% Type abstract in the space below.  Consult the User Guide and Latex
% Information file for a list of supported macros (e.g. for typesetting 
% special symbols). Do not leave a blank line between \begin{abstract} 
% and the start of your text.

\begin{abstract}          % Leave intact
Object access is a tool that is feasible for interoperability of
telescope operations. Different subsystems need to be accessed
in a standardized way. Simple Object Access Protocol, SOAP, provides
the core of this approach. Web Services is the wider context of this 
peer-to-peer protocol. 

A protocol that is used in virtual observatory interconnectivity 
can also be used for controlling telescope operations. The learning
curve of available packages is easy to overcome and people having
experience from different operating systems can start coding in SOAP
in a matter of hours.
\end{abstract}

%-----------------------------------------------------------------------
%			      Main Body
%-----------------------------------------------------------------------
% Place the text for the main body of the paper here.  You should use
% the \section command to label the various sections; use of
% \subsection is optional.  Significant words in section titles should
% be capitalized.  Sections and subsections will be numbered
% automatically. 
\section{Observing Computational Needs at NOT}

%\setcounter{footnote}{1}
\htmladdnormallinkfoot{Nordic Optical Telescope}{http://www.not.iac.es} 
has subsystems controlling
different parts of the telescope and the instruments connected to it. These 
subsystems need a common interface so that the observers can write scripts
to control the complete observing flow
in a high-level language. The efficiency
of the observing run can be improved by writing these scripts in
advance.

In addition to enabling the scripting, a common interface to the subsystems
facilitates computer control of the telescope. It also helps 
future subsystems to fit in to the complete system. An abstract interface
definition is useful for the staff members and observers alike to
understand various aspects of the operations.

\section{SOAP and Its Implementation at NOT}

\htmladdnormallinkfoot{World Wide Web Consortium, W3C}{http://www.w3.org} 
has defined a set
of standards for application to application communication. The core of
these programmatic interfaces made available is SOAP that enables the 
communication. In our implementation
SOAP uses XML on HTTP to enable RPC calls to different
systems. It is totally independent of operating systems and programming 
languages. We are at present using C, C++, Perl and Python with SOAP
packages on Linux. 

With these packages remote objects can be accessed as if they
were local to the application. The intrinsics of the actual
remote calls are transparent to the application developer.

At NOT we are using SOAP protocol version 1.1. 
The core package for the operations is 
\htmladdnormallinkfoot{gSOAP}{http://http://www.cs.fsu.edu/~engelen/soap.html} 
, which when using with C
has a small memory footprint, only around 150 kB per server process. This
allows us to have a multitude of services running on a single Intel PC
computer.

The overhead for a typical subsystem call with gSOAP between two 2 GHz
Pentium CPU based PCs
is around 1 ms. In
our subsystem operations this is very well accepted. 

In practical terms SOAP works like this:
\begin{itemize}
\item The SOAP library on the client side is constructing an XML envelope
for the call parameters.
\item The standardized
XML message is sent on the wire to the server listening at a specific TCP/IP
port on a computer.
\item The server does its task accordingly, and sends back a message to the
client.
\end{itemize}


\section{Thin Client---Thin Server}

Each client-server pair consists of SOAP compatible programs. The port 
numbers for respective services are held in /etc/services file, and 
a library function is used to pick up the port number. Each subsystem has
a server for its set of parallel functionality. For example, if the filter
holders of an instrument \begin{em}can\end{em}  be operated simultaneously, 
they \begin{em}shall\end{em}
have a server for each single filter holder.
 
Instead of a monolithic server solution we have several tiny processes
doing one thing, as seen in Figure~\ref{P9-17:T1.10-fig-1}.
\begin{figure}
\epsscale{.80}
\plotone{P9-17_f1.eps}
\caption{Client/Server pair examples.} \label{P9-17:T1.10-fig-1}
\end{figure}

The logging of the system is dealt with a syslog server that
reports the functionality in a common log that is filtered to be displayed
for the user. There are four different levels of logging: notice,
warning, error, and debug. The display filtering is performed based
on these levels.

The operating system is taking care of time-sharing between the servers, and 
the SOAP library takes care of the message queuing. This way we need not
implement multi-threading in the servers. Operations on the subsystems
can be made simultaneously, and both client
and server program code complexity is reduced 
to a very simple level.

The TCS does not have any SOAP libraries. Therefore, there is 
a computer that is implementing SOAP server wrappers to the TCS RPC calls
that operate the telescope itself.
\section{Status of Subsystems}

The status display is updated by the subsystems. When starting subsystems, 
their status can be queried. It is the responsibility of the client to
make sure that the server can perform the request, and it is 
the responsibility of the server to know its own status. This status
is then displayed in a separate subsystem with a SOAP interface
visible to the person using the telescope.

A well-defined interface to the status display enables several
approaches to the displays that can be used for real-time light path analysis,
for example. 

\section{WSDL}

Web Services Description Language is defining the interface to the server.
This interface definition is automatically produced by gSOAP, and by that 
definition a client can be programmed independently to send SOAP requests.

The WSDL file is also created in XML.

With this approach you can start programming the server without clear
interface definition. When the server is made ready, the interface
is created by the library. This shortens the total development time.

\section{What about security?}

When mentioning using Web Services for controlling telescope operations
a question usually arises about security.

Asynchronous SOAP operations can easily be controlled with packet filtering
techniques. As each atomic service has a dedicated server port number,
fine-grain control is possible.

There are no secrets sent on the wire, so encrypting the messages is not
necessary. 

Any RPC mechanism between two or more computers can be interfered. Closed 
standards are almost as easy to be eavesdropped as open standards, if 
an unauthorized program
can listen to your network traffic. Security by obscurity or
complexity is poor security. You have to be able to detect and control what
traffic is passing in your network segment.

Both the SOAP client and server are running with user privileges. The 
network security services should be run in system level.

\section{Future Steps}

A well-defined interface can be used for many projects. 
At first, this work is used to enable scripting, but later it can, with
possible modifications, be used for projects for remote observing,
for instance. 

Image transfering is not tested, yet. XML binary transfer is enabled by
MIME techniques that need encoding and decoding, but a transfer by 
reference to the image location is also possible. Then some protocol 
is used for image transfer instead of Web Services.

% You can also add an acknowledgments section as indicated below.

%\acknowledgments

%My cats, Hal and Yoda, provided motivation for the initiation of this
%study.

%-----------------------------------------------------------------------
%			      References
%-----------------------------------------------------------------------
% List your references below within the reference environment
% (i.e. between the \begin{references} and \end{references} tags).
% Each new reference should begin with a \reference command which sets
% up the proper indentation.  Observe the following order when listing
% bibliographical information for each reference:  author name(s),
% publication year, journal name, volume, and page number for
% articles.  Note that many journal names are available as macros; see
% the User Guide for a listing "macro-ized" journals.   
%
% Note the following are some of the tricks that can be used:
%
%   o  \& is used to format an ampersand symbol (&).
%   o  \'e puts an accent grave over the letter e.  See the User Guide
%      for details on formatting special characters.  
%   o  "\ " after a period prevents LaTeX from interpreting the period 
%      as an end of a sentence.
%   o  \aj is a macro that expands to "Astron. J."  See the User Guide
%      for a full list of journal macros
%   o  \adassvii is a macro that expands to the full title, editor,
%      and publishing information for the ADASS VII conference
%      proceedings.  Such macros are defined for ADASS conferences I
%      through IX.
%   o  When referencing a paper in the current volume, use the
%      \adassix and \paperref macros.  The argument to \paperref is
%      the paper ID code for the paper you are referencing.  See the 
%      note in the "Paper ID Code" section above for details on how to 
%      determine the paper ID code for the paper you reference.  
%
\begin{references}
\reference Wenger, M. et al. 2001, \adassx, 213
\end{references}

% Do not place any material after the references section

\end{document}  % Leave intact
