week 7 Flashcards

(22 cards)

1
Q

What are architectural styles

A

It is a general, reusable solution to a commonly occurring problem in software architecture within a given context

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

What is monolithic architecture

A

Single tiered software system where all the apps requirements and functionalities are combined into a single platform

it is self contained, one app handles everything UI, business logic and data access.

it can be decomposed into smaller parts, like modules in the code but its a single app for deployment.

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

pros of monolithic

A

They easy to develop initially
they easy to deploy

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

cons of monolithic

A
  • hard to understand overtime as codebase can become complexed and tangled
  • performance issues with size
  • difficult to scale
  • changing technologies can be hard
  • replacing single components ( oven in kitchen)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is client server architecture

A

system is divided into 2 key parts,
server - provides resources and services to clients
client - request those resources

layer of abstraction because server is black box for client.

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

pros of client server

A
  • separation of concerns
  • scalability -> adding client or upgrading servers
  • centralized control on the server ( security)
    -flexible deployment -> can be located anywhere as long as they can communicate
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

cons of client server

A
  • traffic management - bottleneck
  • server failure - trap thick
  • server maintenance - expensive
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Multi tier models ?

A

dividing basic client server into further layers

common 3 tier:
- Presentation tier - UI, html, css and JS
- Application tier - business logic and client requests
- Data storage - DBMS

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

N tier model

A
  • Presentation Layer: UI.
  • Business Layer: Handles business rules and logic. (Sometimes split further into a separate Application/Services layer).
  • Persistence Layer: Handles data access operations (saving/retrieving data), logging.
  • Database Layer: The actual database.

Key idea:
- Layers are isolated;
- changes in one layer ideally don’t ripple through others.
- layers typically closed, talk to neighbours

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

Multi tier pros

A

greater scalability
improved security and data integrity
easier to maintain, upgrade and test

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

Multi tier cons

A

can be difficult to design and implement
increased complexity
architectural sinkhole - requests passing through many layers for no reason

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

REST as part of client server ?

A

architectural style specifically designed for standardizing web systems and web services

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

what makes system RESTful

A
  1. client server architecture
  2. statelessness - doesnt remember, every request must have all info
  3. cache ability - clients can cache respsonses that servers explicitly define are cacheable
  4. layered system
  5. code on demand - servers can extend client functionality by transferring executable code
  6. Uniform interface - standardsizes how clients and serviers interact ( 3 key requirements)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Uniform Interface - 3 Key Requirements

A
  1. Resource identification in requests - using URIs ( uniform resource identifiers) so like https://asdf/users/12. Returns liek json format not raw data
  2. resource manipulation through representations -representation returned to client should contain enough info for client to modify or delete that resource on the server
  3. Self-descriptive mssgs - each mssg must include enough info for the receiver to process it ( using the http headers to specify the format)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Properties of HTTP Methods

A

Safe: The method does not change the server’s state (e.g., GET).

Idempotent: Using the method multiple times on the same resource has the same effect as using it once (e.g., multiple identical PUT or DELETE requests).

Cacheable: Responses can be stored for future reuse.

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

http and their properties

A

GET: Fetches a representation of a resource (e.g., get product details).
Safe, Idempotent, Cacheable.

POST: Submits data to a resource for processing, often to create a new resource (e.g., create a new order).
Not Safe, Not Idempotent, Cacheable (only if the response indicates it).

PUT: Replaces the target resource with the attached representation (or creates it if it doesn’t exist at that URI) (e.g., update a user’s entire profile).
Not Safe, Idempotent, Not Cacheable.

DELETE: Deletes the target resource (e.g., delete a product).
Not Safe, Idempotent, Not Cacheable.

17
Q

What is peer to peer architecture

A

distributes tasks and resources between equal participants.

peers make their resources available to other peers without any central coordination

18
Q

pure P2P / unstructured P2P

A

No predefined structure is imposed on the network of peers.
Peers randomly form connections with each other.
To find a resource, a peer might contact all available peers it knows, and those peers, in turn, might pass the request on if they can’t fulfil it (this is known as “flooding”).

19
Q

pure P2P pros

A

Easy and cheap to set up and maintain
no central point of failure
system performance scales with peers

20
Q

pure P2P cons

A

Flooding- network traffic and heavy load on each peer
Security - harder to manage no central authority
content availability - peers holding specific content go offline

21
Q

what is Hybrid P2P

A

Combines P2P and Client-Server architectures to get benefits from both.

Examples:
Using a central server to help peers find each other (e.g., a “tracker” in BitTorrent helps a downloader find other peers who have parts of the desired file).
e.g. Skype for login [client-server] and calls [P2P];
some multiplayer games for matchmaking [client-server] and gameplay [P2P]).

Hybrid P2P can reduce the impact of flooding found in pure P2P systems.