Skip to content

Architectures & System Designs

References

Tools

Articles

Clean Architecture

img img img img img

Microservices

Microservices are an architectural approach to creating applications. What differentiates microservices architecture from traditional monolithic approaches is how it breaks down the application into basic functions. Each function is called a service and can be created and deployed independently. This means that each individual service can work or fail without compromising the others.

img

Think about the last time you visited a store’s website. You’ve probably used the site’s search bar to search for products. This research represents a service. You may also have seen related product recommendations pulled from a database of shoppers’ preferences. This is also a service. Have you added any items to the shopping cart? That’s right, this is another service.

img img

What are the benefits of microservices architecture?

Twelve Factor App

Caching

img

MVC, MVP, MVVM and VIPER Patterns

img

Distributed Systems

In short, the Bitcoin blockchain is an excellent example of a distributed system, combining decentralization, consensus, security, and immutability to create a robust and reliable system for recording financial transactions.

img

Message Queues

img img

Load Balancer

In summary, a Load Balancer is an essential tool for efficiently distributing traffic across multiple servers, ensuring that services are fast, reliable, and scalable.

img img

Round Robin

The Round Robin algorithm is a simple and efficient method of process management in operating systems and networks. Let’s understand it in two main areas:

In short, the Round Robin algorithm is a fair and simple way to manage processes or distribute tasks, whether in an operating system or in a network environment, ensuring that everyone receives attention equitably.

Horizontal Scaling

In summary, Horizontal Scaling is a powerful strategy for increasing the capacity and resilience of software systems, especially useful for applications that need to handle large volumes of traffic and high availability.

img

UML - Unified Modeling Language

It is a notation language (a way of writing, illustrating, communicating) for use in systems projects.

This language is expressed through diagrams. Each diagram is made up of elements (graphic shapes used for drawings) that are related to each other.

UML diagrams are divided into two large groups: structural diagrams and behavioral diagrams.

Structural diagrams should be used to specify details of the system structure (static part), for example: classes, methods, interfaces, namespaces, services, how components should be installed, what the system architecture should be like, etc.

Behavioral diagrams should be used to specify details of the system’s behavior (dynamic part), for example: how functionalities should work, how a business process should be handled by the system, how structural components exchange messages and how they respond to calls etc.

“João wants A, explains to the team something “similar” to B. Marcos understands that João wants C, and explains to Claudia that he should do D. Claudia makes a “D that looks more like an E”, and delivers a “half E” for João. And João wanted an A…”

img

UML is like a universal language for software production professionals, it is a “Google Translate” that greatly helps clear and objective communication between people involved in the production process (Business Analysts, Product Owner, Scrum Master, Architects , Developers, Project/Product Managers and other interested parties). The objective of a UML diagram is to convey a message in a standardized way, where all recipients of this message understand the pattern used. It’s the famous: “Do you understand or do you want me to draw?”

Imagine that in the same room, without internet or telephone, there are three people who only speak their native language: a Chinese, a French, and a Brazilian.

In this room there is only paper and pencil. The Frenchman wants a coffee.

What will be the most efficient way, considering the resources available in the room, for the French person to convey the message “I want a coffee”?

Maybe drawing a picture of a cup of coffee!

Making this clear, in a simple, objective, transparent and pragmatic way, is communicating well.

Taking the above reasoning to software projects, UML must be used to communicate what you want and/or how you want, in an efficient way.

Domain Driven Design

Domain-Driven Design (DDD) is a software development approach that brings together a set of concepts, principles and techniques that focus on the domain and domain logic with the objective of creating a Domain Model or (domain model).

Using DDD means developing software according to the domain related to the problem we are proposing to solve.

Note: In this context, domain is what the software program models and the problem it proposes to solve = business rules.

Knowing the domain is fundamental and creating a model and adopting an application architecture that best reflects the concepts of the domain is not an easy task nor a task only for the analyst.

DDD suggests a standard architecture so that we can focus on the domain.

The following is a suggestion for a layered architecture that can be used in the domain model

img

User Interface - Presents information to the user and interprets their commands. Application - Layer that coordinates application activity. Does not contain business logic. Domain - Contains information about the domain. It’s the heart of the business. Infrastructure - Acts as a support library for the other layers. Performs communication between layers. Implements the persistence of business objects.

The focus of the approach is to create a domain that “speaks the language” of the user using what is known as a Ubiquitous language.

Ubiquitous language (common language) means that when working with DDD we must speak using the same language, in a single model, so that it is understood by the client, analyst, designer, designer, tester, manager, etc. in this language, which would be the language used in everyday life.

What are the advantages of using DDD?

Remember, you don't have to go around applying (trying to apply) DDD to all types of projects.

CAP Theorem

Also called Brewer’s Theorem, it states that it is impossible that distributed data storage simultaneously provides more than two of the following three guarantees:</pca

No distributed system is protected from network failures, so partition must generally be tolerated. In the presence of partitions, two options are given: consistency or availability.

When choosing consistency over availability, the system will return an error or timeout if specific information cannot be guaranteed to be updated due to its sharing on the network.

When choosing availability over consistency, the system will always process the query and attempt to return the most recent available version of the information, even if it cannot guarantee that it is up to date due to partitions.

Super short version: databases can only choose 2 of the 3 elements. It is mathematically impossible to have all 3.


img