The following are the requirements for the mBrane framework. They are explained in detail below. See the initial list at the bottom of the page.

Introduction

1

There are a few rules to decide whether or not a feature belongs to the scope of mBrane. A feature is within the scope of mBrane if one of the following propositions is true:

A it impacts transmission

B it impacts contextualization

C a significant performance increase is foreseen if the feature is implemented in mBrane AND such an implementation impacts significantly the mBrane code base.

D it requires specific low-level support from mBrane (ex: notifications of internal events)

2 Inverted control flow

This features comes mainly from the requirement of running more modules than there are threads. This implies that mBrane schedules user code.

We propose the following solution: mBrane is run by the OS and the OS is tweaked so that mBranes receives most of the CPU time. Within that time, user code can be scheduled deterministically with very low overhead and latencies. On a stripped down, patched (latency & kernel preemption) Linux developers would be able to target soft real time response schemes (if they code correctly their cranks).

mBrane is not intended to compete on the embedded market, its goal being more about allowing researchers to approach the soft real time domain without having to learn how to code rigorously on expensive platforms for which no interesting off the shelf software really exist (RTOSes).

Out of the scope of mBrane

1 Whiteboards

Whiteboards are modules, they implement particular functions to support whiteboard-based architectures. Whiteboards do not affect neither transmission nor contextualization. As such they go beyond the scope of mBrane and are not part of the requirements. Idem for time-to-live in messages. This data can be encoded in specific message subclasses, handled by modules dealing with history / long term memory (i.e. whiteboards).

2 Recording and Playback

This is a functionality which does not address neither transmission nor contextualization. Can be easily implemented with user-defined module classes able to understand internal state relocation. Message history to be implemented by whiteboards. Playing-control messages fall in the category of general purpose messages. More over no performance improvement can be expected in burying this feature in mBrane.

3 Pregnances

It is an improvement of contextualization, and performance increases can be expected from integrating that feature in mBrane. However, no performance degradation will occur if we add pregnances later in a given version of mBrane.

Reason: pregnance-driven computing is subscription-free, and shall be implemented as a particular activation / routing process, at the node level. This can be done without changing anything in the existing node code, excepted minor code configuration changes.

4 Extended Reflectivity

mBrane offers already messages that reflects entirely its activity: control messages. Extended levels of reflectivity are therefore application dependent and their notification falls in the category of general purpose messages.

5 Load Balancing

Support for module instance migration is offered. Migration algorithms are to be designed on a case-by-case basis, depending on the needs of the applications.

Reason: we do not believe that a general and optimal solution exists.

6 Step-locking

Can be achieved by having modules wait on specific - but regular - synchronization messages. This feature does not require specific support from mBrane.

7 Simulation

Simulation means running a module from hypothetical inputs and getting hypothetical results. This describes applying a particular semantic to the execution of modules. mBrane supports the execution of modules, the application interprets the setup and the results.

8 Pattern matching

If pattern matching is to save bandwidth (content-based subscription), it must be performed at the emission location. This implies making the destination module's code (which supplies the pattern matching algorithm and resources - like internal data and states) available everywhere. Initial studies reveal that this adds a lot of complexity that will eventually lead to noticeable performance hits, for minimal gain. The solution would then consist of running pattern-matchers on the receiving side, as part of the user-supplied module code, which is in line with mBrane capabilities: no specific support is required.

9 Module versioning

Can be achieved by supplying various versions of the same shared object. No specific support is required.

10 Module authorization

Can be handled on the receiving side by filtering incoming messages against module-specific code. No specific support is required.

R0 - Platform

1 mBrane runs on Fedora Core 8

The code may need to be executed by a superuser to support proper thread prioritisation and scheduling.

2 mBrane is optimized for Intel multi-core processors

High-end processors sporting big caches. 64 bits.

3 mBrane targets carefully isolated, finely tuned Gb ethernet networks

R1 - Modules

1 A module is a set of cranks

2 A module is implemented as a shared object

3 A crank is an entry point in a shared object

4 A module is a class, instances of which can be created / destroyed dynamically

A module instance is identified by its class (MID), instance identifier (MIID), and entity identifier.

A crank is identified by its module instance identifier and crank identifier (TID).

5 Many module instances can be mapped to one thread

This means inverted control flow: the host thread calls the cranks (no polling). The host thread schedules the execution of its cranks. In that respect, cranks are fibers: they explicitly contain preemption points. More over to avoid generic context switching overhead, cranks take care of their own working set.

6 A module instance has a priority

