Page 176 -
P. 176
6.3 Architectural patterns 159
Web Browser Interface
LIBSYS Forms and Print
Login Query Manager Manager
Distributed Document Rights Accounting
Search Retrieval Manager
Library Index
Figure 6.7 The DB1 DB2 DB3 DB4 DBn
architecture of the
LIBSYS system
6.3.2 Repository architecture
The layered architecture and MVC patterns are examples of patterns where the view
presented is the conceptual organization of a system. My next example, the
Repository pattern (Figure 6.8), describes how a set of interacting components can
share data.
Figure 6.8 The The majority of systems that use large amounts of data are organized around a
repository pattern shared database or repository. This model is therefore suited to applications in which
Name Repository
Description All data in a system is managed in a central repository that is accessible to all system
components. Components do not interact directly, only through the repository.
Example Figure 6.9 is an example of an IDE where the components use
a repository of system design information. Each software tool generates information which
is then available for use by other tools.
When used You should use this pattern when you have a system in which large volumes of
information are generated that has to be stored for a long time. You may also use it in
data-driven systems where the inclusion of data in the repository triggers an action
or tool.
Advantages Components can be independent—they do not need to know of the existence of other
components. Changes made by one component can be propagated to all components. All
data can be managed consistently (e.g., backups done at the same time) as it is all in one
place.
Disadvantages The repository is a single point of failure so problems in the repository affect the whole
system. May be inefficiencies in organizing all communication through the repository.
Distributing the repository across several computers may be difficult.