1 / 14

Seminar on Component-based Software Engineering

Seminar on Component-based Software Engineering. Component Coordination Nadia Ramjiawan LIACS - Leiden University Fall 2005. Component.

toby
Download Presentation

Seminar on Component-based Software Engineering

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Seminar on Component-based Software Engineering Component Coordination Nadia Ramjiawan LIACS - Leiden University Fall 2005

  2. Component • Every component instance contains one or more active entities (thread of control). • The active entities inside a component C can communicate with the active entities in other components only through I/O operations performed on the channel ends connected to C.

  3. Channels • The only primitive medium of communication between two components. • A channel has exactly two ends. • A channel end is either: • Source: accepts data into its channel. • Sink: dispenses data out of its channel. • Example: ab represents the channel with source end a and sink end b. • Although every channel has exactly two ends, these ends can be of the same or different types (two sources, two sinks, or one source and one sink). • Various kinds of channel are possible, offering different synchronisation, buffering, lossy and even directionality policies. • Channel I/O Operations • Read/write data items from /to their channel ends.

  4. Abstract Behavior Type (ABT) Model • An ABT defines an abstract behavior as a relation among a set of timed-data-streams, without specifying any detail about: • the operations that may be used to implement such behavior • or the data types it may manipulate for its realization. • A timed data stream is atwin pair of streams consisting of a data stream and a time stream with the interpretation that ∀i≥0, the data item appears at its corresponding time moment • Used to model the data flow through channel ends.

  5. ABT Examples • Basic channels • Synchronous channel : • Asynchronous unbounded FIFO channel : • Asynchronous FIFO channel with the bounded capacity of 1:

  6. ABT Examples (II) • Asynchronous FIFO channel with the bounded capacity of 1 and initially contain the data item D : • Synchronous drain channel: • Two source ends, cannot produce any data items. • Every data item is lost

  7. Merge and Replicate • The merger ABT is defined as: • The replicator ABT is defined as:

  8. Reo • The ABT model is too low level to provide non-trivial coordination, an effective exogenous coordination model is needed. • Reo is a channel-based exogenous coordination model wherein complex coordinators, called connectors are compositionally built of simpler ones. • The simplest connectors in Reo are channels. • A connector is a set of channel ends and their connecting channels organized in a graph of nodes and edges(channels) such that: • Zero or more channel ends coincide on every node. • Every channel end coincides on exactly one node. • There is an edge between two nodes if and only if there is a channel one end of which coincids on each of those nodes. • Powerful mechanism for connector construction: channel composition.

  9. Nodes • Reo defines three types of nodes • Source nodes: Src(N) ≠ ø ∧ Snk(N) = ø • Src(N) and Snk(N): sets of source and sink channel ends coincide on N, respectively. • A source node replicates every data item written to it as soon as all of its coincident source channel ends can consume that data item • Sink nodes: Src(N) = ø ∧ Snk(N) ≠ ø • non-deterministically selects one of the data items available through its coincident sink channel ends • Mixed nodes: Src(N) ≠ ø ∧ Snk(N) ≠ ø • Combines the behavior of a sink node and a source node. • Every time a data item is available through its coincident sink channel ends it non-deterministically selects an appropriate data item and replicates that data item into all of its coincident source channel ends.

  10. Nodes (II) • Node I/O operations: • read and take can be done only on sink nodes • write can be done on source nodes • They can not be done on mixed nodes • A component can write to a source node and read from a sink node only if it is connected to that node • Components don’t read from or write to mixed nodes.

  11. Examples of connectors in Reo • Write-Cue Regulator • Channels ab and cd are of type Sync and ef is of type Syncdrain • Barrier Synchronizer • The four channels ab, cd, gh, ij are all of type Sync and ef is of type Syncdrain • Can be extended trivially

  12. Example of connectors in Reo (II) • Ordering • The channels ab and ac are Syncdrain and Sync, respectively and bc is of type FIFO1. • Coordination pattern c = (ab)* • Sequencer • The enclosing box represents the fact that the details of this connector are abstracted away: the topology inside the box is immutable • Inside the connector, four Sync, a FIFO1(o), and three FIFO1 channels are connected together.

  13. Utility of the Sequencer • Two-node sequencer • Coordination pattern c = (ab)* • Three-node sequencer • Coordination pattern c = (aab)*

  14. Questions ?

More Related