Software architecture#

What is software architecture?#

Software architecture refers to the fundamental structures of a software system and the discipline of creating such structures and systems. Each structure comprises software elements, relations and properties of both elements and relations.

Software architecture is usually represented with a model.

Architecture model#

Architecture modeling have the following characteristics:

Architectural points of view#

Architecture can be defined from physical or logical point of view.

Physical architecture#

Physical elements for software execution:

Logical architecture#

Software components. Group the different functionalities.

Mixed architecture#

It is also usual to represents both together: physical as tiers, logical as layers.

Mixed architecture

Architecture layers#

Each architecture layer, has a specific purpose.

Presentation layer#

Business layer#

Data layer#

Abstracts the logic needed to access the DB.

Service layer#

Architecture scalability#

Scalability is how increased data usage and growth affects performance.

It is important:

There are two ways of scaling a system: vertical or horizontal scaling.

Vertical scaling#

Adding more power to the machine hosting the system

Horizontal scaling#

Creating system clones and load balancing. Balancing can be done by hardware or software.

Hardware balancing#

Different requests from the same user can be handled by different clones.

Based on routing, tunneling or IP translation.

Software balancing#

All requests from a user are served by the same clone.

Done by inspecting HTTP packets to maintain the user session in the same machine.

Architecture patterns#

They describe a general solution to a design problem that is frequently encountered.

More about architecture patterns here.

Architectural modeling in UML#

Components diagram#

A component diagram is composed of software components.

A software component is a composition unit with all its interfaces and context dependencies explicitly defined.

Components properties#

Deployment diagram#

Shows the communication topology of a distributed system.

It is the highest level diagram in UML.

Deployment diagram

The use of visual stereotypes allows a particularized representation of the deployment diagram.

Itranet