Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Presently the components of OpenVisualizer operate within a single process. We wish to experiment with extending this operation However, in a realistic sensor networking implementation, we do not wish to deploy a PC as an LBR!  This page presents the first steps toward segmenting the components of OpenVisualizer across processes and machines, using an architecture as shown in the diagram below.

Gliffy
nameembedded-distributed-architecture

As a first step toward this goal, we plan to separate the GUI to run on a PC, and an LBR to run on an inexpensive, low-power, embedded Linux device.

Gliffy
nameRemoteGui

Messaging

Presently we implement EventBus messaging with PyDispatch, which provides communication between threads in a single process. However, we must split the GUI from the LBR when the LBR is headless, like an embedded Linux device. In addition to host-to-host communication, we also may wish to segment the components in the LBR into separate processes, for example to reimplement serial communication in C.

...

Remote GUILBR
 On startup, create a signal handler on SIGUSR1

At some later time...
On startup:

  1. start WebSocket server on port 8000
  2. run plink to forward port 8000 to LBR
  3. run 2nd plink to execute a remote command on LBR, which sends the signal
    pkill -SIGUSR1 -f "python openVisualizerCli"
 
 Signal received, and handler connects to WebSocket server on forwarded port
ws://<remoteip>localhost:8000/lbr

The signal above assumes the LBR is in the form of the openVisualizerCli module, which probably is the simplest solution.

...

JSON provides a convenient and widely accepted mechanism for implementation of the structured messages we must pass between LBR and GUI host.

Messages include:

MessageDescription
mote-inventoryA list An array of the connected motes. Sent just after establishing the connection to the GUI host.
mote-statusA dictionary of An object with the elements of a Mote Status report. Like OpenVisualizer, these reports are generated at some defined rate.
event-countA dictionary of An object with the current count of eventseach event.

Messaging Between Processes

...