Documentation/Messaging: Difference between revisions

From Commontk
Jump to navigationJump to search
No edit summary
No edit summary
 
(8 intermediate revisions by one other user not shown)
Line 1: Line 1:
Using [http://msdn.microsoft.com/en-us/library/ff647328.aspx Message Bus] and [http://msdn.microsoft.com/en-us/library/ff649664(v=pandp.10).aspx Publisher/Subscriber] design pattern for system integration
This document was written during the Georgetown Hackfest. In the meantime, a message broker solution has been implemented in the CTK Plugin Framework. A [[Documentation/CTK_Plugin_EventAdmin_local | in-process implementation]] is available and an [[Documentation/CTK_Plugin_EventAdmin_remote | out-of-process implementation]] is available for experimentation.
* OpenIGTLink can be used to define the common message schema, and ZeroMQ can be used to handle the transportation layer abstraction
 
* [http://www.zeromq.org/ ZeroMQ] is a small and fast implementation of the [http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol Advanced Message Queuing Protocol] under the LGPL license
=Use cases=
** It supports both synchronous and asynchronous messaging mode
==Event Management ==
** It supportsTCP, Multicast/PGM, Inter-process, and inter-thread transportation
Each component/application generates many different types of events. A centralized event manager (Hub and Spoke) can be used to aggregate/dispatch events
**  CMake version of library can be found here http://github.com/PatrickCheng/zeromq2
# Synchronization: Window/Leveling events in one window should be synchronized across all viewer windows
** API can be found here http://api.zeromq.org/zmq.html
# Temporal calibration: Different components have different update frequency, a centralized manager can be used to filter UpdateEvents, so the whole system is updating at the same frequency
 
 
==System Integration==
Different system/application have different data format or are running on different physical devices. A event bus can be used for system integration
 
=Solution=
# Use[http://msdn.microsoft.com/en-us/library/ff648849(v=pandp.10).aspx Message Broker] for event management
[[File:Amqp.jpg|thumb|none|300px|<big>AMQP model</big><br>Source: http://upload.wikimedia.org/wikipedia/en/9/9d/The-amqp-model-for-wikipedia.svg]]
 
# Use [http://msdn.microsoft.com/en-us/library/ff647328.aspx Message Bus] and [http://msdn.microsoft.com/en-us/library/ff649664(v=pandp.10).aspx Publisher/Subscriber] design pattern for system integration
{|
|[[File:Message bus.gif|thumb|none|300px|<big>Message Bus</big><br>Source: http://i.msdn.microsoft.com/dynimg/IC97398.gif]]
|[[File:Messave bus and pub&sub.gif|thumb|none|300px|<big>Message Bus</big><br>Source: http://i.msdn.microsoft.com/dynimg/IC17158.gif]]
|}
 
=Implementation=
# Message layer: [http://www.na-mic.org/Wiki/index.php/OpenIGTLink OpenIGTLink]
#* OpenIGTLink defines many common data format and message structure
#* It has plain vanilla socket support, might switch to ZeroMQ for transportation
# Transportation layer abstraction: [http://www.zeromq.org/ ZeroMQ]
#* [http://www.zeromq.org/ ZeroMQ] is a small and fast implementation of the [http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol Advanced Message Queuing Protocol] under the LGPL license
#* It supports both synchronous and asynchronous messaging mode
#* It supportsTCP, multicast/PGM, inter-process, and inter-thread transportation
#*  CMake version of library can be found here http://github.com/PatrickCheng/zeromq2
#* API can be found here http://api.zeromq.org/zmq.html

Latest revision as of 07:19, 28 November 2011

Home < Documentation < Messaging

This document was written during the Georgetown Hackfest. In the meantime, a message broker solution has been implemented in the CTK Plugin Framework. A in-process implementation is available and an out-of-process implementation is available for experimentation.

Use cases

Event Management

Each component/application generates many different types of events. A centralized event manager (Hub and Spoke) can be used to aggregate/dispatch events

  1. Synchronization: Window/Leveling events in one window should be synchronized across all viewer windows
  2. Temporal calibration: Different components have different update frequency, a centralized manager can be used to filter UpdateEvents, so the whole system is updating at the same frequency


System Integration

Different system/application have different data format or are running on different physical devices. A event bus can be used for system integration

Solution

  1. UseMessage Broker for event management
  1. Use Message Bus and Publisher/Subscriber design pattern for system integration

Implementation

  1. Message layer: OpenIGTLink
    • OpenIGTLink defines many common data format and message structure
    • It has plain vanilla socket support, might switch to ZeroMQ for transportation
  2. Transportation layer abstraction: ZeroMQ