Page 1 Proceedings of the 7Th USENIX Tcl/Tk Conference Austin

Page 1 Proceedings of the 7Th USENIX Tcl/Tk Conference Austin

Proceedings of the 7th USENIX Tcl/Tk Conference Austin, Texas, USA, February 14–18, 2000 U S I N G T C L T O B U I L D A B U Z Z W O R D * C O M P L I A N T E N V I R O N M E N T T H AT G L U E S T O G E T H E R L E G A C Y A N A L Y S I S P R O G R A M S Carsten H. Lawrenz and Rajkumar C. Madhuram THE ADVANCED COMPUTING SYSTEMS ASSOCIATION © 2000 by The USENIX Association. All Rights Reserved. For more information about the USENIX Association: Phone: 1 510 528 8649; FAX: 1 510 548 5738; Email: [email protected]; WWW: http://www.usenix.org. Rights to individual papers remain with the author or the author's employer. Permission is granted for noncommercial reproduction of the work for educational or research purposes.This copyright notice must be included in the reproduced paper. USENIX acknowledges all trademarks herein. Using Tcl To Build A Buzzword* Compliant Environment That Glues Together Legacy Analysis Programs Carsten H. Lawrenz, Rajkumar C. Madhuram, Siemens Westinghouse Power Corporation, Orlando, Florida {Carsten.Lawrenz,Rajkumar.Madhuram}@swpc.siemens.com Abstract. The Siemens Integrated Design (SID) Environment is a system that allows engineers to link together many legacy computer programs. This capability provides significant reduction in effort for defining the conceptual design of electrical generators. The SID environment is a generic tool for running all types of analysis programs (methods) as well as managing their associated data. Methods are plugged into the environment in a simplified fashion by using a well-defined interface. Any features that are added to the environment immediately benefit all methods. Data can be shared between remote sites through an in-house developed, java based, replication server. This paper discusses how Tcl was used to develop the SID Environment and why it was the best choice for our application. * Buzzwords: Scalable, Multi User, Client Server, Distributed, Cross Platform, Customizable. 1. Introduction platforms were limited. We evaluated a third party GUI library (Galaxy) which was C based. We found its use 1.1 Business Case of coding too difficult to develop a prototype quickly. Java was still only known as Coffee. By chance, the Siemens Westinghouse relies on various complex authors discovered Tcl/Tk. Although Tcl was not computer calculations for designing electrical officially available on Windows at the time, various generators. Various computer programs (methods) Windows versions did exist. written in FORTRAN and other languages have been used over time. Because each method addressed Siemens Westinghouse designed an architecture that specific aspects of generator design, they existed as enabled methods to be easily plugged in, instantly standalone entities. Running each method required the sharing data among other methods. Using Tcl lent itself manual creation of input files and the manual extraction to fast prototyping and development. Six months into of output data to prepare it as the input for other development, engineers were able to start using the methods. More complications arose when trying to newly created environment. incorporate the more contemporary functionality of spreadsheets. This process, and its many iterations, Processes when performed by several different design teams, Distributed Data resulted in several manual hand-offs of information. TCL Code Server JAVA Code Furthermore, this created an immense paper trail, data SQL Server RPC Calls Tcl blend integrity issues, and time and effort spent trying to keep Remote CORBA Replication Distributed the design teams synchronized. SID Environment Server Data Servers JDBC Mini SQL There was an effort to reduce the time required to Desktop Database Variables conceptually design an electrical generator from 180 Run Server Server Days and 10 engineers to 18 Days and 3 engineers. The File Server Xess Server File Agent project was incrementally funded; therefore quick turn Fortran codes Xess around time was required. Variables Data Method Output Although most of our user platform was UNIX based, we knew we may want to use the Windows platform some time in the future. The computer languages with Figure 1: SID Architecture GUI support that ran at the time (1995) on both Figure 2: Snapshots of the SID Environment (Left: Case Manager, Input Screen, and Variable table. Right: Dynamic Input Screen, Data Flow and Process Maps) 1.2 Basic Usage updates the variables within the scope of the case. This transfer of data is accomplished by the use of input and The SID Environment simplifies the conceptual design output forms which are detailed below. process by automating and linking manual tasks. Users attend a one day training class during which theyÕre The environment also provides many utilities for IDÕs are registered in the SID database. Once viewing the various output types (PDF, postscript, registered, typing ÔsidÕ in a command window launches plots, HTML) created by the methods. All output the environment. viewing is launched from a data viewer tool. This allows the less computer savvy users to be very Each user works in their own unique data set that we productive. call a case. These cases are collected in folders and are presented in a hierarchical format similar to a file 2. Architecture manager. The folders and cases also mimic UNIX type file access permissions, which the user can modify. The architecture of SID Environment is outlined in Any a number of methods are associated with each Figure 1. The SID environment is a collection of case. The user opens a case by selecting a method. The servers and the desktop client. The desktop client case is then locked to disable access by other users. (shown in Figure 2) handles most of the user interactions with the system. It communicates with The case is displayed to the user as a window. Within several other servers for performing various functions. this window the input screens for each associated method may be displayed. A method screen, by default, is a table of variable names. The environment allows customized input screens for each method as well. Users can select on any variableÕs entry box and change its value. Validations of input data for each variable are provided. A popup menu provides descriptions for each variable. The variablesÕ descriptions, units and type are all defined in a global variable file. The scope of each variable is global within the case, which allows methods to communicate. The user may select to run one method or several methods in series. As each method runs, the environment automatically with the data server to access the replication server objects. metho case folder It was also required to port the system to Windows NT. In order to give uniform access to the case data, a file name oid type parent agent was required. It handles data movement to and É name from a case on behalf of the user into the central data É oid = parent repository. This mechanism also provides an added level of security, since all the data is owned by the file agent and access is only allowed through this file agent. case metho 3. Software Development oid caseid = oid mname = mname caseid 3.1 Debugging É The fact that Tcl is as fully interpreted language lends oid = oid oid = oid itself well to software development. Many programmers fault Tcl because it does not provide syntax checking like other languages such as C. object However, in the Tcl mode of programming the oid É developer is able (with tools like TkInspect) to dynamically modify the code while the program is running. Furthermore, modified code can easily be reloaded into the interpreter by re-sourcing the code Figure 3: E-R diagram for case and without having to exit the program. Also, bug fixes can method tables be copied out to the production area without having to take the whole environment down. We found this approach to programming to be much quicker than the Variables are the most widely used logical entities in code, compile and debug method. the system. They are stored in a data file in key-value ordered pairs. Each method takes input from a set of TclÕs error handling is more graceful than C or Java variables and generates output that is returned. For also. Most errors arenÕt fatal, i.e. the environment every design calculation or analysis, engineers use a set usually does not crash when errors are encountered. of methods, which we group as a case. In essence, a We overrode the error handler with a dialog box, that case is the set of methods and their related variables. allows the user to email the developer a description of what caused the bug and a stack trace. This usually Cases have to be managed in a reliable and fail-safe provides the developer enough information to manner, especially in a multi-user environment. Hence, determine the cause of the error. we employed a mini sql (mSQL) database [Hugh99] to hold the information about the cases, methods, users 3.2 Coding and the relationships between them. Cases are organized in the fashion of a UNIX file system, with a SID requires relatively few lines of Tcl code. This is hierarchy of folders and permissions to control access. advantageous because the development team is only Each case and each method in a case are uniquely allotted 1_ man years per year for environment identified by an object id (oid) and its parents oid. The maintenance. The SID environment contains over 115 relations between these entities are shown in Figure 3.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    10 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us