Proceedings of the 22nd Linear Accelerator Meeting in Japan

pa-33

APPLICATIONS OF INTERNET AND INTRANET TECHNOLOGIESFOR DISTRIBUTED CONTROL
Igor Mejuev and Isamu AbeHigh Energy Accelerator Research Organization (KEK)
1-1 OHO, Tsukuba, Ibaraki 305, Japan

Abstract
Possible applications of Internet and Intranet technologies for accelerator control are discussed. Thesetechnologies include VRML, Java, JavaScript, HTML and CGI. Using WWW for accelerator control
provides new possibilities for the design and deployment of control applications. Since there are many
WWW authoring and programming tools now available, software development can be done in a short time.
The use of Java in combination with CGI offers unique possibilities for developing distributed applications.
VRML and other Internet virtual-reality standards make it possible to easily create and manipulate 3D data
and to provide user interactivity. Problems and possible solutions of Java, VRML and other WWW
applications for accelerator control are also mentioned.

Introduction
The KEK e+/e- Linac is a 2.5 GeV injector for thePhoton Factory and TRISTAN AR. It will be
upgraded into 8GeV electron and 3.5 GeV positron
Linac for the KEKB project in 1998. During thelast 2 years a feasibility study of the application ofInternet and Intranet technology for control anddata analysis was performed. We estimatedpossible areas of applications of Internet virtual(VRML) [1], Java and other distributed
technologies for control tasks. The existing local
network in Linac can be used for creating a
distributed multimedia environment where users
can perform various control and data-analysis
tasks using Web browsers available for many
platforms, such as Windows, UNIX or Macintosh.
By using this approach we can reduce thedevelopment cost compared with that ofcommercial control software packages.

Java and CGIJava is used as a main development language for
implementing the environment described above. Itis a multiplatform language supported by almost
all WWW browsers currently available. Automatic
garbage collecting and support for threads makethis language a reasonable selection for developinga wide range of applications from data analysis toresource servers. Multithreading also improves theinteractive performance of graphical applications
for the user. Our experience shows that if the JIT

compiler is used Java performance lies in the
middle of the spectrum compared with otherprogramming languages. A high level ofportability makes it possible to share and reusecode written for different operating systems. In
Java, programs are compiled to an architecture
neutral bytecode format that allows a Javaapplication or applet to run on any system, as longas that system implements the Java virtualmachine. Since Java language is dynamic we candynamically link classes into a running system.
Classes are loaded as needed, even from across anetwork. Dynamic language can adapt to an
evolving environment, the kind of environmentthat accelerator control systems usually are. To
speed up the development of applications, Javawas designed to be simple so that programmers
experienced in C or C++ can learn to use it
quickly. Since Java is an object-oriented language,a programmer can focus on the data in an
application and methods that manipulate that data,rather than thinking strictly in terms of procedures.
Using Java, developers can use the power of theOOP paradigm.
Although security is also an important issue,
applets security restrictions can be redundant
inside a closed network used for control. We
bypass this restriction, if necessary, by using CGI
scripts, which provide applets with access to files
and other resources. For developing CGI scripts
we use Perl language, since it is highly portableand faster than most scripting languages. We havealso found it convenient to use Perl for device
parameters’ tables handling, because it is aconvenient language for file and text processing.
The restriction that allows an applet to open socket
connections only to hosts from which it wasloaded is bypassed, if necessary, by using of anintermediate Java apolication running on a Web
server and redirecting requests from applets toother computers in a local network. An example ofan application for a klystron aging data analysis isgiven in Figure 1.

Internet Virtual Reality
Recently, the number of applications of Internet
virtual reality has been rapidly growing, and many
WWW browsers can now display interactive 3D
words using VRML 2.0 or other data formats.
There arealso applicationsor VRML forscientific-data visualization. Beginning withversion 2.0, VRML became interactive, so thatuser actions can trigger events. New object types
can be defined so that the development of acomplex model is simplified. In VRML 2.0 it ispossible to define Java or JavaScript programs as anode, which can receive or send events to othernodes in a virtual world. VRML is also a
distributed language, so that a world can becomposed from objects which are loaded fromacross a network. It provides further possibilities
for the integration of heterogeneous applications in
a control network environment. Download time ofa virtual world from a remote host can now be
significantly
reduced, since some browsers(Netscape) support compressed VR data files.
In our control system we created a model of Linac
building in VRML format, which contains devices
with links to corresponding control programs.
Links are implemented using a remote application
loader which downloads an application using an
http connection and executes it on a local OS (seeFigure 2). JavaScript controls can also be used tomanipulatea virtual world on the Netscapebrowser by using Netscape LiveConnect.
3D interactive worlds have an obvious advantage
if they compared with 2D control programs, sincea 3D representation is easily understandable byusers with any level of skills in computing.
Conclusions
The examples given in tms paper prove that thecurrent state of Internet and Intranet technologies

makes in possible to use them for various tasks maccelerator control. Virtual reality or other types ofhypertext representation can also be applied for theintegration of previously developed applications togive users new opportunities in implementing theirtasks. The development of new applications issimplified, since many problems wmch arise in
distributed
control-application
development
already have their solutions in Internet/Intranetworld.

Reference[1 ]The Use Of Virtual Reality For A Multimedia
Informational System Development; Igor Mejuev
and Isamu Abe; International Workshop onControls
for Smalland Medium-Scale
Accelerators, KEK, Tsukuba, Japan, N o v .11-15,
1996.
Figuresp ajW iBBBB MBWBBW—如S fArf&mm<Hc0ar

^

"一 t

音抑—マ—^^

公ノノぢ—

pm SeckunV 孰 ''jkぐ—^ ^ ， 〜t益^Figure 1

Figure 2

mr'uII