15 th Annual Tcl/Tk Conference October 2008 Timothy L. Tomkinson Fellow Software Engineer Northrop Grumman Electronic Systems Remote Control of Test Equipment.

Slides:



Advertisements
Similar presentations
Message Passing Vs Distributed Objects
Advertisements

Client/Server Computing (the wave of the future) Rajkumar Buyya School of Computer Science & Software Engineering Monash University Melbourne, Australia.
Distributed Systems Architectures
MicroKernel Pattern Presented by Sahibzada Sami ud din Kashif Khurshid.
Connecting to Databases. relational databases tables and relations accessed using SQL database -specific functionality –transaction processing commit.
ICS 434 Advanced Database Systems
COM vs. CORBA.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 12 Slide 1 Distributed Systems Design 2.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts Amherst Operating Systems CMPSCI 377 Lecture.
GridRPC Sources / Credits: IRISA/IFSIC IRISA/INRIA Thierry Priol et. al papers.
Common Object Request Broker Architecture (CORBA) By: Sunil Gopinath David Watkins.
CORBA - Common Object Request Broker Architecture.
Seminarium on Component-based Software Engineering Jan Willem Klinkenberg CORBA.
Middleware Fatemeh Hendijanifard 1 آزمايشگاه سيستم هاي هوشمند (
Distributed Systems Architectures
15 Chapter 15 Web Database Development Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.
A brief look at CORBA. What is CORBA Common Object Request Broker Architecture developed by OMG Combine benefits of OO and distributed computing Distributed.
CORBA Case Study By Jeffrey Oliver March March 17, 2003CORBA Case Study by J. T. Oliver2 History The CORBA (Common Object Request Broker Architecture)
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
CS 501: Software Engineering Fall 2000 Lecture 16 System Architecture III Distributed Objects.
1. Introducing Java Computing  What is Java Computing?  Why Java Computing?  Enterprise Java Computing  Java and Internet Web Server.
Introduction to Remote Method Invocation (RMI)
Middleware Technologies compiled by: Thomas M. Cosley.
II. Middleware for Distributed Systems
1 CS6320 – Why Servlets? L. Grewe 2 What is a Servlet? Servlets are Java programs that can be run dynamically from a Web Server Servlets are Java programs.
Getting connected.  Java application calls the JDBC library.  JDBC loads a driver which talks to the database.  We can change database engines without.
Visual Basic: An Object Oriented Approach 12 – Creating and using ActiveX objects.
Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some.
Data Integration Problem How to access data across 22 different data systems, most operating on different hardware, using different software, and having.
L6 - March 1, 2006copyright Thomas Pole , all rights reserved 1 Lecture 6: Software Packaging: Dynamically Integrable Components and Text Ch.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
COM vs. CORBA Computer Science at Azusa Pacific University September 19, 2015 Azusa Pacific University, Azusa, CA 91702, Tel: (800) Department.
Comparison of Web Services, RMI, CORBA, DCOM Usha, Lecturer MCA Department of Computer Science and Engineering.
1 of of 25 3 of 25 ORBs (Object Request Broker) – A distributed software bus for communication among middleware services and applications – To.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
1 Introduction to Middleware. 2 Outline What is middleware? Purpose and origin Why use it? What Middleware does? Technical details Middleware services.
Component Technology. Challenges Facing the Software Industry Today’s applications are large & complex – time consuming to develop, difficult and costly.
Abhishek Bachchan Vishal Patangia
SEMINOR. INTRODUCTION 1. Middleware is connectivity software that provides a mechanism for processes to interact with other processes running on multiple.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Distributed Objects and Middleware. Sockets and Ports Source: G. Coulouris et al., Distributed Systems: Concepts and Design.
PolyORB Versatile Middleware for Interoperable Critical Systems PolyORB Versatile Middleware for Interoperable Critical Systems Presentation cover page.
CSC 480 Software Engineering Lecture 18 Nov 6, 2002.
Processes Introduction to Operating Systems: Module 3.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
CS 501: Software Engineering Fall 1999 Lecture 12 System Architecture III Distributed Objects.
 Common Object Request Broker Architecture  An industry standard developed by OMG to help in distributed programming.
1 Engineering Web Based Legacy Systems By Kanchana Eramudugoda Distributed Computing – CS843.
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
CEN6502, Spring Understanding the ORB: Client Side Structure of ORB (fig 4.1) Client requests may be passed to ORB via either SII or DII SII decide.
Topic 5: CORBA RMI Dr. Ayman Srour
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
CORBA Antonio Vasquez, John Shelton, Nidia, Ruben.
1 Distributed Systems Architectures Distributed object architectures Reference: ©Ian Sommerville 2000 Software Engineering, 6th edition.
Distributed Computing
Distribution and components
#01 Client/Server Computing
Ch > 28.4.
Inventory of Distributed Computing Concepts and Web services
Component-Based Software Engineering: Technologies, Development Frameworks, and Quality Assurance Schemes X. Cai, M. R. Lyu, K.F. Wong, R. Ko.
Interpreter Style Examples
Inventory of Distributed Computing Concepts
Component--based development
Quality Assurance for Component-Based Software Development
EPICS: Experimental Physics and Industrial Control System
Copyright 1999 B.Ramamurthy
#01 Client/Server Computing
Presentation transcript:

15 th Annual Tcl/Tk Conference October 2008 Timothy L. Tomkinson Fellow Software Engineer Northrop Grumman Electronic Systems Remote Control of Test Equipment Using Distributed Objects

Agenda My Background Problem: Controlling Complex Test Stands –Communication between network nodes –Hardware control Networking Solutions –Custom middleware –Off-the-shelf solution using CORBA –Tcl solution using distributed objects Hardware Control –Tcl and Ffidl Example Conclusion 2

My Background Education –B.S. Electrical Engineering: Carnegie Mellon University –M.S. Computer Science: Johns Hopkins University Air Force: 5 years –Satellite Software Engineer –DMSP: Weather Satellites Northrop Grumman: 14 years –Embedded, real-time software VxWorks VME, CompactPCI C/C++ –Test Software Windows, Unix, VxWorks Ethernet, GPIB, RS-232, 1553, USB Tcl, C/C++, SQL Tcl User: 10 years 3

4 Typical Test Stand Database GPIB USB VME CompactPCI RS-232 Control PC Ethernet 1553 Operator PC PCI

Custom Middleware Create custom client/server applications Need to know network programming on different platforms –Steep learning curve on some platforms/languages Need to define network protocol and message structures –Separate code required to encapsulate and extract messages –Tedious to maintain Expensive 5 # Power Supply Message typedef struct { MessageId msgId; PowerSupplyId psId; float voltage; } PowerSupplyMsg;

CORBA Common Object Request Broker Architecture Platform-independent infrastructure for communicating over a network Messages are defined using a generic Interface Definition Language (IDL) IDL compiler generates client and server objects Client object used to connect to server object and execute remote method calls Method arguments, return values, and exceptions are encapsulated and extracted automatically according to IDL ORB (Object Request Broker) provides main event loop processing and message dispatching Complicated/expensive 6

CORBA Architecture Interface Definition (IDL) Interface Definition (IDL) IDL Compiler Client (Operator PC) Server (Control PC) Implementation Class Implementation Class Skeleton Class Skeleton Class ORB 7 Stub Class Stub Class Network

Tcl Distributed Objects Client (Operator PC) Server (Control PC) 8 Network “Remote” Class “Remote” Class Local Object Local Object Target Object Target Object “Remote” Class “Remote” Class “Remote” class manages infrastructure Target object created on server Introspection used to generate local object Local methods and procedures replaced with remote method calls Operations on local object transparently executed on target object

Advantages No IDL compiler –Client and server objects created at runtime from single Itcl class –Same language on both ends –Introspection No ORB –Network communication managed by “comm” package –Message dispatching managed by Tcl interpreter –Event loop managed by Tcl event loop Transparency –Itcl class does not need to be modified to run remotely –Other than startup code, client app is not aware that local object is running remotely 9

Hardware Control “Ffidl” package used to call shared libraries –Foreign Function Interface with Dynamic Loading –Tcl extension on top of either “libffi” or “fficall” –Creates Tcl commands that map to functions in shared libraries DLLs (Windows) or shared objects (Unix) Custom or COTS Examples: Win32, NI-VISA, 1553, VME, PCI, etc. –Eliminates need to write Tcl extensions –Ported to VxWorks Uses VxWorks symbol table Allows direct calls to kernel and user modules Wrapper class created for each library to provide object-oriented interface 10

Hardware Control (cont’d) Device Driver Device Driver Ffidl Shared Library Shared Library Device 11 Test Script Test Script Library Wrapper Library Wrapper Test scripts written in procedural Tcl Device drivers written in object-oriented Tcl Library wrappers provide OO interface to shared libraries Ffidl acts as bridge between Tcl and C Shared libraries: DLLs or shared objects, custom or COTS Hardware device

Device Driver Classes Command table contains method names vs. command strings Initialization code creates public methods for each command Public methods call the same private method to write to device Same concept used for query commands 12 class PowerSupply { package require NiVisa ;# library wrapper # Command table (method vs. command string) foreach {method cmdStr} { reset *RST voltage VOLT... } { # Create write methods public method $method {args} \ “eval handleWrite $cmdStr {$args}” } # Write to device private method handleWrite {args} { $niVisa write $args } # Example $ps reset $ps voltage 5.0

Example 13 Server side # Start the server package require Remote Remote::config –port 5000 –local 0 Client side # Create instance of “Remote” object package require Remote set remote [Remote #auto $hostname 5000] # Use “send” method to load package $remote send “package require PowerSupply” # Use “new” method to create object set ps [$remote new PowerSupply] # Call methods $ps reset $ps voltage 5.0

Conclusion CORBA paradigm very easy to implement in Tcl –Itcl provides all necessary object-oriented extensions –Tcl’s introspection facility eliminates need for interface definition file –Comm package provides robust remote procedure calls Ffidl is perfect for controlling hardware –Easy to call C libraries without writing Tcl extensions –Can use existing device drivers, either COTS or custom Tcl’s portability allows seamless control across multiple platforms Distributed object architecture provides rapid development –Code can be tested and debugged on local PC –To deploy, only a few extra lines are required to run remotely –No knowledge of network programming is required –Since code does not need to be modified, any Itcl object can be run remotely Fast, simple, inexpensive 14

15