Docsity

Multi-Layer and Distributed Architectural Patterns in Software Engineering, Slides of Banking and Finance

Partial preview of the text

Download Multi-Layer and Distributed Architectural Patterns in Software Engineering and more Slides Banking and Finance in PDF only on Docsity!

Component diagrams

Deployment diagrams

The Multi-Layer architectural pattern

In a layered system, each layer communicates only with the layer immediately below it.

  • Each layer has a well-defined interface used by the layer immediately above. —The higher layer sees the lower layer as a set of services.
  • A complex system can be built by superposing layers at increasing levels of abstraction. —It is important to have a separate layer for the UI. —Layers immediately below the UI layer provide the application functions determined by the use-cases. —Bottom layers provide general services. - e.g. network communication, database access

Example of multi-layer systems

The multi-layer architecture and design

principles

  1. Increase reuse : You can often reuse layers built by others that provide the services you need.
  2. Increase flexibility: you can add new facilities built on lower-level services, or replace higher-level layers.
  3. Anticipate obsolescence : By isolating components in separate layers, the system becomes more resistant to obsolescence.
  4. Design for portability : All the dependent facilities can be isolated in one of the lower layers.
  5. Design for testability : Layers can be tested independently.
  6. Design defensively : The APIs of layers are natural places to build in rigorous assertion-checking.

The Client-Server and other distributed

architectural patterns

  • There is at least one component that has the role of server , waiting for and then handling connections.
  • There is at least one component that has the role of client , initiating connections in order to obtain some service.
  • A further extension is the Peer-to-Peer pattern. —A system composed of various software components that are distributed over several hosts.

The distributed architecture and design

principles

  1. Divide and conquer : Dividing the system into client and server processes is a strong way to divide the system. —Each can be separately developed.
  2. Increase cohesion : The server can provide a cohesive service to clients.
  3. Reduce coupling : There is usually only one communication channel exchanging simple messages.
  4. Increase abstraction : Separate distributed components are often good abstractions.
  5. Increase reuse : It is often possible to find suitable frameworks on which to build good distributed systems —However, client-server systems are often very application specific.

The distributed architecture and design

principles

  1. Design for flexibility : Distributed systems can often be easily reconfigured by adding extra servers or clients.
  2. Design for portability : You can write clients for new platforms without having to port the server. 10 Design for testability : You can test clients and servers independently.
  3. Design defensively : You can put rigorous checks in the message handling code.

Example of a Broker system

The broker architecture and design

principles

  1. Divide and conquer : The remote objects can be independently designed.
  2. Increase reusability : It is often possible to design the remote objects so that other systems can use them too.
  3. Increase reuse : You may be able to reuse remote objects that others have created.
  4. Design for flexibility : The brokers can be updated as required, or the proxy can communicate with a different remote object.
  5. Design for portability : You can write clients for new platforms while still accessing brokers and remote objects on other platforms.
  6. Design defensively : You can provide careful assertion checking in the remote objects.