It reflects the thread priority. Every module embedded in a given thread gets the priority of the highest priority module. A thread is assigned the highest priority amongst those defined by the modules it embeds.

R2 - Entities

1 An entity is a class, instances of which can be created / destroyed dynamically

An entity defines an organization of modules and represents a sub-system. An entity E defines the module instances to build when an instance of E is built.

When an entity is destroyed, so are its module instances.

An entity instance is identified by its class (EID) and instance identifier (EIID).

2 An entity class can be created / destroyed dynamically

An entity is a blueprint, not code.

3 A module instance belongs to exactly one entity

Many instances of the same module can belong to the same entity.

4 Modules can be transferred to entities dynamically

5 Modules can be removed from an entity dynamically

In that case they will be reassigned to the root entity.

6 Entities can define sub-entities

7 There exists a root entity which holds every module and entity, by default

R3 - Groups

1 A group is a class, instances of which can be created / destroyed dynamically

A group defines a particular membership relationship. Entities do not belong to groups, entities and groups are orthogonal.

A group is defined system-wide, i.e. module instances can belong to any group, regardless of its location in the system.

A group instance is identified by its class (GID) and instance identifier (GIID).

2 A group is implemented as a C++ class, member of the CommonLibrary

3 A module instance belongs to one or more group instances

4 A group can be a member of one or more group

5 There exists a group to which all modules belong to by default

R4 - Activation

1 Group instances are activated individually

A group instance is active if (1) at least one of its parents is active, and (2) if itself is active. A group instance admits a dynamic parameter specifying if group individual activation is triggered automatically by parent group activation or if explicit activation is required.

When a group is deactivated, its children are considered inactive. When it is reactivated, its children return to their previous activation state.

2 Module instances are activated accordingly to group membership

A module instance is active if (1) at least one of the groups it belongs to is active, (2) if itself is active and (3) the entity it belongs to is active. A module instance admits a dynamic parameter specifying if module individual activation is triggered automatically by group activation or if explicit activation is required.

3 Entities are activated individually

Activating an entity is a condition for module instance activation. In other words, an active module instance will be considered inactive if the entity it belongs to is inactive. It does not mean that the module is deactivated, i.e. when the entity is reactivated, its module instances regain their previous activation state.

An entity instance is active if (1) its parent is active, and (2) if itself is active. An entity instance admits a dynamic parameter specifying if entity individual activation is triggered automatically by parent activation or if explicit activation is required.

4 Activation is a number in [0,1] checked against activation thresholds

Activation thresholds are defined by groups. Thresholds and activation values are defined dynamically. Thresholds are in [0,1].

R5 - Messages

1 A message is a class, instances of which can be created / destroyed dynamically

A message instance is identified by its class (MCID) and type (mcid, instance-based). A message class derives from a serializable class (provided by the CoreLibrary).

2 A message is implemented as a C++ class, member of the CommonLibrary

3 A message instance has an individual priority

By default, derived from a class-based priority, which can be overridden.

4 A message instance carries its emission time stamp

5 A message carries the identification of its emitter

6 A message instance carries its reception time stamp, if received

R6 - Streams

1 A stream is a stream of messages

2 A stream is a class, instances of which can be created / destroyed dynamically

A stream instance is identified by its class (SCID) and content identifier (scid, instance-based).

3 A stream instance has a priority

Stream priority is instance-based. The messages of a given stream instance share the stream instance priority.

4 A stream is implemented as a C++ class, member of the CommonLibrary

It implements the functionalities of building stream messages and handling the associated I/O device.

5 A stream message carries its sequence number

I.e. frame number.

R7 - Libraries

1 The CoreLibrary defines the foundation classes for building module, group, stream and message classes

It also handles the class registration (unique contiguous class identifiers), instance identification, and the mapping of names on identifiers (and vice-versa).

2 The CommonLibrary is an application-dependent library defining actual group, stream and message classes

The CommonLibrary is built from the CoreLibrary; it is to be replicated on every node of the system. Actually a hierarchy of more or less application-dependent libraries can be derived from the CoreLibrary.

3 C++ is the development language

The libraries are written in C++.

R8 - Subscription

1 To messages: MCID | mcid (optional)

2 To streams: SCID | scid

3 Subscriptions are defined for a group membership

Subscriptions are accumulated when a module is a member of several groups (including group hierarchies).

4 Subscriptions are dynamic

R9 - Nodes

1 There is exactly one node per machine involved in a given system

2 Nodes can join and leave a system dynamically

