Software Architectural Patterns in a nutshell

Photo by Gaelan Andrade Booker on Unsplash

Layered pattern

Application is splittered horizontally into layers so that a request from request to database will go through all the layers.

  • Presentation layer (also known as UI layer)
  • Application layer (also known as service layer)
  • Business logic layer (also known as domain layer)
  • Data access layer (also known as persistence layer)

Client-server pattern

This pattern consists of two parties; a server and multiple clients. The server component will provide services to multiple client components.

Master-slave pattern

This pattern consists of master and slaves. The master component distributes the work among identical slave components, and computes a final result from the results which the slaves return. Ex: DB replication.

Pipe-filter pattern

This pattern can be used to process a stream of data. processing is enclosed within a filter component. Data is passed through pipes for buffering or for synchronization purposes.

Broker pattern

A broker component is responsible for the coordination of communication among components in distributed systems with decoupled components. Ex: Kafka

Peer-to-peer pattern

In this pattern, individual components are known as peers. Peers may function both as a client, requesting services from other peers, and as a server, providing services to other peers. Ex: Torrent, blockchain

Event-bus pattern

This pattern primarily deals with events and has 4 major components; event source, event listener, channel and event bus. Sources publish messages to particular channels on an event bus. Listeners subscribe to particular channels. Listeners are notified of messages that are published to a channel to which they have subscribed before.

Model-view-controller pattern (MVC)

Divides an interactive application in to 3 parts as,

  1. model — contains the core functionality and data
  2. view — displays the information to the user
  3. controller — handles the input from the user

Blackboard pattern

This pattern is useful for problems which has no deterministic solution strategies. It has 3 main components.

  • blackboard — a structured global memory containing objects from the solution space
  • knowledge source — specialized modules with their own representation
  • control component — selects, configures and executes modules.

Interpreter pattern

This pattern is used for designing a component that interprets programs written in a dedicated language. It mainly specifies how to evaluate lines of programs, known as sentences or expressions written in a particular language. Ex: SQL




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nuwan Zen

Nuwan Zen

Sometimes A software Engineer, sometimes a support engineer, sometimes a devops engineer, sometimes a cloud engineer :D That’s how the this life goes!