Architecture · Software

Pipes and Filters

Pipe and filter architecture, which is a type of data flow architecture. Data flow architecture considers a system as simply a series of transformation on sets of data. Data is transformed from one form to another using different types of operations. A pipe and filter architecture has independent entities called filters which perform transformations on data input they receive, and pipes, which serve as connectors for the stream of data being transformed. 

PIpeAndFiltersDiagram.png
THe Pipe and Filter diagram

The changes to the data are done sequentially from filter to filter. Each filter performs its local transformation on the data input it receives from the previous pipe and then it sends the output onto the next pipe.

Continue reading “Pipes and Filters”
Architecture · Software

State Transition Systems

  • State. The information that a system remembers defines its state. For example, a queue system can be in a number of different “states”: an empty state, a queued state, or a full state.
  • Transition. A transition is used to describe the change of a system from one state to another. A single system state can have multiple transitions; majority of systems today will have multiple transitions branching from one system state. This makes behaviors non-deterministic, since we cannot predict what the next state of the system will be.
  • Behavior. The behavior of a system describes what the system will do when exposed to a condition, which can vary from timed system events to user input.

State transition systems can be thought of as directed graphs. Each node of the graph represents the set of states, and each edge of the graph represents the set of transition. We can determine how a system reaches a specific state by simply traversing the graph.

State TransitionsSystemDiagram.png
State transition system for a queue

State transition systems can help us understand how parallel processing, multithreading, or distributed computing can affect the overall state of our system. Do we need to wait for another process to finish its work before continuing? At which junction of our system will we be bottlenecked?

In addition, state transition systems can help us identify deadlocks. A deadlock occurs when a process is waiting indefinitely for another to release a shared resource or complete its work. A state transition system can help you easily identify deadlocks since they occur if there is a condition that prevents a transition out of particular state.

Architecture · Software

Client Server n-Tier

Another name of the n-Tier is Multitier. Tiers often refer to components that are on different physical machines. The number of tiers varies quite a bit, 3- and 4-tier architectures are quite common, but any number is possible. So this architecture is called n-Tier or a Multitier.

The relationship between 2-Tiers in an n-Tier architecture is often a client/server relationship. The server side provides services. This could be storing information in a database, performing computation tasks, any sort of service. The client-side requests these services through messages. The communication between the two sides is called Request-Response. A tier can act as both a server and a client, simultaneously fulfilling the requests of its clients and making requests of its servers.

2-Tier Architecture (Client Tier and Data Tier):

nTierDiagram.png
2-Tier example.
Continue reading “Client Server n-Tier”
Architecture · Software

Repository-based Systems: Databases

Data-Centric Software Architecture helps to increase the maintainability, reusability, and scalability of a system. There are 2 types of components:

  1. Central Data – the component used to store and serve data across all components that connect to it.
  2. Data Accessors – the components that connect to the central data component. The data accessors make queries and transactions against the information stored in the database.
Data Accessors.png

The data accessors are separated from one another and communicate only to the central data component. The central data facilitates data sharing by saving the desired information from the current state of the system and serving data as requested.

Continue reading “Repository-based Systems: Databases”