3 Nodes are time synchronized

One node is chosen (automatically) to be the time reference. Shall it leave the system, the global system operation is suspended, another one is chosen automatically and the operation resumed.

4 There is an upper limit to the node count in a system

Set as a parameter, shall not exceed 2^16-1. A node is identified by a number (NID) in that range.

5 Nodes maintain consistently their knowledge of the system's state

For example, a module or a message have the same priority anywhere in the system at a given time; the grouping and subscriptions are consistent system-wide at any time. etc.

6 Nodes offer support for optional additional networks

On which they can offload traffic. NB: that does not mean channel bonding.

General scheme: control messages in broadcast mode on the first network, application data on the rest.

Some of the remaining networks can be statically allocated to heavy streaming.

Application data are directed dynamically to the least busy network.

7 Nodes run as user-space services / daemons

R10 - Control Messages

1 Standard control messages

New Entity Class: sub entity classes|module configurations

Delete Entity Class: EID

New Entity: EID

Delete Entity: EIID

New Group: GID|parent GIID (if relevant)

Delete Group: GIID

New Module: MID

Delete Module: NMIID

Subscribe to Message: NMTID|GIID|array<MCID|mcid>

Unsubscribe to Message: NMTID|GIID|array<MCID>

Subscribe to Stream: NMTID|GIID|array<SCID|scid|sending pattern>

Unsubscribe to Stream: NMTID|GIID|array<SCID|scid>

Add Membership: GIID|NMTID

Remove Membership: GIID|NMTID

Crank Priority: NMTID|priority

Message Priority: MCID|priority

Stream Priority: SCID|scid|priority

Activate Group: GIID

Deactivate Group: GIID

Activate Entity: EIID

Deactivate Entity: EIID

Activate Module: MIID

Deactivate Module: MIID

Join Entity: MIID|EIID

Leave Entity: MIID|EIID

2 Application-specific control messages can be added

3 Standard notification messages

Entity Class Created: EID

Entity Class deleted: EID

Entity Created: EIID

Entity Deleted: EIID

Group Created: GIID

Group Deleted: GIID

Module Created: NMIID

Module Deleted: MIID

Subscription to Message: NMTID|GIID|array<MCID|mcid>

Unsubscription to Message: NMTID|GIID|array<MCID>

Subscription to Stream: NMTID|GIID|array<SCID|scid>

Unsubscription to Stream: NMTID|GIID|array<SCID>

Membership Created: GIID|NMTID

Membership Deleted: GIID|NMTID

Crank priority Changed: NMTID|priority

Message priority Changed: MCID|priority

Stream priority Changed: SCID|scid|priority

Group Activated: GIID

Group Dectivated: GIID

Entity Activated: EIID

Entity Dectivated: EIID

Module Activated: MIID

Module Dectivated: MIID

Joined Entity: MIID|EIID

Left Entity: MIID|EIID

Node joined: NID

Node left: NID

4 Application-specific notification messages can be added

R11 - Message Sending

1 Messages can be sent in immediate mode

2 Messages can be sent in delayed mode

As a train of messages (carrying the same time stamp).

3 Sending a message can specify a list of destinations

Destinations are node and / or module identifiers. By default no destination has to be specified.

4 Sending a message can specify a time-to-live (TTL)

If the message is in an output queue for more than the specified TTL, the node will discard it. By default, TTL is infinite.

R12 - Message Receiving

1 Message availability is notified to high-priority modules first

2 High priority messages are delivered first

3 Messages carrying a time stamp T0 are all delivered before those carrying T1>T0, even if the latter have higher priorities

4 Control messages are delivered first, for a given time stamp T0

Internal structures are updated before regular messages for T>T0 can be processed.

R13 - Configuration

Configuration denotes the specification of setup and initialization procedures.

1 Configurations are given in XML format

Documentation and comments are handled in the standard XML way.

2 Configurations are modular

I.e. a configuration can #include others.

3 Group configuration

1 Group class
2 Name
3 Parent group

4 Entity configuration

1 Entity class
2 Name
3 Module configurations

5 Module configuration

1 Parameters: pair <name | value>
2 Pointer to binary code: path to the shared object
3 Name
5 Cranks

Names of the entry points in the shared object.

Initial subscriptions

6 Initial location: pair <NID | sticky bit>

Indicates the initial node location. The sticky bit indicates whether or not the module is allowed (or has the ability) to migrate.

7 Initial priority
8 Initial group membership

6 Node Configuration

1 Identifier

