Chapter 7 - Architecture Flashcards
(38 cards)
software architecture
architecture is concerned with high-level design. Thus, the focus shifts from the organization and interfaces of individual classes to larger units, such as packages, components, modules, subsystems, layers, or services
It considers that architecture is not just a set of modules but a set of decisions. Among these decisions, the definition of the main modules of the system is undoubtedly included. However, other decisions are also considered, such as the choice of programming language and the database used by the system.
Architectural patterns
propose a high-level organization for software systems, including their key modules and the relations between them
architectural styles
propose that the modules of a system should be organized in a certain way without necessarily aiming to solve a specific problem.
monolithic architecture
all operating system functions, such as process management, memory management, and file systems, are implemented in a single executable file running in supervisor mode
microkernel architecture
the kernel handles only the most basic system functions, and the other functions run as independent processes outside the kernel
Layered architecture
classes are organized into modules called layers. The layers are arranged hierarchically, resembling a cake.
a layer can only use services—meaning it can call methods, instantiate objects, extend classes, declare parameters, throw exceptions, etc.—from the layer immediately below it.
mainframes
physically large and expensive computers
Three-Tier Architecture
a distributed architecture. This means that the user interface layer runs on clients’ machines, the business logic layer runs on a server (often called an application server), and the database tier operates on a separate database server.
User Interface
Also known as the presentation layer, it is responsible for all user interaction, handling the display of data, and processing inputs and interface events such as button clicks and text highlighting.
Business Logic
Also known as the application layer, it implements the system’s business rules
Database
This layer stores the data manipulated by the system
two-tier architectures
the user interface and business logic layers are combined into a single layer, which runs on the client. The second layer is the database. The disadvantage of such architectures is that all processing occurs on the clients, which therefore must have more computational power.
MVC (Model-View-Controller)
for the implementation of graphical interfaces. Specifically, MVC defines that the classes of a system should be organized into three groups:
View
Classes responsible for implementing the system’s graphical interface, including windows, buttons, menus, scroll bars, etc.
Controller
Classes that handle events generated by input devices, such as the mouse and keyboard. As a result of such events, the Controller can request changes in the state of the Model or the View.
Model
Classes that store the data manipulated by the application and related to the system’s domain.
Single Page Applications (SPAs)
At loading time, SPAs load all their code into the browser, including HTML pages, CSS files, and JavaScript code.
microservices
groups of modules now run as separate processes, without sharing memory
horizontal scalability
When a monolith faces performance issues, one solution is to replicate the system on different machines
cloud computing
With these platforms, organizations no longer need to purchase and maintain hardware and basic software, such as operating systems, databases, and web servers. Instead, they can rent virtual machines on a cloud platform and pay per hour of machine usage. This approach facilitates horizontal scaling of microservices by adding new virtual machines.
Conway’s Law
suggests that companies tend to adopt software architectures that mirror their organizational structures.
message queue
Clients act as message producers; that is, they insert messages into the queue. Servers act as message consumers; that is, they retrieve messages from the queue and process the information contained in them. A message is a record (or an object) with a set of values. The message queue is a FIFO-type structure
asynchronous
once the information is placed in the queue, the client is free to continue its processing
Space decoupling
Clients do not need to know the servers, and vice versa. In other words, the client is an information producer but does not need to know who will consume this information.