DwarfMiddlewareTutorialLesson1

Chair for Computer Aided Medical Procedures & Augmented Reality
Lehrstuhl für Informatikanwendungen in der Medizin & Augmented Reality

Up to DwarfMiddlewareTutorial, forward to DwarfMiddlewareTutorialLesson2

Lesson 1: Watch the middleware do nothing

In this lesson, you will start up the DWARF middleware and an assosciated debugging tool.

Recap: The role of the middleware in DWARF

At system built with DWARF consists of:

  • several networked computers with attached hardware,
  • several Services as processes running on each of these computers,
  • configuration data for these services, and
  • distributed middleware on the computers to let the services communicate.

The middleware, in turn, has per-host and per-process parts, as well as several debugging tools. There is no central component or server.

  • Each computer in the system has
    • a DWARF Service Manager,
    • a CORBA notification service daemon and
    • an SLP daemon.
  • Each Service process has
    • a CORBA ORB, linked as a library, and
    • a helper library to initialize CORBA, called Chair.CorbaInit.

What to build

Make sure you have a built and installed DWARF distribution. In particular, for this tutorial, you need:

  • The OmniORB stubs (in src/stub/omni)
  • The common libraries (in =src/common/
  • The middleware helpers (in src/middleware/helpers)
  • The service manager (in src/middleware/servicemgr)
  • DIVE (in src/services/DIVE, requires QT)

Runing make all install in the top build directory will install these automatically.

Starting the service manager

In a terminal window, type run-servicemgr. This script starts the CORBA notification service daemon and the service manager. It also checks that the SLP daemon is running; that should be set up to start automatically as root if you have installed SLP properly.

If all goes well, you will see a bunch of messages such as:

atbruegge11:~/test/bin$ run-servicemgr
Press Control-C to stop Service Manager and Notification Service.
Checking for SLP Daemon...running, good.
Checking network configuration...ok.
Checking IP address...ok.
Starting Notification Service.......ok.
Starting Service Manager...
Property 'EventChannelFactory' set to 'file:///tmp/notification.ior'.
Property 'XmlDescriptions' set to '/home/macwilli/test/share'.
Property 'ServiceBinaries' set to '/home/macwilli/test/bin'.
15:28:06.695 30044  1 main.cpp             168 Service Manager global not running: The DWARF Service Manager is starting...
15:28:06.734 30044  1 main.cpp             241 Service Manager global running: Using SLP Service Locator.
15:28:07.313 30044  2 servicemgr.cpp       171 ServiceManager_i  0/ 0 services: newServiceDescription(ServiceManager)
15:28:07.354 30044  2 servicemgr.cpp       141 ServiceManager_i  1/ 0 services: registerService(ServiceManager)
15:28:07.355 30044  2 activeservicedesc.cp 452 ActiveServiceDescription_i ServiceManager,Activating: Waiting for registration
15:28:07.531 30044  1 main.cpp             282 Service Manager global running: Using Notification Service.
15:28:07.566 30044  1 main.cpp             319 Service Manager global running: The DWARF Service Manager has started.
15:28:10.324 30051  2 servicemgr.cpp       171 ServiceManager_i  1/ 1 services: newServiceDescription(ARTTracker)
15:28:10.445 30051  2 servicemgr.cpp       171 ServiceManager_i  2/ 1 services: newServiceDescription(ObjectCalibration)
15:28:10.654 30051  2 servicemgr.cpp       171 ServiceManager_i  3/ 1 services: newServiceDescription(ManualTracker)
15:28:10.712 30051  2 servicemgr.cpp       171 ServiceManager_i  4/ 1 services: newServiceDescription(DIVE)
15:28:10.775 30051  2 servicemgr.cpp       171 ServiceManager_i  5/ 1 services: newServiceDescription(Selector)
...
15:28:22.929 30060  2 servicemgr.cpp       191 ServiceManager_i 42/ 1 services: addClonedServiceDescription(Selector1)
15:28:22.950 30060  2 servicemgr.cpp       191 ServiceManager_i 43/ 1 services: addClonedServiceDescription(Selector2)
15:28:23.018 30060  2 servicemgr.cpp       191 ServiceManager_i 44/ 1 services: addClonedServiceDescription(Selector3)

Starting DIVE

In another terminal window, run DIVE . This starts the DWARF Interactive Visualization Environment, a debugging tool. You will see a window such as this:

DWARF Interactive Visualization Environment

What is going on? The program DIVE is a service, and so is the service manager itself. DIVE has a need for service managers, and the service manager has a matching ability. They are connected together and communicate via CORBA. DIVE uses this CORBA connection to query the service managers about the system state and display it as a graph.

Get information on services, needs and abilities in DIVE

Click on one of the boxes shown in DIVE. A window will appear showing additional information. Try clicking in different places on the boxes; the information will change.

  • Click on the title of a service (in boldface) to show information about that service.
  • Click on the line showing a need or ability (in the bottom part of the box) to show information on that need or ability.

Exercise Try to retrieve the following information:

  • the user account name that the service manager is running under
  • the process ID that DIVE is running under
  • the communication protocols that DIVE and the service manager use to communicate

Exercise If others are using DWARF in your network, try to find you who is running what services. Select "update" from the DIVE menu or even "update continuously" to refresh the view in DIVE.

Shut it all down again

Close DIVE, go back to the terminal you started the service manager from, and press Control-C. After s few seconds, you should see the lines

15:56:26.031 30044  1 main.cpp             344 Service Manager global not running: The DWARF Service Manager has shut down.
Service Manager has terminated, cleaning up...done.

If you do not, try the command killall -9 servicemgr in another terminal. Of course, you should never have to use this, but as we all know, no software is ever completely bug-free. smile


Up to DwarfMiddlewareTutorial, forward to DwarfMiddlewareTutorialLesson2

-- AsaMacWilliams - 17 Jul 2003


Edit | Attach | Refresh | Diffs | More | Revision r1.5 - 17 Mar 2005 - 20:51 - NikolasDoerfler

Lehrstuhl für Computer Aided Medical Procedures & Augmented Reality    rss.gif