Understanding Web Application and Software Architecture ( Go step by step thru the different concepts, functions, and components involved in architecting a web application) Flashcards

1
Q

The different tiers in software architecture:

  1. What is a tier?
  2. Why do software applications have different tiers?
  3. How do I decide how many tiers my application should have?
A
  1. A tier is a logical separation of components in an application
    components are: Database, Backend Server, User Interface, Messaging, Caching
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Scalability

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

High Availability

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Load Balancing

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Monolith and Microservices

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

MicroFrontends

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Database

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Caching

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Message Queue

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe a Single Tier Application and its strengths and weaknesses

A

Examples; Desktop Apps like MS Office, PC Games, Image editing software like GIMP, Photoshop, etc

the User Interface, Backend Server Business Logic, and Database reside in the same machine

Strengths: 1) low latency due to all 3 components on one machine, 2) higher order of security since the user’s data is on the machine and doesn’t need to be transmitted over a network for persistence

Weakness: 1) NO ROOM FOR MISTAKES OR BUGGY CODE Once the software is shipped the creator does not have any control over the software application. There can not be any code updates or feature updates unless the user manually installs the updated software, 2) the application is vulnerable to being modified or reverse engineered from a competitor or bad actor (depending on your perspective this can be viewed as weakness) 3) Inconsistent user experience since a single tier app’s performance largely depends on the end user’s machine’s power and the configuration of that machine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Describe a Two Tier Application and its strengths and weaknesses

A

Examples of Two Tier Apps: To-Do List app, Planner App, Productivity App

A Two Tier Application is logically separated into Client and Server. Where the Client includes the User Interface and the Business Logic of the application in one machine. The Backend Server includes the Database is running on a different machine. The Database is hosted by the business, which has control over the database.

Client Server Architecture communicates via Request and Response Cycles

Strengths:
there are less network calls made to the backend server since the user interface and business logic reside on one machine. This results in Low Latency.
example 1: with the To-Do list app a user only makes a network call to the database when they finish creating their list and want to persist the data
example 2: with browser and mobile games, the user only makes network calls to the backend when they want to persist game state

Fewer server calls means less money spent on keeping the servers running

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Describe a Three Tier Application, it’s use cases per business requirements, and strengths and weaknesses

A

Examples: blogs, news websites

Three Tier Applications: all three components; user interface, business logic, and database, are separated onto three different physical machines

A basic Three Tier app would have:
User Interface written in HTML, JavaScript, and CSS
Business Logic will run on Apache
Database will be MySQL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Describe an N-Tier Application, its use cases per requirements, and strengths and weaknesses

A

An N-Tier application is an application that has more than three components (UI, Backend Server, Database) involved in its architecture

These additional components are:
Cache
Message queues for asynchronous behavior
Load balancers
Search servers for searching through massive amounts of data
Components involved in processing massive amounts of data
Components running heterogenous tech commonly known as web services, microservices, etc

All the social apps like Instagram, Twitter, Facebook, TikTok, and large scale consumer services like Uber, Airbnb, online massive multiplayer games like Pokemon Go, Roblox, etc, are n-tier applications.

N-Tier applications are more popularly known as distributed systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

CRUX: What’s the need for so many tiers?

hint: Single Responsibility Principle, Separation of Concerns Principle

A

Two key principles to explaining the need for many tiers are: Single Responsibility Principle, and the Separation of Concerns

Single Responsibility Principle: refers to giving one dedicated responsibility to a component and letting that component execute that one responsibility flawlessly. Making a change to one component doesn’t impact the functionality of other components.
example: saving data, running application logic, delivery of messages throughout the system

example: a database should not hold business logic. It should only take care of persisting the data.

Single Responsibility Principle makes are code more flexible, making management easy. It make the components lego blocks. Can have dedicated teams and code repositories for each component

Separation of Concerns: Be concerned about your work/responsibility/component only and stop worrying about the other work. Keeping components separate makes them reusable.

Loosely coupled components allows us to scale our service easily when things grow beyond a certain scale in the future

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Tiers vs Layers

A

in the industry the term Application Layers refers to user interface, business, service, and the data access layers

These layers are the logical/conceptual separation of an application at the code level.

Layers represent the conceptual/logical organization of code

Tiers represent the physical/logical separation of components in an application or service. The components are the database, backend application server, user interface, messaging, and caching

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Tiers Quiz: What are two valid reasons to have a two-tier architecture?

A
  1. To lower network latency. This happens because the business logic is stored on the client so there are less network calls to the backend server which keeps the latency of the application low
  2. When we, developers/creators, need control over data in our application. Since all the data is stored in the database server hosted by the business. The business has complete control over the database component.
17
Q

Tiers Quiz: What are two valid reasons for a three tier achritecture?

A
  1. When we need control over the code/business logic of our application and want it to be secure. The business logic reside in the backend server. No client has access to the backend code, and this make the code secure. And the business has complete control over it.
  2. When we need control over data in our application. All the data in the application is stored in the database server hosted by the business. The business has complete control over the database component.
18
Q

Tiers Quiz: Why do software applications have different tiers?

A
  1. To assign dedicated roles/tasks to different components for a loosely coupled architecture. As a result, modifications or updates made on a specific component does not impact another component.
  2. To make the management, maintenance of a system, and the introduction of new features in the application easier.
19
Q

Web Architecture: What is Web Architecture?

A

Web Architecture is a system that involves multiple components like a database, message queue, cache, user interface, etc., all running in conjunction to form an online service.

20
Q

What is Client-Server Architecture?

A

Client-Server architecture is the fundamental building block of the web.

The Client-Server architecture works on a Request Response Model.

The Client sends a request to the Server for information.
The Server responds with the requested information.

Every website you browse is built on Client-Server architecture.

A very small % of business websites and applications use peer-to-peer architecture, which differs from client-server.

21
Q

The Thick Client vs the Thin Client

A

There are primarily two types of clients. The thick client and the thin client.

Thin client only holds the user interface. The thin client does not contain any business logic.
For every action, the client sends a request to the backend server, just like in a three-tier application.

Thick client holds both the user interface and all or part of the business logic. These are two-tier applications. Examples are utility apps, online games, etc.

21
Q

The Thick Client vs the Thin Client

A

There are primarily two types of clients. The thick client and the thin client.

Thin client only holds the user interface. The thin client does not contain any business logic.
For every action, the client sends a request to the backend server, just like in a three-tier application.

Thick client holds both the user interface and all or part of the business logic. These are two-tier applications. Examples are utility apps, online games, etc.