Software component architectures for streaming media


I am working on several papers, and a new training class, explaining software component architectures especially in relation to streaming media and DSP. This is interesting and I am gaining some valuable new insights into these topics.

Software component architectures let you build systems by connecting pre-existing components. A software component is a piece of code that is re-usable in many applications: extending the idea of re-usable software functions to cover larger blocks of code but also letting the components be deployed and version-controlled independently of the applications that use them.

The aim is re-use instead of re-invention: to make software components that, like hardware components, can be used again and again, interchanged and relied on. This is a difference between components and objects: objects try to correspond to a reasonably clear mental model of the actual objects that make up the system, and so encourage us to design objects that do make sense in this way. But components acknowledge that it is good to re-use a piece of code, and that it can be useful even if it is not very clearly related to some easily drawn 'part' of the system - so components are more pragmatic and in fact pessimistic (they acknowledge that it costs more to make a new and better component, and so that it is often worth re-using one that works even if it could be improved).

Streaming media decompose readily into components: we can draw block diagrams that show data flowing between the blocks (the components). For example the MPEG-4 encoder shown above is decomposed into components for: video input; multiplexing; scaling; mixing with text overlays; MPEG-4 encoding; and storage or transmission. Some components may in fact be 'real' hardware components that are surrounded by software 'wrappers': for example the video mixer could be a dedicated hardware co-processor. Many or all of these blocks are obviously re-usable in many possible applications.

The MPEG-4 example block diagram shows another characteristic: the flow of data is in one direction (left to right) in a fairly simple path. This is typical of 'streaming media' systems - data flows in a continuous stream, through components that affect the data as it passes through them. Such an architecture is sometimes called a 'filter and pipe': thinking of the components as filters and the connections as pipelines. Streaming media tends to require buffering so that a component can continue to produce data even though a receiving component may not yet be ready for it: the "pipeline" model acknowledges this - a pipeline can be filled with stuff that is between components and is ready when the receiving component does need it.

These characteristics of streaming media systems lead to the idea that systems can be composed from independent, re-usable black box components that are connected to process data that flows through them - and this is the base for component architectures and the design choices they imply.

Comments

Popular posts from this blog

Early Years

Wave Watching

Bread and cocktails