Web Application + Software Architecture Flashcards

1
Q

What is Web Architecture?

A

Multiple components (DBs, message queue, cache, UI) all running in conjunction to form an online service

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

What is Client-Server Architecture?

A

Fundamental Building Block of the Web
Request-Response model - Client sends request to server for info, server responds with it.

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

What is a Thin Client?

A

Client that Just holds the UI of the app. No business logic. No business Logic.

For every action, client sends request to backend (just like 3-Tier App)

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

What is a Thick/Fat Client?

A

Holds all or some part of the business logic + the UI

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

When to use Thick Client?

A

When we need to minimize the network latency and reduce network calls to backend server. Keeps latency of the app low.

Need to reduce bandwidth consumption in the client server for a smoother user experience. Enhances user experience, reduces latency.

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

What is a web server?

A

A component in web application infrastructure.

Receives requests from client and sends response AFTER executing business logic, based on parameters sent from the client.

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

What is an application server?

A

A server running a web app.

Every service needs a server to run.

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

List some types of web server based on their core task

A

Proxy Server
Mail Server
File Server
Virtual Server
Data Storage Server
Batch Job server

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

What is a Request-Response Model?

A

Client and servers have a request-response model…no request, there is no response.

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

What is the HTTP Protocol?

A

Protocol for data exchange over World Wide Web.

Stateless protocol. Every request independent, has no knowledge of previous

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

What is a REST API?

A

Representational State Transfer - Architecture Style for building web services

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

What requirements do APIs need to adhere to in order to be REST compliant?

A

API must act as an interface

API must provide communication between client/server over HTTP Protocol

Communication must be stateless - every new request is completely independent of the last/next

API must send Auth info with every request

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

What is HTTP PULL data transfer between client and server?

A

Client sends request to server. Client pulls data from server whenever required. Done over and over to fetch latest data.

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

What is HTTP PUSH data transfer between client and server?

A

Keeps the server from being brought down by excessive HTTP requests. Uses Callbacks to to allow server to keep sending updates to clients when they’re available

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

What is a Callback for the HTTP Push Mechanism?

A

Mechanism for client to send request for certain info once. After the first request, server keeps pushing updates to client once they’re available.

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

Benefit of HTTP PUSH?

A

Saves network bandwidth. Cuts down load on server

17
Q

Examples of HTTP PUSH Implementations?

A

AJAX Long Polling
Web Sockets
HTML5 Event Source
Streaming over HTTP
Message Queues

18
Q

When to use HTTP PUSH?

A

Real-time applications like online multiplayer games, a LIVE sports app, etc

When we need to reduce the number of client requests hitting the server every now and then, checking for new information.

19
Q

What are 2 ways of pulling data from Server over HTTP?

A

Triggering and event on the UI to send a request

Pulling dynamically at regular intervals without any human intervention (using AJAX)

20
Q

What is AJAX?

A
  • Asynchronous JS and XML -
  • Adds asynchronous behavior to web page.
  • Polls server repeatedly every X unit of time
  • On receipt of the data, the segment of the page is updated dynamically bye the callback method (without the page reloading)
  • Uses XMLHttpRequest object to send requests
21
Q

What are Heartbeat Interceptors?

A

These are blank request responses between the client and server to prevent the browser from killing the connection.

Keeps the connection between client and server open

22
Q

What are websockets?

A

Persistent, bi-directional, low-latency data flow communication between client and server. Think of it as an ongoing conversation.

Can keep a client-server connection open as long as we want.

Runs over TCP, not HTTP. Server + Client should support web sockets.

23
Q

What are some use cases for websockets?

A

Use Cases: chat apps, real-time social streams, browser-based massive multiplayer games. Each use significant number of read writes compared to regular apps.

24
Q

WHat is AJAX - Long Polling?

A

Instead of immediately returning empty response, server holds the response until it finds an update to be sent to the client

Connection stays open longer compared to polling.

Can be used for simple a sync data fetch where you do not want to poll the server

25
Q

What are Server-Sent Events?

A

PUSH tech - Server automatically pushes data to client when updates are available. Incoming messages from server are treated as events.

Ideal for Real-time feeds (twitter), Stock Quotes in UI, Real time notifications.

26
Q

What are some benefits of Server sent events?

A

Cuts out large number of blank Request-Response cycles.
Reduces Bandwidth consumption

27
Q

How do Server Side events work?

A

Client establishes connection with initial request, then server initiates data transmission (Using HTML5 Event-Source API)

Server automatically pushes data to client when updates are available. Incoming messages from server are treated as events.

28
Q

Streaming over HTTP Use

A

Ideal for streaming extensive data over HTTP by breaking it into smaller chunks

Used for streaming multimedia content (large images, videos etc) over HTTP