Producer-consumer layer (MTFCore assembly)

ProducerConsumer component

The functionality of this layer is encapsulated in a ProducerConsumer component:


The ProducerConsumer task extends the basic MTFRuntime Task to provide common flow controlled data exchange functionality. This introduces the following concepts:
  • Flow control - common mechanism for requesting data and limiting message flow
  • Element arrays - multiple parallel processing elements within a task
  • Connection mappings - mapping between local and remote elements

ProducerConsumer classes

The following class diagram shows the essential structure of the ProducerConsumer component class. Note that to aid clarity operations are omitted from all classes and attributes are only shown for ProducerConsumer:


This class diagram shows:
  • Connection points - There are two: Consumer and Producer
  • Connections - There may be many consumer connections and many producer connections
  • Elements - There may be many ProducerConsumerElements within a ProducerConsumer
  • Connection Mapping - A default connection mapping is provided
  • Locking - Each element has its own element lock to prevent re-entry

Algorithm Design

NOTE: The descriptions for these algorithms are in the process of being uploaded so some of them may be temporarily missing.

ProducerConsumer class

The ProducerConsumer class encapsulates the flow-control logic for a multi-element component that has a maximum of one consumer connection point and one related producer connection point. The ProducerConsumer forms the basis of all of the specialized primitive operators.

The primary function of the logic in the ProducerConsumer class is to route messages to the appropriate ProducerConsumerElement instance.

ProducerConsumerElement class

The ProducerConsumerElement class encapsulates the flow-control logic for a single element within a ProducerConsumer. It is this class that contains the logic for updating the state of each link within a particular event overlay in response to receiving messages from other ProducerConsumers.

Slots class

The Slots class is an optimized data store for holding the current state of each link within each event overlay for a particular ProducerConsumerElement. The store is designed to be compact and to keep related data close together in memory to maximize cache effectiveness while also providing fast access operations.

ConnectionHelper class

The ConnectionHelper class provides a set of static helper methods for commonly used calculations and manipulations with Connection objects.

DimensionHelper class

The DimensionHelper class provides a set of static helper methods for common manipulations of dimension specifications.

Last edited Oct 7, 2012 at 7:42 AM by jaorme, version 40


No comments yet.