6.3 Repository, Client Server and Pipe N Filter Architecture
6.3 Repository, Client Server and Pipe N Filter Architecture
ARCHITECTURE
CSE470 slide presented by
A.M.ESFAR-E-ALAM
AFRINA KHATUN
DR.ZAVID PARVEZ
HOSSAIN ARIF
01 02
REPOSITORY PATTERN CLIENT SERVER PATTERN
03 04
PIPE AND FILTER PATTERN Advantages and Disadvantages
REPOSITORY
PATTERN
REPOSITORY
Before going into repository design pattern lets first understand
what is repository:
In generic terms repository simply means a place where things
are or can be stored.
This term has wide array of use in computer science for example
code repository.
We are all familiar with GITHUB. it’s a code repository
DEFINING REPOSITORY
PATTERN
So now we have a idea of what repository means lets think
how that is connected to software architecture:
Here we will have multiple sub systems.
Sub-systems must exchange data. This may be done in two
ways:
• Shared data is held in a central database
or repository and may be accessed by all
sub-systems;
• Each sub-system maintains its own
database and passes data explicitly to
other sub-systems.
When large amounts of data are to be shared, the
repository model of sharing is most commonly used
as this is an efficient data sharing mechanism.
SO lets define repository pattern formally
● “A Repository mediates between the domain and data mapping layers, acting like an in-
memory domain object collection. Client objects construct query specifications
declaratively and submit them to Repository for satisfaction. Objects can be added to and
removed from the Repository, as they can from a simple collection of objects, and the
mapping code encapsulated by the Repository will carry out the appropriate operations
behind the scenes.”
—FORMAL DEFINITION
EXAMPLE!
Lets think you are developing an IDE like ’eclipse’.What will
you have there:
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.
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.
When used Commonly used in data processing applications (both batch- and transaction-based)
where inputs are processed in separate stages to generate related outputs.
Disadvantages • The format for data transfer has to be agreed upon between communicating
transformations.
• Each transformation must parse its input and unparse its output to the agreed
form.
• This increases system overhead and may mean that it is impossible to reuse
functional transformations that use incompatible data structures.
Thank you Read supplementary slides
More Reading:
https://towardsdatascience.com/10-common-software-architectural-patterns-in-a-
nutshell-a0b47a1e9013