It is the developer's responsibility to ensure that node identifiers are unique, are within the node identification range, with no gaps.

2 Time reference capability

7 System Configuration

1 Node configurations
2 Groups configurations
3 Entity configurations

8 Name resolution

Names given in the various configurations are translated into identifiers. To allow so, names must match C++ identifiers (macros), aggregated in a standard file.

R14 - Module Migration

The state and internal data of a module can be transmitted to a target node. On the target node a new instance of the module class is created and initialized with the transmitted data. On the source side, the instance is destroyed. Subscriptions, group membership and entity membership do not change.

This requires that transmissible modules derive from serializable module base classes (provided by the CoreLibrary).

R15 - Plug-ins

1 Plug-ins are loaded at system boot time

2 Plug-in A: Low-level transmission

Allows to customize mBrane with low-level functionalities, like encryption, RDMA, or customized networking protocols (ex: reliable multicast).

3 Plug-in B: Message transmission

Allows to customize mBrane with specific message transmission policies, like message aggregation.

4 Plug-in C: Performance monitoring and optimization

To take advantage of / adapt to the specifics introduced by plug-ins A and B.

5 Plug-in D: Local message routing

i.e. what to do with a sending command / receiving event at the node level.

To take advantage of / adapt to the specifics introduced by plug-ins A and B.

R16 - Dynamic Optimization of the System's Performance

1 The nodes monitor the network traffic, determine and apply the optimal transmission scheme

i.e. broadcast vs point to point. This is especially important for control messages.

Generally, nodes shall issue periodically network status messages: this would allow the application (or the programmer) to relocate modules.

2 The nodes monitor the work load

On their machines; issue work load notification messages. Allows the application to trigger module migration.

3 Performance status is available to modules

This allows modules to tune their output rate and generally, adapt their computation. Ex: streaming modules can decide to drop frames and therefore not to (re)compress them.


Initial List

Subscription-based Routing

All Network Nodes are updated in near-realtime with subscription routing tables.

Module Registration

A Module registers with its local Network Node and all future communication goes through this Node. A Module will always be registered with one and only one Node, but can be moved to another Node at any point in time.

Module Subscription

A Module can change its own subscription or the subscription of another Module. A Module can be subscribed by another module even before it registers. This subscription will not be active until the Module registers and will be deactivated when a Module unregisters.

Module Posting

A Module can post messages via its Network Node. This message can either be treated as a message or as a stream, depending on the module subscription.

Module Groups

Modules can be grouped into named groups and acted upon as a single entity.

Network Nodes

There will generally be one Network Node per computer in the system. All Modules connect to its local Network Node using direct memory communication (shared memory, etc.).

Cranks

A Module will have one or more cranks and zero, one or more cranks can be active or activated at the same time.

Messaging and Streams

(See Module Posting)

Module and Group Control

Ability to activate/deactivate modules by thresholding 2 values (intensity and activation levels), in addition to group-based activation - very easy, big impact. A Module can voluntarily act on a number of control signals, such as Reset, Start, Stop, etc. If a control signal is not handled the default response will be to reply with Control Signal Not Handled.

Module Concurrency

Ability to run many modules simultaneously in one single thread - hard, big impact. Similar to running multiple active cranks within a module at the same time.

Module Migration

Ability to migrate modules (maybe not every kind of modules, but at least the light modules that run together in a thread) - not so hard, big impact. A Module should be able to be moved between Network Nodes easily and with minimal impact. Could be done by asking the module to handle the Control Signals Pause, Save State, Load State, Start.

Module Reflectivity

Reflectivity (internal inputs) - very easy, small impact

Operation Contextualisation

Pregnances / contextualization (optional) of the system operation (as described in mastermind), controlled with an alternate method (instead of neural nets as proposed in mastermind) - hard, small impact

Module Priority

A crank in a Module should run at a provided priority level. This level can be changed by changing the module subscription.

Message Subscription Priority
Data Transmission Priority
System Monitoring
Load Balancing
Time Synchronisation
Performance Profiling
Module Recording and Playback
Swapable Transmission Library

Authorisation, Compression, Encryption

Global Control Semaphores

To allow for global synchronisation in time, ie for simulations with atomic global timesteps, or for a number of Modules to agree to wait for a specific signal. These signals can be triggered by time or by some other conditions and will not be programmed in mBrane - mBrane should just allow for the waiting for a named control signal.

 
projects/mbrane/requirements_features.txt · Last modified: 2008/03/13 16:48 by eric
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki