Pipes and Filters

Pipes and Filters

Das Pipes-and-filters-Muster ist ein Architekturmuster aus dem Bereich der Softwareentwicklung. Es beschreibt die Struktur für Systeme, die Datenströme verarbeiten.

Schematischer Aufbau des Pipes-and-filters-Musters

Aufbau

Das Bild stellt schematisch ein System dar, das auf dem Pipes-and-filters-Muster basiert. Das System wird durch mehrere unabhängige Einheiten strukturiert:

  • Filter: Ein Filter ist ein Verarbeitungsschritt. Jeder Filter hat eine Dateneingabe und eine Datenausgabe. In jedem Verarbeitungsschritt werden die einkommenden Daten umgewandelt. Bei der Umwandlung können den Daten Teile entnommen, hinzugefügt oder auch vollständig ersetzt werden. Die Art der Umwandlung wird durch den Filter bestimmt.
  • Pipes: Eine Pipe stellt eine Verbindung zwischen den einzelnen Verarbeitungsschritten dar. Der Name lässt sich durch den englischen Begriff für Kanäle (pipes) herleiten.

Im dargestellten Bild ist ein System schematisch dargestellt, bei dem die Daten links ankommen (Dateneingabe) und in mehreren Schritten verarbeitet werden. Das Ergebnis des Gesamtsystems wird rechts wieder ausgegeben (Datenausgabe). Der Ausgang eines Verarbeitungsschrittes ist gleichzeitig der Eingang des nachfolgenden Verarbeitungsschrittes. Das Ergebnis des Systems ist somit abhängig von der Eingabe; der Abhängigkeitsgraph ist linear.

Die Verarbeitungsschritte können immer wieder neu angeordnet werden. Stehen beispielsweise 3 verschiedene Filter zur Verfügung, so können daraus 15 verschiedene Systeme gebildet werden:

  • 3-Schrittsysteme: {1,2,3} {1,3,2} {2,1,3} {2,3,1} {3,1,2} {3,2,1}
  • 2-Schrittsysteme: {1,2} {1,3} {2,1} {2,3} {3,1} {3,2}
  • 1-Schrittsysteme: {1} {2} {3}

Diese 15 Systeme können auch als eine „Familie“ verwandter Systeme bezeichnet werden.

Durch diese Architektur ergeben sich einige Vorteile:

  • Systemerweiterungen sind durch Austausch oder Erneuerung von Filtern möglich.
  • Wird ein Filter als Komponente eines Systems betrachtet, so ist das System leichter an unterschiedliche Kontexte anzupassen, als wenn das System aus einer einzigen großen Komponente bestünde.

Varianten

Eine Variante des Pipes-and-filters-Musters ist das Tee-and-join-Pipeline-System.[1] Hier einige Unterschiede:

  • Es sind mehrere Ein- und Ausgabekanäle pro Filter erlaubt. Dadurch können auch verschiedene unabhängige Datenströme in Abhängigkeit zueinander verarbeitet werden.
  • T-Filter oder auch T-Pipes ermöglichen das Aufteilen eines Datenstroms, oder umgekehrt, das Zusammenführen zweier Datenströme. Die zwei Datenströme können daraufhin in unterschiedlicher Weise parallel weiter verarbeitet werden.
  • Datenschleifen sind erlaubt: Die Ausgabe eines Filters kann wieder zurückgeführt werden als Eingabe einer vorhergehenden Filtereinheit. Informationen, die in den Eingabedaten enthalten sind, können somit erneut verarbeitet werden. Dadurch ist es insbesondere möglich, nicht lineare Systeme zu bilden.

Einzelnachweise

  1. Buschmann, Frank et al: Pattern-orientierte Softwarearchitektur – Ein Pattern System. Addison-Wesley (Deutschland) GmbH, 1. korr. Nachdruck 2000

Wikimedia Foundation.

Игры ⚽ Поможем написать реферат

Schlagen Sie auch in anderen Wörterbüchern nach:

  • Pipes und Filter — Das Pipes und Filter (engl pipes and filters) Muster ist ein Architekturmuster aus dem Bereich der Softwareentwicklung. Es beschreibt die Struktur für Systeme, die Datenströme verarbeiten. Schematischer Aufbau des Pipes und Filter Musters Aufbau… …   Deutsch Wikipedia

  • District of Columbia Water and Sewer Authority — The District of Columbia Water and Sewer Authority (DC Water) provides drinking water, sewage collection and wastewater treatment in Washington, D.C., USA. DC Water also provides wholesale wastewater treatment services to several adjoining… …   Wikipedia

  • Mold growth, assessment, and remediation — Mold assessment and mold remediation are techniques used in occupational health: mold assessment is the process of identifying the location and extent of the mold hazard in a structure, and mold remediation is the process of removal and/or… …   Wikipedia

  • Mathematics and Physical Sciences — ▪ 2003 Introduction Mathematics       Mathematics in 2002 was marked by two discoveries in number theory. The first may have practical implications; the second satisfied a 150 year old curiosity.       Computer scientist Manindra Agrawal of the… …   Universalium

  • Ground and neutral — For uses of the term ground or earth in electricity but not in the context of mains wiring, see ground (electricity). Since the neutral point of an electrical supply system is often connected to earth ground, ground and neutral are closely… …   Wikipedia

  • List of Doctor Who universe creatures and aliens — This is a list of fictional creatures and aliens from the universe of the long running BBC science fiction television series Doctor Who, including Torchwood, The Sarah Jane Adventures and K 9. It covers alien races and other fictional creatures,… …   Wikipedia

  • Pipeline (Unix) — In Unix like computer operating systems, a pipeline is the original software pipeline : a set of processes chained by their standard streams, so that the output of each process ( stdout ) feeds directly as input ( stdin ) of the next one. Each… …   Wikipedia

  • Pipeline (software) — In software engineering, a pipeline consists of a chain of processing elements (processes, threads, coroutines, etc .), arranged so that the output of each element is the input of the next. Usually some amount of buffering is provided between… …   Wikipedia

  • Component-based software engineering — A simple example of two components expressed in UML 2.0. The checkout component, responsible for facilitating the customer s order, requires the card processing component to charge the customer s credit/debit card (functionality that the latter… …   Wikipedia

  • FIFO — is an acronym for First In, First Out, an abstraction in ways of organizing and manipulation of data relative to time and prioritization. This expression describes the principle of a queue processing technique or servicing conflicting demands by… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”