Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

What are the pros and cons of different software architectures?

Syed Muhammad Ali Mustafa

Software architecture identifies the major components of the system and the means of their communication. The following are different software architectures and their respective pros and cons.

Data-flow architectures

In data-flow architecture, data enters the system, and then a series of transformations are applied to the input data before getting the output. The system transfers the data with the help of pipesa pipe is the connector that passes data from one filter to the next and transforms the data using filtersfilter transforms the data it receives via the pipes with which it is connected. There are two types of sequences of executions between modules:

  • Batch sequential
Batch sequential
  • Pipe and filter
Pipe and filter

Pros

  1. It provides modularity in the code.
  2. The same filters can be reused to create different configurations, which allows for reusability.
  3. Parallel processing can be done in the pipe and filter architecture.

Cons

  1. It is not suitable for interactive applications since the output is obtained after a series of transformations.
  2. Extra filters may be needed to make independent components compatible with one another: i.e., to transform the output of one component to make it compatible with the input of the next.
  3. If components are not designed independently, it may lead to tight data couplingThe dependence of a software component on data that is not exclusively under the control of that software component..

Call and return architectures

Call and return architectures are the most dominant architectures since the inception of software development. They decompose the main program into a number of program components which, in turn, may invoke other program components.

Call and return architecture

Pros

  1. They enable code modularity.
  2. They are easy to scale and modify.

Cons

  1. If interfaces are not well-defined, it may lead to tight data coupling.
  2. If internal data structures change, it may result in ripples to other modules.

Data-centered architectures

In data-centered architectures, shared data is held in a central repository and can be accessed, modified, deleted, or updated by any subsystem.

Data-centered architecture

Pros

  1. An efficient way to share large amounts of data.
  2. Components can be independent.
  3. Data is more secure.
  4. All data can be managed consistently, i.e., centralized backup.
  5. It promotes integrability, i.e., easy to add/remove agents.

Cons

  1. There is a single point of failure.
  2. Agents are highly dependent on the data structures of the data store.
  3. The evolution of data is costly and difficult.
  4. Subsystems must agree on a data model, i.e., an inevitable compromise.
  5. The problem handling of the synchronization of multiple agents.

Layered architectures

In layered architectures, the system is designed in a stack of layers. Each layer hides the layers below it. The functionality of a system is organized into layers, with each layer only dependent on the layer below it.

Layered architecture

Pros

  1. It supports incremental development.
  2. It allows the replacement of layers as long as the interface of the layer does not change.
  3. A series of layers can help partition complex problems.
  4. It is secure.
  5. The application is portable.
  6. Layers can be reused.

Cons

  1. Clean separation between layers is hard to achieve.
  2. Multiple layers of processing may lead to the degradation of performance.
  3. It is difficult to structure some systems into layers.

Client-server architectures

In client-server architectures, the system is divided into the following two components:-

  • Client
  • Server

The server component is the service provider while clients are the service requesters.

Client-server architecture

Pros

  1. It enables a distributed architecture to be employed.
  2. It provides ease in adding new servers or updating the existing ones.
  3. Supports parallel implementation.
  4. This architecture is secure.
  5. It is easily accessible irrespective of the platform or the location.

Cons

  1. Management problems if servers are owned by others.
  2. Performance depends on the system and the network thus, performance is unpredictable.
  3. Servers may get overloaded with requests.
  4. Single point of failure, which means if the main server fails, the whole system will be down.

Peer-to-peer architectures

In peer-to-peer architecture, each component acts as both a client and a server, with no node having more importance than the other.

Peer-to-peer architecture

Pros

  1. It is easy to scale.
  2. Highly tolerant of failures.
  3. It does not require an expensive network operating system (OS).

Cons

  1. It is not secure.
  2. Data cannot be centrally backed up.
  3. Resources are not organized into some specific shared storage.
  4. It may provide slow performance.

RELATED TAGS

CONTRIBUTOR

Syed Muhammad Ali Mustafa
Copyright ©2022 Educative, Inc. All rights reserved
RELATED COURSES

View all Courses

Keep Exploring