Web Application & Software Architecture Flashcards

1
Q

Definition of a Tier:

A

Logical and physical separation of components in an application or service.
Separation occurs at a component level, not the code level.
Components include database, backend server, user interface, messaging, caching, etc.

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

Purpose of Tiers:

A

To structure and organize an application’s components.
Enable scalability, maintainability, and flexibility.
Facilitate easier management and upgrades.

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

Determining Tiers in an Application:

A

Factors: Complexity, scalability needs, performance requirements, business logic.
No one-size-fits-all approach; depends on the application’s specific needs.

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

Types of Tiers and Examples:

A

Presentation Tier:
Responsible for user interaction.
Example: User Interface (UI) components like web browsers, mobile apps.
Application Tier (Middle Tier):
Contains business logic and processes requests from the presentation tier.
Example: Backend application servers, application logic components.
Data Tier:
Handles data storage and management.
Example: Databases (SQL, NoSQL), data storage systems.
Infrastructure Tier:
Supports the application by providing resources.
Example: Servers, networking infrastructure, cloud services.

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

Single-tier applications

A

In a single-tier application, the user interface, backend business logic, and the database reside in the same machine.

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

Single-Tier Applications -Upsides

A

No Network Latency: Components on the same machine, enhancing performance.
Immediate Data Availability: All components accessible on the local machine.
Data Privacy: User data stays on their machine, enhancing privacy and safety.
Performance Dependency:

Relies on the machine’s hardware and capabilities.

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

Single-Tier Applications -Downsides

A

Limited Control Over Updates: Publishers can’t update code/features post-shipment without manual user intervention.
Vulnerability to Buggy Code: No post-shipment updates could lead to user dissatisfaction.
Security Vulnerabilities: Source code exposure allows tweaking, reverse engineering, and potential security risks.
Inconsistent Performance/Look: Rendering varies based on user machine configuration.

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

Two-Tier Structure:

A

Client: Contains user interface and business logic on one machine.
Server: Hosts the database on a separate machine controlled by the business.

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

Need for Two-Tier Applications:

A

Reduced Network Calls: Locally hosted business logic minimizes backend server requests, lowering latency.
Use Cases: Suited for applications where security risks are minimal (e.g., to-do lists, productivity apps, games).
Examples:
To-Do List App: Backend calls triggered only upon data persistence.
Browser/Mobile Games: Heavy game files downloaded once, with minimal backend calls for game state persistence.
Cost Efficiency:
Fewer server calls lead to cost savings in server maintenance.
Choice of tier depends on business requirements and use cases.
Consideration for Future Tiers:
Design flexibility allows migration to three-tier architecture as per evolving business needs.

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

Three-Tier Applications

A

User Interface: Composed of HTML, JavaScript, CSS on one machine.
Business Logic: Runs on a server (e.g., Apache) on a separate machine.
Database: Stored separately, e.g., MySQL, on another machine.
Use Cases:
Popular on the Web: Commonly used for simple websites like blogs, news websites, etc.
Physical Separation: Components reside on different machines, creating distinct tiers.
Example:
Simple Blog: UI written in HTML, JavaScript, CSS; backend logic on Apache; MySQL for the database.
Benefits:
Structure and Separation: Organized division of UI, logic, and database.
Scalability and Maintenance: Allows scalability and easier maintenance.

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

N-tier applications

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

Components in N-Tier Applications:

A

Cache
Message Queues (Asynchronous Behavior)
Load Balancers
Search Servers (Handling Massive Data)
Components for Processing Massive Data
Heterogeneous Tech (Web Services, Microservices)
Examples of N-Tier Applications:
Social Applications: Instagram, Facebook, TikTok
Consumer Services: Uber, Airbnb
Massive Multiplayer Games: Pokémon Go, Roblox

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

Need for Multiple Tiers:

A

Single Responsibility Principle:
Dedicated Responsibilities: Components handle specific tasks flawlessly.
Flexibility and Management: Easier management, cleaner code, dedicated teams.
Loose Coupling: Changes in one component don’t impact others, enhancing robustness.
Stored Procedures Concerns:
Database Logic: Advocates against storing business logic in databases for future flexibility.
Separation of Concerns:
Reusability: Loosely coupled components enable reuse across services.
Scalability: Enables easy scaling of services as they grow.
Layers vs. Tiers:
Layers: Conceptual/logical organization of code (UI, business logic, data access).
Tiers: Physical separation of components across machines.
Difference Clarification:
Layers: Code-level organization.
Tiers: Physical separation of components.

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

Web App Architecture

A

Web Application Components:
1. Database
2. Message Queue
3. Cache
4. User Interface

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

Client-Server Architecture

A

Fundamental Web Building Block:
Request-Response Model: Client sends requests, server responds.
Ubiquity in Web Applications:
Usage in Websites and Apps: WordPress blogs, Facebook, Twitter, banking apps.
Rare Usage of Peer-to-Peer Architecture: A small percentage in business websites and apps.

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

Client

A

Role of the Client:
Holds User Interface: Presentation aspect of the application.
Responsible for Look and Feel: Composed of HTML, JavaScript, CSS.
Client Platforms:
Variety of Devices: Mobile apps, desktops, tablets (e.g., iPad), web-based consoles.
Gateway to the Application: Interface for interaction with the backend.
Technologies for Client-Side:
**Popular Libraries: **Vanilla JavaScript, jQuery, React, Angular, Vue, Svelte.
JavaScript Foundation: Majority of these libraries are JavaScript-based.
Platform-Specific Frameworks:
Diversity Based on Platform: Different tools for Android, Apple, Windows OS.
Platform-Specific Requirements: Tailored frameworks for distinct platforms.

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

Thin & Thick client

A

A thin client is a client that holds just the user interface of the application. It contains no business logic of any sort. For every action, the client sends a request to the backend server, just like in a three-tier application.

A thick client holds all or some part of the business logic. These are the two-tier applications.
The typical examples of fat clients are utility apps, online games, and so on.

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

Web Server

A

Role of a Web Server:
Receiving and Responding: Receives client requests, executes business logic, and provides responses.
Foundation for Online Services: Crucial for running online services.

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

Types of Servers:

A

Application Servers: Common servers for running web applications.
Other Servers: Proxy, Mail, File, Virtual, Data Storage, Batch Job Servers, etc.
Varied Configuration Based on Use Case: Specific servers chosen based on requirements (e.g., Apache Tomcat, Apache HTTP Server).

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

Focus on Application Servers:

A

Central for Web Application Components: Database, message queue, cache, user interface, etc., require servers to function.
Dedicated Hosting: UI components hosted separately on dedicated servers.

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

Server-Side Rendering:

A

Rendering Technique: Backend rendering of UI, sending generated data to the client.
Pros and Cons with Client-Side Rendering: To be discussed in upcoming lessons.

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

REST API Architecture

A

Request-Response Model:
Client-Server Interaction: Client sends a request, server responds with data.
Dependence on Request for Response: No response without a preceding request.

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

HTTP Protocol:

A

Data Exchange Protocol: Entire communication over HTTP.
**Stateless Nature: **Processes executed independently without knowledge of past processes.
Protocol for Web Information Exchange: Defines web data transmission.

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

REST API and API Endpoints:

A

Foundation of Modern Web Communication: Clients interact with REST endpoints on the backend.
Upcoming Detailed Discussion: Rest API and API Endpoints in the next lesson.

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

Real-World REST API Example:

A

Birthday Tracking Application: Fetches Facebook friend birthdays via the Facebook Social Graph REST-API.
Reminder Implementation: Runs business logic based on fetched data.
Benefits of REST-Based APIs:
Advantages to Explore: Detailed exploration in the next lesson for deeper understanding.

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

API Gateway

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

REST API Architecture

A

Follows REST Constraints: Implementation aligns with REST architectural principles.
HTTP-Based Communication: Interaction occurs over HTTP, leveraging HTTP methodologies.
Caching Benefits: Enables server-side caching for improved performance.

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

Stateless Communication:

A

Every Interaction is Stateless: No memory or information retained between client-server interactions.
Authentication with Each Interaction: Client provides authentication info in each request.

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

Decoupling Backend and Clients:

A

REST Endpoint Definition: URL for services accessible to clients (e.g., https://myservice.com/users/{username}).
Decoupling Impact: Backend service independent of client implementation; endpoints shared for data access.

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

Benefits of Decoupling:

A

Flexibility in Client Implementations: Different clients (mobile, web, testing tools) accessing the same API without affecting backend functionality.
Historical Application Development: Contrast between tightly coupled backend-client code (e.g., JSP) and REST API-based decoupling.

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

Simplified Backend Development:

A

Post-REST Implementation: Backend agnostic to client types; standardized response format (e.g., JSON) for client-side handling.
Ease in Adding New Clients: Introduction of new clients without backend impact.

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

Pervasive Nature of REST APIs:

A

Industry Integration: Almost all online services utilize REST APIs for access to their data.

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

Role of REST-API as a Gateway:

A

Encapsulation of Logic: Handles client requests, manages authentication, authorization, input sanitization, etc.
Single Entry Point: Acts as the interface between clients and application resources.

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

HTTP Pull Mechanism

A

Default HTTP Communication Mode: Client requests data, server responds.
Client-Pulled Data: Fetches data from the server upon request.
Bandwidth and Server Load: Frequent requests consume bandwidth and stress server resources.

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

Issues with HTTP Pull:

A

Repetitive Requests: Continuously fetching data regardless of updates.
Resource Waste: Wastes bandwidth and may overload the server.

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

HTTP Push Mechanism:

A

Minimizing Client Requests: Initial request followed by server-initiated data updates.
Server-Pushed Updates: Server informs client of new data without additional requests.
Bandwidth and Server Load Reduction: Decreases network load and eases server burden.

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

Callback Concept:

A

Client’s Initial Request: Server promises to notify when new data is available.
Server-Based Notifications: Notifies clients upon available updates
Common Use Case:
User Notifications: Backend events triggering notifications to users.

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

AJAX in Both Mechanisms:

A

Asynchronous JavaScript & XML (AJAX): Used for client-server communication in both Pull and Push methods.
Technologies in HTTP Push:
Ajax Long Polling
Web Sockets
HTML5 Event Source
Message Queues
Streaming over HTTP

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

AJAX – Asynchronous JavaScript and XML

A

Asynchronous Behavior Addition: Enables asynchronous behavior on web pages.

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

Data Fetching Methods:

A

Manual HTTP GET Request: Triggered by user interface events (e.g., button clicks).
Dynamic Interval-Based Fetching: AJAX used to pull data at regular intervals without user intervention.

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

AJAX Functionality:

A

Automatic Server Requests: Sends requests automatically at set intervals.
Dynamic Page Updates: Updates specific webpage sections dynamically upon receiving updates.
Common Examples: Dynamic event display on news/sports websites without page reloads.

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

AJAX Implementation:

A

XMLHttpRequest Object: Utilized by AJAX to send server requests.
DOM Update: JavaScript manages HTML DOM updates.

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

AJAX and jQuery:

A

Common Framework Usage: AJAX often employed with the jQuery framework.

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

Polling with AJAX:

A

Dynamic Information Fetching: Technique known as polling via AJAX.
Regular Data Requests: Fetches data periodically from the server.

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

AJAX Polling vs. Long Polling:

A

Difference: AJAX Polling - HTTP Pull mechanism. AJAX Long Polling - Hybrid (HTTP Push-Pull).

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

HTTP Push

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

TTL in HTTP Pull:

A

Connection Lifespan: Time to Live (TTL) for each request in HTTP PULL.
Browser Behavior: Closes connection if no response within TTL; requires re-sending the request.

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

Purpose of TTL:

A

Resource Management: Controls open connections to prevent server overload.

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

Persistent Connection:

A

Definition: Continuous open network link for multiple requests and responses.
Contrast to Regular Connection: Doesn’t close after single communication.

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

Facilitating HTTP Push:

A

Role in Push-Based Communication: Enables sustained connection between client and server.

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

Heartbeat Interceptors:

A

Function: Blank request-responses to maintain open connections.
Preventing Connection Closure: Prevents browsers from terminating connections.

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

Resource Intensiveness:

A

Persistent Connection Resource Usage: Higher resource consumption compared to HTTP PULL.
Use Case Significance: Essential for certain applications requiring consistent connections (e.g., multiplayer games).

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

Techniques for Persistent Connections:

A

Examples: AJAX Long Polling, Web Sockets, Server-Sent Events.
Exploration in Upcoming Lesson: Detailed discussion on each method

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

Streaming over HTTP

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

Web Sockets:

A

Purpose: Bi-directional low latency data flow between client and server.
Use Cases: Messaging, chat applications, real-time social streams, browser-based multiplayer games.
Mechanism: Operates over TCP; requires mutual support by server and client.

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

AJAX Long Polling:

A

Functionality: Server holds response until update available; longer connection times than regular polling.
Benefits: Reduces client-server requests, conserves network bandwidth.

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

Server-Sent Events (SSE):

A

Approach: Server automatically pushes data to client as events.
Benefits: Reduces blank request-response cycles, conserves bandwidth.
Direction: One-way data flow: server to client.
Use Cases: Real-time feeds, notifications, stock quotes.

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

Streaming over HTTP:

A

Purpose: Breaks extensive data into smaller chunks for streaming over HTTP.
Use Cases: Multimedia content streaming (videos, images).
Functionality: Facilitates watching partially downloaded content in real-time.

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

Choosing Technology:

A

Considerations: Tech selection based on specific application requirements.
Tech Overview: AJAX for dynamic UI updates, Long Polling for asynchronous data, Web Sockets for bidirectional flow, SSE for server-to-client flow, HTTP streaming for large object transmission.

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

Server-Side Rendering (SSR)

A

Rendering technique where the UI is generated on the server and sent as HTML to the client.
Ideal for delivering static content like WordPress blogs.
Benefits SEO since search engine crawlers easily parse static content.
Reduces client-side rendering work, ensuring faster initial UI loading.

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

Client-Side Rendering (CSR)

A

UI rendering process occurs on the client browser using JavaScript after receiving raw data from the server.
Best suited for modern, dynamic, AJAX-based websites.
Allows on-the-fly content fetching and rendering, enhancing user experience.
Resource-intensive for server if used for entire page generation.

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

Use Cases for Rendering:

A

SSR: Static content-based websites, like blogs, where content rarely changes.
CSR: Modern web apps reliant on AJAX for dynamic content, requiring frequent updates without page reloads.
Hybrid Approach: Utilizes SSR for static sections and CSR for dynamic content, achieving a balance between speed and dynamic functionality.

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

Why does every browser request have a TTL Time To Live?

A

Because open connections between the client and the server are resource intensive and there is a limit to the number of open connections a server can manage.

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

When do we need to implement the HTTP PUSH mechanism in our application?

A
  1. When the application is a real-time application like an online multiplayer game, a LIVE sports app.
  2. When we need to reduce the number of client requests hitting the server every now and then, checking for new information.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
Q

Which HTTP PUSH based technology suits best for implementing a streaming media application?

A

Streaming Over HTTP

This technique is ideal for cases where we need to stream large data over HTTP by breaking it into smaller chunks. It is primarily used for streaming multimedia content, like large images, videos etc., over HTTP.

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

Which technique suits best for implementing a browser-based multiplayer game?

A

Web Sockets

Web Sockets facilitate bi-directional communication between the client and the server which is typically required in an online game.

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

When should we render the user interface on the server?

A

When the content to be rendered is static in nature.
Static content can be rendered on the server in comparatively less time as opposed to being rendered on the client. It can also be cached for future requests.

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

What is scalability?

A

Definition: Ability of an application to handle increased workload without compromising performance.
Ideal Scenario: Consistent response time for each user request, irrespective of the total number of concurrent requests.
Indicator: Maintaining system latency even under heavy traffic load signifies scalability.
Big-O Notation: Target complexity ideally O(1) for constant time; O(n^2) not scalable as data set increases.

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

Network latency

A

Definition: Time taken for the system to respond to a user request.
Key Components:
Network Latency: Time for data transmission between points A and B. CDN deployment minimizes network latency by leveraging edge locations.
Application Latency: Time for application to process user requests. Stress testing identifies bottlenecks.

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

Importance of Low Latency

A

User Experience: High latency leads to user frustration, impacting user retention and business revenue.
Industry Impact: Critical in sectors like gaming (MMOs demand real-time response), finance (low-latency trading), where even milliseconds matter.
Real-World Examples: Huawei spent millions to save traders six milliseconds by laying a fiber-optic link between London and New York.

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

Vertical scaling

A

Vertical scaling involves adding more power to a server, increasing its hardware capabilities like RAM, CPU, etc., to handle increased traffic.

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

Horizontal scaling

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

Latency

A

Latency is the time taken by a system to respond to a user request. It plays a crucial role in user experience, determining if users stay or leave a website.

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

Server-Side Rendering vs. Client-Side Rendering

A

Server-side rendering generates HTML on the server and sends it to the client, reducing initial load times. Client-side rendering renders pages in the browser, allowing for dynamic content.

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

Cloud Elasticity

A

Cloud elasticity refers to the ability to dynamically scale resources up or down based on demand. Cloud platforms provide scalability and cost efficiency for businesses.

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

Microservice Architecture

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

Vertical Scaling Pros

A

Simplicity: Adding resources to a single server is straightforward without complex configurations. Requires less administrative effort

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

Vertical Scaling Cons

A

Availability Risk: Few powerful servers might create a single point of failure. If one goes down, the entire system might face downtime.

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

Code Changes in Horizontal Scaling

A

Statelessness: In a distributed environment, code needs to be stateless to prevent data loss if a server goes down. Avoiding static instances and relying on distributed memory stores like Redis or Memcache.

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

Horizontal Scaling Pros

A

High Availability: Distributing workload among multiple servers ensures the system remains available even if one server fails. No single point of failure.

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

Horizontal Scaling Cons

A

Complexity: Setting up and managing a distributed environment requires more effort, monitoring, and system configurations compared to vertical scaling.

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

Choosing Scalability Approach

A

Predictable vs. Unpredictable Traffic: Vertical scaling works well for predictable traffic; single servers handle load. Horizontal scaling is suitable for unpredictable, high-traffic scenarios like social networks or online games.

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

Database Bottleneck

A

Single monolith database handling requests from multiple nodes can impact response time. Scaled database through partitioning, sharding needed.

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

Application Architecture

A

Poor design with sequential processing instead of asynchronous modules can bottleneck operations. Asynchronous tasks needed for uploads, notifications.

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

Caching Efficiency

A

Underutilizing caching layers affects response time. Caching helps intercept requests, reduces load, and lowers costs. Case study: PolyHaven’s effective use of caching.

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

Load Balancer Setup

A

Inefficient load balancer configuration impacts latency. Correct setup crucial for optimal application performance.

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

Business Logic in Database

A

Adding business logic in databases creates tight coupling, complicates migrations, and testing. Prefer separating business logic from the database layer.

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

Database Technology

A

Choosing unsuitable database tech affects application latency. Relational for strong consistency, NoSQL for horizontal scalability.

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

Code Level Efficiency

A

Poorly written code—nested loops, tight coupling, neglecting complexity—impacts production. DENTTAL checklist ensures code robustness.

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

Dashboard Monitoring Architectural Flow

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

Profiling for Bottlenecks

A

Utilize application and code profilers to identify resource-consuming processes. Address bottlenecks to enhance performance.

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

Caching Efficiency

A

Optimize caching strategies. Cache static content, limit database hits, and utilize write-through caching for enhanced performance.

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

CDN Implementation

A

Implement Content Delivery Network (CDN) to reduce latency by bringing data closer to users.

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

Data Compression

A

Apply compression algorithms to minimize data size and enhance download speeds, reducing bandwidth consumption.

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

Reducing Round Trips

A

Minimize unnecessary client-server round trips. Consolidate multiple requests to optimize performance.

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

Scalability Testing

A

Test system parameters like CPU usage, network bandwidth, throughput, latency, and user experience under heavy load to ensure smooth scalability.

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

Capacity Planning

A

Provision appropriate hardware and computational power based on scalability testing results to handle expected traffic with a buffer.

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

Load and Stress Testing

A

Run load and stress tests using tools like JMeter to simulate traffic and prepare for traffic surges during events or peak seasons.

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

High Availability (HA)

A

HA ensures system uptime despite infrastructural failures, improving reliability and minimizing downtime. Expressed as a percentage in SLAs.

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

Importance of HA

A

Critical for mission-critical systems like aircraft, hospitals, and finance. Vital for continual connectivity and functionality.

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

Fault Tolerance & Redundancy

A

Fault tolerance: Systems withstand failures. Redundancy: Duplication of critical components for backup, reducing the risk of system failure.

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

Highly Available Cluster

A

A cluster designed for high availability. Multiple interconnected servers ensure continuous operation, even if one fails.

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

Cloud Platform HA

A

Cloud platforms ensure HA by distributing services across multiple servers/locations, using redundant hardware and automated failover mechanisms.

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

common reasons for system failures:

Software Crashes:

A

Applications frequently crash due to various issues such as memory leaks, bugs, or corrupted files. Unresponsive processes or system crashes on devices are common occurrences.

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

Hardware Failures:

A

Hardware issues, including CPU overload, memory failures, hard disk crashes, or network outages, contribute significantly to system failures. A single node going down can disrupt the entire system.

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

Human Errors:

A

Mistakes in configurations, software deployment, or operational errors can cause system failures. Even minor errors can lead to significant outages, as seen in cases like network configuration issues causing widespread disruptions.

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

Planned Downtime:

A

Scheduled maintenance activities like software updates, hardware upgrades, or routine maintenance operations often require system downtime, impacting availability.

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

Fault Tolerance:

A

System Resilience: Fault-tolerant systems can endure faults without experiencing complete failure. They are designed to continue operating even if some parts of the system fail.
Redundancy and Failover: By employing redundant components or nodes, a fault-tolerant system ensures that if one fails, another can seamlessly take its place. This setup prevents system-wide disruptions.
Reduced Impact of Failures: Even if specific functionalities or services within a system encounter issues or go offline temporarily, the overall system remains functional.
Application-Level Fault Tolerance: Microservices architecture is a common approach to achieve fault tolerance at the application level. Breaking down a monolithic application into smaller, independent microservices enables resilience against failures in specific components.

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

Benefits of Microservices:

A

Improved Management: Easier management and maintenance of individual services rather than a monolithic application.
**Development Flexibility: **Enables easier feature addition and modification without affecting other services.
Scalability and Availability: Facilitates scalability and high availability by distributing functionalities across multiple services, ensuring that even if some services fail, others continue to function.

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

HA - Redundancy

A

Redundancy is duplicating the server instances and keeping them on standby to take over in case any of the active server instances go down. It is the fail-safe backup mechanism in the deployment infrastructure.

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

Redundancy and Active-Passive HA Mode:

A

Backup Mechanism: Redundancy involves having duplicate server instances on standby, ready to take over if active instances fail. This setup ensures fail-safe backup within the deployment infrastructure.
Active-Passive Mode: In this setup, an initial set of nodes are active and perform the primary functions, while a redundant set of nodes remain passive, only activated when active nodes encounter failure.
Eliminating Single Points of Failure: Redundancy eliminates single points of failure by distributing functionalities across multiple nodes. When one node fails, redundant nodes seamlessly take its place, ensuring the system continues functioning without disruption.

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

Advantages and Implementation:

A

Zero Downtime Systems: Critical systems like GPS, aircraft, and satellites rely on redundancy to ensure zero downtime, guaranteeing uninterrupted operation.
**Elimination of Bottlenecks: **Redundancy helps in overcoming bottlenecks by distributing workload across multiple instances, avoiding reliance on single components.
Real-time Monitoring and Automation: Continuous monitoring allows immediate detection of bottlenecks or failures, while automation enables self-recovery and dynamic scaling based on system requirements.
Reducing Human Error Impact: Automation significantly reduces the chances of system failures caused by human errors, improving system reliability and stability.

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

High Availability Clusters

A

Definition: A set of nodes working together to ensure continuous service availability.
Components: Nodes connected via a private network (heartbeat network), shared distributed memory, and coordination service (e.g., Zookeeper).
Techniques: Redundancy in disk mirroring (RAID), network connections, power sources to eliminate single points of failure.
Geographic Redundancy: Multiple clusters in a single zone for minimal downtime.
Importance: Crucial in maintaining uptime and ensuring service availability in software system design.

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

Load Balancing in Web Applications

A

Definition: Technique distributing incoming web traffic across multiple servers or resources.
Strategies: Round-robin, least connections, content-based routing, geographic-based routing.
Purpose: Optimizing resource utilization, ensuring responsiveness during high traffic.
Relation to Scalability/HA: Integral part of a robust system design for smooth user experience.

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

What is the need of a shared distributed memory in a high availability cluster?

A

To maintain a common state across several nodes running in a cluster.

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

Load balancing

A

Purpose: Enables scaling and ensures high availability during traffic spikes.
Function: Distributes heavy traffic across servers in a cluster using load balancers.
Risk Avoidance: Prevents overload on specific machines, averting latency spikes and performance degradation.
Failure Mitigation: Automatically redirects requests from failed servers to operational ones, ensuring overall service availability.
Single Point of Contact: Acts as the central entry point for client requests.
Granularity: Can manage traffic at various application component levels (backend servers, databases, message queues, etc.).
Health Checks: Regularly assesses server status to intelligently route requests only to operational machines.
In-Service and Out-of-Service Instances: Maintains a list of operational servers and redirects requests accordingly. Failed servers are temporarily removed and reinstated upon recovery.

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

Load Balancing At Different Components Of The Application

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

DNS

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

Understanding DNS:

A

IP Address vs. Domain Names: Every machine on the web has a unique IP address, but remembering and using IP addresses for every website is impractical.
IP and its Protocol: Internet Protocol (IP) is the system that enables data packet delivery between machines using their IP addresses.
DNS’s Role: Maps easy-to-recall domain names (like amazon.com) to their corresponding IP addresses.
Simplified Access: Users can type domain names into browsers instead of complex IP addresses for website access.

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

How DNS Works:

A

DNS Querying: Occurs when a user enters a website’s URL into a browser.
Key Components of DNS Infrastructure:
DNS Recursive Nameserver (Resolver): Interacts directly with the user’s browser, performs queries, and caches responses for future use.
Root Nameserver: Manages the root zone of the DNS, providing information about Top-Level Domain (TLD) nameservers.
Top-Level Domain (TLD) Nameserver: Handles TLDs (.com, .org, etc.), providing details about authoritative nameservers for specific domains.
Authoritative Nameserver: Holds specific domain information, providing IP addresses and other records associated with a domain.

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

DNS Query Lookup Process:

A

Involves a series of requests from the recursive resolver to the root server, then to the TLD server, and finally to the authoritative server for the specific domain.
Each server in the hierarchy helps resolve the domain name to its corresponding IP address.

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

DNS query lookup process works

A

Step 1: User Action

User types domain name in the browser and triggers a request.
Step 2: DNS Resolver (Recursive Nameserver)

Receives the request, forwards it to the Root Nameserver.
Managed by ISPs in optimized data centers.
Step 3: Root Nameserver

Responds with the Top-Level Domain (TLD) Nameserver address (e.g., .com for amazon.com).
Step 4: TLD Nameserver

Holds data for specific top-level domains.
Provides the IP address of the domain’s Authoritative Nameserver.
Step 5: Authoritative Nameserver

Manages the specific domain (e.g., amazon.com).
Returns the domain’s IP address to the Resolver.
Step 6: Resolver’s Action

Caches the retrieved data.
Step 7: Browser Interaction

Receives the IP address and requests website content from the domain’s server.

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

DNS Optimization and Caching:

A

Server Setup: ISPs manage efficient Resolvers in data centers.
Caching: DNS data is cached at different levels for faster retrieval.
TTL: Time to Live (TTL) dictates cached data validity.
Browser Cache: Modern browsers cache DNS info for quicker revisits.

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

DNS Load Balancing

A

Purpose: Distributes user traffic across multiple data centers or server clusters.
Implementation: Occurs at the DNS level on the authoritative server.
Large-Scale Services: Big services like amazon.com operate across multiple data centers globally.

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

How DNS Load Balancing Works:

A

Authoritative Server Role: Returns different IP addresses of a domain to clients upon queries.
IP List Generation: Provides a list of IP addresses in response, changing the order in a round-robin fashion for each query.
Client Response: Client sends requests to the first IP in the list; can use other IPs if the first doesn’t respond promptly.
Dynamic IP Ordering: Authoritative server rearranges the list order for subsequent requests using round-robin.

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

Load Balancer Impact:

A

Load Balancer Interaction: Requests might hit a load balancer managing application server clusters, not directly the server.
Limitations: Doesn’t consider server loads, content, processing time, or in-service status.
Caching Issues: Cached IPs might lead requests to out-of-service machines, impacting reliability.

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

DNS Laod Balancing Benefits and Drawbacks:

A

Advantages: Easy and cost-effective load balancing setup for companies.
Limitations: Doesn’t account for various server parameters, relying on simple round-robin distribution.
DNS load balancing, though straightforward and cost-effective, has limitations in its inability to consider server status or load. Despite this, it remains a popular choice for distributing traffic across multiple data centers in large-scale services.

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

Hardware-Based Load Balancing:

A

Physical Hardware: These load balancers are physical devices that distribute traffic based on various parameters like active connections and compute utilization.
**Performance and Maintenance: **They’re highly performant but require regular maintenance, updates, and specialized skills for upkeep.
**Expensive and Overprovisioning: **Costly to set up compared to software load balancers and need overprovisioning for handling peak traffic.

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

Software-Based Load Balancing:

A

**Installed on Commodity Hardware/VMs: **Runs on regular hardware or virtual machines, offering cost-effectiveness and greater flexibility for deployment.
Ease of Upgrade and Provisioning: Easier to upgrade and provision compared to hardware-based counterparts.
Advanced Features: Utilizes various parameters like server data, cookies, HTTP headers, and health checks for efficient traffic routing.
Popular Examples: HAProxy is a widely used software load balancer by major industry players due to its features and scalability.

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

Load Balancing Algorithms:

A

Round Robin and Weighted Round Robin: Sequentially sends IP addresses but with weighted distribution based on server capacity.
Least Connections: Routes traffic to servers with the fewest open connections, considering CPU utilization and request processing time.
Random: Randomly distributes traffic across similar servers.
Hash: Routes traffic based on hashed source IPs or URLs, ensuring consistency for client-server connections and efficient caching.

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

Why is DNS load balancing implemented on the authoritative nameserver?

A

Because the authoritative nameserver returns the IP addresses of a domain’s application servers. If we implement load balancing here, we can easily return different IP addresses of application servers on every client request.

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

Why does DNS load balancing make the authoritative nameserver return a list of IP addresses as opposed to just returning a single different IP every time?

A

This is done to enable the client to use other IP addresses in the list in case the first doesn’t return a response within a stipulated time.

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

Monolithic Architecture

A

Single Codebase: All components of the application reside within a single codebase, tightly coupled together.
Tightly Coupled Modules: Features like user posts, comments, marketplace, etc., are coded as part of one unit rather than separate services.
Simplicity in Development: Easier to build, test, and deploy compared to microservices architecture due to its unified structure.
Early Stage Preference: Often chosen during the early stages of a business due to simplicity and straightforwardness in development.
Trade-offs in Transition: Transitioning from a monolithic architecture to a distributed microservices architecture incurs significant costs in terms of time, effort, and resources.

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

Monolithic vs. Microservices:

A

Monolithic Benefits: Simplicity in development and deployment is the primary advantage, suitable for simpler applications or early-stage businesses.
Microservices for Scalability: Microservices offer scalability, flexibility, and better management of complex applications but come with increased operational complexity.

135
Q

Pros of Monolithic Architecture:

A

Simplicity: Easier development, testing, deployment, and management due to a single repository and unified structure.

136
Q

Cons of Monolithic Architecture:

A

Continuous Deployment Challenges: Minor changes require redeploying the entire application, complicating the deployment process.
Regression Testing Complexity: Changes in one feature may impact others, necessitating comprehensive regression testing.
Single Point of Failure: A bug in one feature can crash the entire application due to tight coupling.
Scalability Issues: Difficulties in scaling due to tight coupling and increased code size.
Limitation in Technology Usage: Hard to leverage multiple programming languages or technologies within one codebase.
Cloud Compatibility and Statefulness: Not inherently compatible with cloud architecture due to potential stateful components like static variables.

137
Q

Ideal Use Cases for Monolithic Architecture:

A

Simple Applications: Suitable for straightforward applications with limited complexity, features, and anticipated growth.

138
Q

Microservices Architecture

A

Decomposition of Features: Services are separated into smaller, independent modules, each responsible for a distinct feature or functionality.
Single Responsibility Principle: Each service has a singular responsibility, promoting a loosely coupled architecture.
Simpler Maintenance: Easier management, maintenance, and deployment due to smaller, focused modules compared to a monolithic architecture.
Team Efficiency: Facilitates the division of work among teams, allowing dedicated focus on specific modules or services.
Scalability: Scalability is inherent; services can be scaled independently without affecting others.
Database Separation: Each microservice ideally has its own database, reducing the risk of single points of failure and bottlenecks.

139
Q

Pros of Microservices Architecture:

A

No Single Points of Failure: Due to loose coupling, the system remains operational even if individual services fail.
Technology Flexibility: Allows the use of diverse technologies via REST API interfaces between microservices.
Independent Deployments: Enables separate and continuous deployment of services, scalability, and dedicated teams.

140
Q

Cons of Microservices Architecture:

A

Management Complexity: Handling multiple distributed services requires additional management components and skilled resources.
Consistency Challenges: Ensuring strong consistency across distributed nodes can be complex; eventual consistency may prevail.

141
Q

Monolithic Architecture

A

Definition:
A monolithic architecture contains the entire application code in a single codebase, with tightly coupled modules handling various features.
Pros:
Simplicity in development, testing, and deployment due to a single repository.
Initially easy to build and deploy for simple applications.
No distributed environment complexity.
Cons:
Continuous deployment issues for minor changes, requiring full application redeployment.
Regression testing for the entire application after minor code changes.
Single points of failure; a bug in one module can impact the entire system.
When to Choose:
Fits for simple applications with limited features that won’t expand much.
Cases where complexity and scalability aren’t major concerns.

142
Q

Microservices Architecture

A

Definition:
Microservices deploy distinct features as smaller, loosely coupled services working together to form a larger distributed system.
Pros:
No single points of failure; fault isolation within individual services.
Leverage heterogeneous technologies; different services can use different languages and databases.
Independent deployments and scalability for each service.
Cons:
Increased management complexity with distributed services.
Challenges in ensuring strong consistency across multiple services.
Additional setup needed for distributed logging, monitoring, communication, etc.
When to Choose:
Best suited for complex applications needing rapid expansion and feature launches.
Ideal for businesses aiming for quick development and scaling without impacting existing features.

143
Q

Segment high-level architecture

A
144
Q

Segment Microservices architecture

A
145
Q

Why is generally a monolithic architecture not cloud ready?

A

Generally, a monolithic architecture holds a lot of application state in the static variables, and an application to scale inherently on the cloud needs to be stateless.

146
Q

Monolithic Architecture

A

Definition:
A monolithic architecture contains the entire application code in a single codebase, with tightly coupled modules handling various features.
Pros:
Simplicity in development, testing, and deployment due to a single repository.
Initially easy to build and deploy for simple applications.
No distributed environment complexity.
Cons:
Continuous deployment issues for minor changes, requiring full application redeployment.
Regression testing for the entire application after minor code changes.
Single points of failure; a bug in one module can impact the entire system.
When to Choose:
Fits for simple applications with limited features that won’t expand much.
Cases where complexity and scalability aren’t major concerns.

147
Q

Microservices Architecture

A

Definition:
Microservices deploy distinct features as smaller, loosely coupled services working together to form a larger distributed system.
Pros:
No single points of failure; fault isolation within individual services.
Leverage heterogeneous technologies; different services can use different languages and databases.
Independent deployments and scalability for each service.
Cons:
Increased management complexity with distributed services.
Challenges in ensuring strong consistency across multiple services.
Additional setup needed for distributed logging, monitoring, communication, etc.
When to Choose:
Best suited for complex applications needing rapid expansion and feature launches.
Ideal for businesses aiming for quick development and scaling without impacting existing features.

148
Q

Micro Frontend Development Teams

A

Backend Microservices:
Each UI component has a dedicated microservice on the backend supporting its functionality.
Full-Stack Micro Frontend Teams:
Comprise frontend developers responsible for developing specific UI components.
Teams own end-to-end vertical slices from user interface to backend database.
Teams are self-sufficient, using the preferred technology stack for their component.

149
Q

Application Integration

A

Unified User Interface:
Integration of all UI components forms the complete frontend of the e-commerce platform.
The integrated micro frontends deliver a seamless user experience without a centralized UI team.

150
Q

Benefits of Micro Frontends

A

Autonomous Teams:
Teams have autonomy to choose technology stacks and develop their components.
Facilitates fault isolation and independent development.
Vertical Slice Ownership:
Teams own end-to-end slices, promoting ownership and accountability for their components.
Seamless Integration:
Despite diverse technologies, integrated micro frontends present a unified and cohesive user interface.

151
Q

Micro Frontend

A
152
Q

Full Stack Teams With Micro Frontends

A
153
Q
A
154
Q

Client-Side Integration:

A

Approaches:
Integrating micro frontends on the client.
Similar to client-side and server-side rendering.
Basic Method:
Rendering micro frontends via unique links.
Example:
Order Checkout: AWS - https://www.aws.amazon.com/onlinegamestore/checkout
Payment Service: Google Cloud - https://www.cloud.google.com/onlinegamestore/payment
Issues with Basic Approach:
Address changes visibly for the user.
Relies on outdated methods like Iframes.
Modern Alternatives:
Leveraging Web Components and frameworks like Single SPA.
Single SPA enables frontend development using different JavaScript frameworks.

155
Q

Server-Side Integration:

A

Process:
Integration of UI components on the server.
Delivers pre-built complete website pages to the client on request.
Reduces website loading time significantly for users.
Implementation:
Requires additional logic on the server for integration.
Various technologies and frameworks facilitate this process.
Frameworks for Server-Side Integration:
Project Mosaic, Open Components, Podium.
Server Side Includes (SSI) for combining multiple web pages’ content.
Example:
Zalando uses Project Mosaic for managing micro frontends.**

156
Q

DB ARchitecture

A
157
Q

Unstructured data

A
158
Q

Structured Data

A

Definition:
Data conforming to a specific structure, often stored in a normalized format in databases.
Ease of Use:
Easier to work with, doesn’t require data preparation before interaction.
Example:
Customer details stored in a row with predefined data types for each column.
Management:
Typically handled by SQL (Structured Query Language).

159
Q

Unstructured Data

A

Definition:
Data lacking a definite structure, includes text, images, videos, PDFs, etc.
Handling:
Raw data collected from various sources like IoT devices, social networks, etc.
Interaction:
Requires data preparation before running analytics for meaningful insights.

160
Q

Semi-Structured Data

A

Definition:
Mix of structured and unstructured data often stored in XML or JSON formats.
Handling:
Managed based on business requirements and handled as per specific needs.

161
Q

User State Data:

A

Definition:
Information about user activity on a website.
Examples:
Browsing product categories, sorting, wishlists, etc.
Benefits:
Enhances user browsing experience, aids in retaining user progress.

162
Q

Relational Databases:

A

Definition:
Purpose:
Persist data with relationships: one-to-one, one-to-many, many-to-many, many-to-one, etc.
Data Model:
Organized in tables with rows and columns.
Primary Query Language:
SQL (Structured Query Language) for data interaction.

163
Q

DB Relationships

A

One-to-Many Relationship:
Example: A customer (C1) linked to multiple books (B1, B2, B3, B4, B5).
Representation:
Customer table linked to the product inventory table.

164
Q

Data Consistency

A

Normalization:
Data stored in a simplified, atomic form in one place to maintain consistency.
Purpose:
Enables easy updates without data scattering across multiple tables.

165
Q

ACID Transactions:

A

Definition:
Atomicity, Consistency, Isolation, Durability.
Purpose:
Ensures flawless execution of transactions without affecting other processes.
State Management:
Guarantees the system is in State A or State B, no intermediary states.
Error Handling:
Any failure leads to a rollback to the initial state (State A).

166
Q

Selection Criteria for Relational Databases:

A

Use Cases:
Strong Consistency:
Needed in stock trading, personal banking, etc.
Relationship-Centric Apps:
Examples: Facebook, LinkedIn, etc.
Transactions Involving Money or Numbers:
ACID compliance crucial for such software.

167
Q

Strengths of Relational Databases:

A

Transactions and Data Consistency:
Compliance with ACID rules.
Experience and Reliability:
Battle-tested, exist for a long time.

168
Q

NoSQL Databases:

A

Definition:
SQL Absence:
Lack traditional SQL; structured more like JSON-based databases for Web 2.0.
Use Cases:
High-Frequency Read-Writes:
Suitable for social apps, micro-blogging, real-time sports, massive multiplayer games, etc.

169
Q

Differences from Relational Databases:

A

Scalability Issues in Relational DBs:
Complex scaling processes, sharding, replication.
NoSQL Scalability:
Easily scalable by adding new server nodes, without human intervention.

170
Q

NoSQL Database Capabilities:

A

Cluster Intelligence:
Designed to operate smartly on clusters with minimal human intervention.
Self-Healing Infrastructure:
Nodes with self-recovery capabilities for fault tolerance.

171
Q

Trade-Offs and Considerations:

A

Relational DBs vs. NoSQL:
Both have specific use cases and trade-offs.
NoSQL Sacrifices:
Sacrifices strong consistency, ACID transactions for horizontal scaling.
Eventual Consistency:
NoSQL data tends to be more eventually consistent.
NoSQL’s Role:
Suited for specific needs, not a universal solution.

172
Q

Upsides of NoSQL Databases:

A

Developer-Friendly Nature:
Learning Curve:
Less steep compared to relational databases.
Schema Flexibility:
No strict schemas, offers flexibility in data handling.
Relaxed Structure:
No enforced relationships or joins, allowing more freedom.
Benefits and Drawbacks of Flexibility:
Pros of Flexibility:

Developer-friendly, absence of joins, relationships, etc.
Cons of Flexibility:
Potential for inconsistency due to data spread across.

173
Q

Downsides of NoSQL Databases:

A

Inconsistency Risks:
Data Spread Challenge:
Updates across all locations required, prone to inconsistency.
Normalized Data in Relational DBs:
Relational databases maintain consistency through normalization.
ACID Transaction Limitations:
ACID Transaction Support:
Limited or absent in distributed NoSQL databases.
Deployment-Level Constraints:
ACID limited to specific entity hierarchies or regions.

174
Q

Working with NoSQL Databases:

A

Ease of Development:
Simplified Operations:
No stress of managing complex queries or relationships.
Efficiency:
Key-based object retrieval leads to faster operations.
Popular NoSQL Databases:
Industry Usage:
Examples include MongoDB, Redis, Neo4J, Cassandra, Memcache, etc.

175
Q

What are the two primary methods for data ingestion?

A

Real-time and batch processing are the two primary methods for data ingestion, chosen based on specific business requirements.

176
Q

In what scenarios is real-time data ingestion preferred?

A

Real-time ingestion is favored in systems handling time-sensitive data such as medical data from IoT sensors (e.g., heartbeat monitoring) or financial data (e.g., stock market events).

177
Q

When might batch processing be more suitable for data ingestion?

A

Batch processing is useful for systems analyzing trends over time, like data showcasing the popularity of a sport in a region over an extended period.

178
Q

What challenges are associated with data ingestion?

A

Challenges include:

Heterogeneous data requiring standardization.
Slow processing due to data transformation and authentication.
Resource-intensive processes and the need for custom solutions.
Security risks when moving data through various stages.

179
Q

Why does real-time data ingestion, despite its name, sometimes involve slow processing?

A

Real-time ingestion can involve slower processing due to data transformation, authentication, and the need for staged processing, even though it’s designed for immediate data delivery.

180
Q

What challenges did LinkedIn face with multiple data ingestion pipelines?

A

LinkedIn encountered data management challenges with fifteen data ingestion pipelines, leading them to develop Goblin, an in-house data ingestion tool, to address the issue.

181
Q

Why is moving data around considered risky?

A

Data movement introduces vulnerabilities and requires additional resources to ensure continual compliance with security standards, as it traverses various staging areas.

182
Q

What is the primary distributed data processing framework for ingesting Big Data?

A

Hadoop is the most popular distributed data processing framework used to analyze Big Data from sources like IoT devices and social apps.

183
Q

How is Elasticsearch utilized in data streaming?

A

Elasticsearch, an open-source search framework, receives streamed data for indexing, enabling advanced search functionalities in web applications.

184
Q

How was Elasticsearch used in a product search service?

A

Data was streamed from legacy storage to Elasticsearch for indexing, enabling product searches by replicating data and asynchronously delivering new data for real-time indexing.

185
Q

Why is centralizing logs essential in large-scale services?

A

Centralizing logs allows tracking errors, studying system behavior, and moving back in time to analyze the system’s holistic behavior, especially in microservices-based architectures.

186
Q

What are examples of stream processing engines for real-time events?

A

Apache Kafka, Apache Storm, Apache Nifi, Apache Spark, Samza, and Kinesis are examples of stream processing engines used for real-time large-scale data processing in online applications.

187
Q

What is the purpose of message queues like Kafka in real-time data processing?

A

Message queues like Kafka facilitate efficient ingestion, analysis, and rapid distribution of updated information in systems handling live data, such as sports applications.

188
Q

What are data pipelines in a data processing infrastructure?

A

Data pipelines are fundamental components that enable the efficient movement of data from one point to another, allowing real-time filtering and processing.

189
Q

What are some features of data pipelines?

A

Features include:

Ensuring smooth data flow
Enabling filters and business logic application
Avoiding bottlenecks and redundancy
Facilitating parallel processing
Safeguarding data integrity

190
Q

How do data pipelines handle data movement?

A

Data pipelines automate the flow of data, encompassing extraction, transformation, combination, validation, and convergence of multiple data streams based on predefined rules without manual intervention.

191
Q

What is the traditional approach to managing data movement?

A

ETL stands for Extract, Transform, Load. It involves extracting data from sources, transforming it into a standardized format based on business rules, and loading it into a storage location for further processing, usually done in batches.

192
Q

What distinguishes ETL from real-time data movement via data pipelines?

A

ETL processes data in batches, while data pipelines handle real-time streaming of data, offering faster results but also support for both batch and real-time data processing techniques.

193
Q

How do popular data processing tools like Apache Flink, Spark, and Kafka operate?

A

These tools facilitate processing data within a distributed cluster environment through data pipelines, managing data movement and processing in distributed systems.

194
Q

What will upcoming lessons explore regarding distributed data processing?

A

Future lessons will delve into distributed data processing, covering concepts like Lambda and Kappa architectures, offering insights into how these systems work.

195
Q

Distributed Data Processing

A

Distributed data processing involves dividing large data sets across multiple nodes in a cluster for parallel execution, enhancing scalability and availability while preventing data loss through redundancy.

196
Q

What facilitates coordination among distributed nodes in a cluster?

A

Apache Zookeeper is a widely used node coordinator in distributed systems, enabling efficient task coordination among multiple nodes in a cluster.

197
Q

How does distributed data processing differ from centralized processing in terms of task execution?

A

Distributed data processing shares tasks across multiple nodes for parallel execution, whereas centralized systems process tasks sequentially, one after another.

198
Q

What is MapReduce, and which framework is a popular implementation of this programming model?

A

MapReduce is a programming model for distributed data processing. Apache Hadoop is a popular open-source implementation used for managing large-scale data processing tasks.

199
Q

What capabilities does Apache Spark offer in a distributed computing environment?

A

Apache Spark is a cluster computing framework supporting high-performance batch and real-time processing. It integrates with various data sources and facilitates parallel execution in a cluster.

200
Q

What is the primary use of Apache Storm in distributed systems?

A

Apache Storm is a distributed stream processing framework mainly used for processing massive amounts of streaming data, including real-time analytics and machine learning.

201
Q

What role does Apache Kafka play in distributed stream processing?

A

Apache Kafka is a distributed stream processing and messaging platform used for managing streams of data, acting as a messaging system for real-time features, log aggregation, and more.

202
Q

Which technologies are preferred for batch data processing and real-time streaming respectively?

A

Hadoop is preferred for batch data processing, while Spark, Kafka, and Storm are chosen for real-time streaming data processing.

203
Q

What is the Lambda architecture in data processing?

A

The Lambda architecture is a distributed processing approach that combines batch and real-time streaming data processing to overcome latency issues inherent in batch processing.

204
Q

How does the Lambda architecture address latency issues?

A

It utilizes both batch processing for accuracy and comprehensive results and real-time processing for quick insights, merging their outcomes to present a holistic view to end-users.

205
Q

What are the primary layers in the Lambda architecture?

A

The Lambda architecture typically consists of three layers:

Batch layer
Speed layer
Serving layer

206
Q

Describe the role of the batch layer in the Lambda architecture.

A

The batch layer handles results obtained from batch processing of data, ensuring comprehensive and accurate outcomes despite longer processing times.

207
Q

What purpose does the speed layer serve in the Lambda architecture?

A

The speed layer collects data from real-time streaming processing, providing quick but less comprehensive insights due to analyzing a smaller data subset.

208
Q

How does the serving layer function in the Lambda architecture?

A

The serving layer merges outcomes from both the batch and speed layers, presenting a unified view that combines the accuracy of batch processing with the speed of real-time processing.

209
Q

What is Kappa architecture?

A

Kappa architecture employs a single data streaming pipeline, unlike Lambda architecture, simplifying data processing without distinct layers.

210
Q

How does Kappa architecture handle the flow of data for both real-time and batch processing?

A

It channels data for both real-time and batch processing through a unified streaming pipeline, eliminating the need for managing separate layers in data processing.

211
Q

How many layers comprise the Kappa architecture, and what are they called?

A

Kappa architecture comprises two layers: Speed (for streaming processing) and Serving (the final output layer).

212
Q

Is Kappa architecture an alternative to Lambda architecture?

A

Kappa architecture is not an alternative to Lambda; both architectures have distinct use cases and advantages.

213
Q

When is Kappa architecture preferred over Lambda architecture?

A

Kappa architecture is favored when batch and streaming analytics results align closely in a system, while Lambda is preferable if their outcomes differ significantly.

214
Q

What is the significance of the two layers within Kappa architecture?

A

The Speed layer handles streaming processing, while the Serving layer represents the final output, simplifying the architecture compared to Lambda.

215
Q

What is reactive programming in modern software development?

A

Reactive programming involves a programming paradigm that handles asynchronous data streams and the propagation of changes, emphasizing a responsive, resilient, and scalable approach to application development.

216
Q

Define event-driven architecture in software development.

A

Event-driven architecture centers on the generation, detection, and reaction to events, emphasizing communication between loosely coupled components responding to various events.

217
Q

What is meant by “blocking” in web applications?

A

Blocking in web applications refers to the pausing of code execution until a process completes. It delays further execution until the awaited process finishes.

218
Q

Explain “non-blocking” behavior in software development.

A

Non-blocking behavior allows code execution to continue without waiting for a process to complete, enabling the execution of subsequent code while handling asynchronous tasks.

219
Q

Why are tech and frameworks like NodeJS, Play, Tornado, and Akka gaining popularity over traditional technologies?

A

Modern tech and frameworks like NodeJS, Play, Tornado, and Akka are favored for their non-blocking, event-driven capabilities, which enhance responsiveness and scalability compared to traditional technologies.

220
Q

How does non-blocking behavior benefit IO-intensive operations?

A

Non-blocking behavior in IO-intensive operations allows the execution of subsequent code while handling IO tasks, optimizing resource utilization and responsiveness in applications.

221
Q

What distinguishes event-driven architecture from traditional CRUD-based applications in terms of code execution?

A

Event-driven architecture emphasizes responsiveness to events, enabling code execution without waiting for external processes to complete, contrasting with traditional blocking behavior in CRUD-based apps.

222
Q

Event-driven architecture

A
223
Q

What do events refer to in the context of web applications?

A

In web applications, events encompass various occurrences such as HTTP requests, user clicks, variable value changes, or messages ingested, contributing to a stream of events in real-time applications.

224
Q

Define event-driven architecture in modern web application development.

A

Event-driven architecture (EDA) involves non-blocking, reactive frameworks like NodeJS, Play, and Akka, designed to handle a high volume of concurrent connections, reacting to events occurring regularly in applications.

225
Q

What distinguishes event-driven architectures like NodeJS and Play in modern web development?

A

These architectures prioritize asynchronous models, handle a large number of concurrent connections efficiently, and manage IO-intensive operations with minimal resource consumption.

226
Q

Explain the nature of reactive architecture within event-driven systems.

A

Reactive architecture involves coding to respond to frequent events, continuously monitoring streams of asynchronous data in applications inherently designed to be asynchronous.

227
Q

What are some typical use cases for event streaming in an event-driven architecture?

A

Event streaming is vital for handling transactional events, tracking changing stock prices, user interactions in online shopping, and other real-time, IO-intensive scenarios.

228
Q

Why might NodeJS not be suitable for CPU-intensive tasks?

A

NodeJS, being single-threaded and designed for handling IO-intensive tasks, is not well-suited for CPU-intensive operations that require substantial computational power like graphics rendering or complex data processing.

229
Q

How does the emergence of non-blocking tech impact traditional technologies?

A

The emergence of non-blocking tech doesn’t render traditional tech obsolete; rather, it emphasizes the importance of choosing the right technology based on specific use cases and trade-offs.

230
Q

What are web hooks ?

A

Webhooks are a mechanism enabling communication between services without middleware, functioning like callbacks where a service notifies another when specific events occur.

231
Q

How do Webhooks alleviate server load in API-based interactions?

A

Instead of continuous polling for updates, Webhooks allow services to register an HTTP endpoint. When new information is available, the server triggers an HTTP event to all registered endpoints, reducing unnecessary API requests.

232
Q

Explain the concept of Webhooks using an analogy.

A

Webhooks work akin to providing a phone number (HTTP endpoint) to a service, instructing it to call when certain events occur, allowing services to carry on without continuous API polling.

233
Q

What role do Webhooks play in event-based communication between services?

A

Webhooks establish an event-driven mechanism where services notify registered endpoints upon specific events, facilitating real-time updates without constant querying.

234
Q

How do services utilize Webhooks to receive notifications?

A

Services register unique HTTP endpoints, acting as callback locations, enabling servers to push updates or notifications directly to these endpoints when relevant events occur.

235
Q

Provide an example illustrating the use of Webhooks in everyday scenarios.

A

Browser notifications utilize Webhooks, notifying users of new content without requiring continuous visits to websites, similar to how Webhooks inform services of updates.

236
Q

What is shared-nothing architecture in distributed systems?

A

Shared-nothing architecture refers to a system design where modules or services do not share memory or disk resources, aiming to eliminate single points of failure and ensure each component operates independently.

237
Q

Explain the principle behind shared-nothing architecture.

A

In shared-nothing architecture, each module or service has its own dedicated resources (memory and disk), preventing dependencies and ensuring that if certain modules fail, others remain unaffected.

238
Q

How does shared-nothing architecture contribute to system reliability?

A

Shared-nothing architecture reduces the impact of failures by isolating resources for each module, enabling the system to maintain functionality even if specific modules or services encounter issues.

239
Q

What benefits does shared-nothing architecture offer for scalability?

A

Shared-nothing architecture aids scalability by allowing the addition of new modules or services without dependencies on existing resources, promoting independent growth and performance.

240
Q

Define shared-nothing architecture in terms of resource sharing among modules.

A

Shared-nothing architecture involves modules sharing RAM and disk (database) but not sharing resources among themselves, ensuring independent operation and fault isolation.

241
Q

What does shared-nothing architecture aim to eliminate in distributed systems?

A

Shared-nothing architecture strives to eliminate single points of failure by ensuring each module or service operates autonomously without shared resources, enhancing system resilience.

242
Q

What are the three main components of the hexagonal architecture?

A

The three key components are Ports, Adapters, and Domain, aiming to create an independent, loosely coupled, and easily testable application structure.

243
Q

Define the focus of the hexagonal architecture.

A

Hexagonal architecture aims to enable testing of applications with and without a UI, with mock databases and middleware, without modifying the code, by emphasizing independence and loose coupling among components.

244
Q

Explain the role of ports and adapters in the hexagonal architecture.

A

Ports act as interfaces for external input to the application, while adapters implement these interfaces, converting external data to a format understandable by the core business logic (domain).

245
Q

What lies at the core of the hexagonal architecture?

A

The core of the hexagonal architecture is the domain, which represents the business logic. External entities interact with the domain through ports and adapters.

246
Q

Why is the hexagonal architecture represented visually as a hexagon?

A

The hexagonal shape is a visual representation; it doesn’t affect the pattern itself. It symbolizes the architecture’s focus on isolating the business logic (domain) at the center, surrounded by ports and adapters at the edges.

247
Q

How does hexagonal architecture differ from traditional layered architecture?

A

Hexagonal architecture is an evolved form of layered architecture, aiming to prevent scattering of business logic across multiple layers, unlike traditional layered approaches, which may result in complex, coupled codebases.

248
Q

What is a peer-to-peer (P2P) network?

A

A P2P network is a decentralized network where computers (nodes) communicate directly with each other, eliminating the need for a central server.

249
Q

What distinguishes P2P networks from centralized systems?

A

In a centralized system, communication occurs through a central server, whereas in a P2P network, nodes communicate directly, ensuring decentralization and resilience.

250
Q

What are the downsides of centralized systems in comparison to P2P networks?

A

Centralized systems pose risks of data access, security breaches, single points of failure, and dependency on a central server, unlike P2P networks that offer resilience and data control.

251
Q

What advantages do P2P networks offer?

A

P2P networks provide resilience during server downtimes, data control without central authority intervention, and efficient file sharing among peers.

252
Q

What are some practical use cases of P2P networks?

A

P2P networks efficiently handle large-scale file sharing, overcoming memory limits and physical storage constraints. Protocols like BitTorrent enable efficient file sharing among millions of users worldwide.

253
Q

What is the fundamental characteristic of a P2P network?

A

A P2P network allows nodes (computers) to communicate directly without relying on a central server, promoting decentralized connections among users.

254
Q

Describe segmented P2P file transfer.

A

In segmented P2P file transfer, large files are divided into chunks, and nodes download these chunks while simultaneously re-hosting them, enhancing availability across the network.

255
Q

How does an unstructured P2P network function?

A

In an unstructured P2P network, nodes connect randomly without a specific topology or indexing. Data search across the network is resource-intensive and time-consuming.

256
Q

What is a key advantage of a structured P2P network over an unstructured one?

A

A structured P2P network utilizes indexing or topology, making data search more efficient by implementing distributed hash tables for node indexing.

257
Q

What does a hybrid P2P network model entail?

A

A hybrid P2P network combines aspects of P2P and client-server models, often seen in blockchain applications for scalability, security, and availability purposes.

258
Q

Can you name a few examples of P2P applications?

A

Examples include peer-to-peer digital cryptocurrencies like Bitcoin, decentralized microblogging services like Twister, and federated social networks such as Diaspora.

259
Q

What defines a decentralized social network?

A

Decentralized social networks have servers distributed globally, eliminating a single authority’s control, allowing users to host their data, promoting user privacy, data portability, and avoiding scalability issues.

260
Q

Explain the ‘Bring Your Own Data’ concept in decentralized social networks.

A

Users own and control their data in decentralized networks, enabling data portability between different applications or networks without the risk of data loss.

261
Q

What are the distinguishing features of decentralized social networks?

A

Features include data ownership, data privacy, economic compensation for network participation, robust infrastructure, and open-source protocols like ActivityPub.

262
Q

Why is data safety highlighted in decentralized networks?

A

Decentralized networks prioritize user privacy by encrypting data, ensuring that no central authority can access or manipulate personal information.

263
Q

Describe the infrastructure advantage in decentralized networks.

A

The decentralized structure distributes infrastructure costs, prevents network downtime, and encourages developers to innovate without concerns about server expenses.

264
Q

What is ActivityPub, and what role does it play in decentralized networks?

A

ActivityPub is an open, decentralized social networking protocol providing APIs for content access and modification across the network, facilitating communication between network nodes or pods.

265
Q

What does federated architecture entail in decentralized social networks?

A

Federated architecture extends the concept of decentralization, enabling interconnected servers or pods (like in Mastodon or Diaspora) to exchange information and maintain a network, akin to semi-autonomous entities sharing data.

266
Q

How does federated architecture function in decentralized social networks?

A

In federated networks, numerous servers or pods are interlinked, with nodes subscribing to these pods. Even if some links break temporarily, the network stays functional, allowing nodes to communicate through their subscribed pods.

267
Q

What role do pods play in a federated network?

A

Pods serve as discovery points for nodes. Unlike direct peer-to-peer links, pods streamline node discovery without the need for extensive network scans or centralized registries, enhancing network accessibility and usability.

268
Q

What distinguishes pods from direct peer-to-peer connections?

A

Pods in a federated network simplify node discovery, providing a more efficient and structured approach compared to direct peer-to-peer connections, where discovering other nodes might be challenging without a central registry.

269
Q

Why is federated architecture beneficial for decentralized social networks?

A

Federated architecture ensures network resilience by interlinking pods, allowing uninterrupted communication between nodes even if certain links between pods experience temporary disruptions.

270
Q

What backend technologies are recommended for real-time data interaction apps like messaging, gaming, or audio-video streaming?

A

NodeJS, Python’s Tornado, Spring Reactor, Play, and Akka are popular for handling real-time data interaction due to their non-blocking nature and ability to manage persistent connections.

271
Q

Which technologies are suitable for building peer-to-peer (P2P) web applications such as distributed search engines or P2P live media services?

A

JavaScript-based protocols like DAT, IPFS, and frameworks like FreedomJS cater to building P2P web apps.

272
Q

What technologies are typically used for CRUD-based applications like tax filing systems or online booking portals?

A

Technologies such as Spring MVC, Python Django, Ruby on Rails, PHP Laravel, and ASP .NET MVC are commonly utilized for CRUD-based applications with an MVC architecture.

273
Q

What technology is recommended for small-scale applications like blogs, online forms, or simple integrations with social media platforms?

A

PHP is an ideal choice for small-scale applications due to its simplicity, lower hosting costs, and frameworks like Spring Boot and Ruby on Rails that facilitate rapid development.

274
Q

Which technologies are suitable for CPU and memory-intensive applications like Big Data processing or parallel processing?

A

For CPU and memory-intensive tasks, languages like C++, Rust, Java, Scala, Erlang, Go, and Julia are recommended for their performance, scalability, and capabilities in handling large-scale computations.

275
Q

What is the importance of being thorough with project requirements while picking a technology stack?

A

Being clear on project requirements ensures alignment between chosen technology and project needs. It includes considerations like data structure, scalability expectations, and the architectural setup.

276
Q

Why is it advisable to consider using familiar technology before adopting new ones?

A

Familiar technology enables faster development due to reduced learning curves, increased productivity, and a better understanding of potential issues and solutions.

277
Q

What role does an active community and good documentation play in choosing a technology stack?

A

An active community and comprehensive documentation ensure better support, continuous updates, and easy resolution of issues faced during development.

278
Q

Why is it beneficial if the technology chosen is being used by major companies in production?

A

Adoption by major companies ensures battle-tested technology, fewer inherent issues, continuous updates, and patches, thus reducing the risk of scalability and security problems.

279
Q

What are the advantages of opting for an open-source technology stack?

A

Open-source tech allows customization, community contributions, cost-effectiveness (no licensing fees), and fosters a larger community for support and feature enhancements.

280
Q

How does the availability of skilled resources influence technology selection?

A

A technology with readily available skilled resources ensures smoother scaling, quicker feature releases, and ease in finding resources to work on the project.

281
Q

What are the primary characteristics of a web-based mapping service like Google Maps in terms of user activity?

A

It’s a read-heavy application with negligible write operations. It deals with spatial data that includes geometric and alphanumeric information.

282
Q

Which databases are suitable for handling spatial data in a mapping application?

A

Spatial databases like MySQL, MongoDB, CouchDB, Neo4J, Redis, and Google Big Query GIS support the persistence of spatial data, each with dedicated plugins.

283
Q

In the context of database scalability for a mapping service, which type of database (relational or NoSQL) is preferable, and why?

A

NoSQL databases are favored due to horizontal scalability and a lack of complex relationships in map data, enabling them to handle surge in traffic during peak hours efficiently.

284
Q

For a mapping service with multiple features like route planning, real-time updates, and various APIs, which architecture—monolithic or microservice-oriented—would be better suited?

A

Microservice architecture is preferable to build separate services for various functionalities, ensuring scalability, maintainability, and high availability.

285
Q

When rendering map tiles for a mapping service, what advantages does server-side rendering offer over client-side rendering?

A

Server-side rendering enables caching of static content, generation and caching of tiles, and improved performance by rendering smaller sections of the map (tiles) based on user interactions.

286
Q

Which technologies and frameworks are typically used for developing the user interface of a mapping service?

A

UI technologies like JavaScript (Vanilla JS, React, Angular, Vue), HTML5, and open-source libraries like OpenLayers are commonly employed for map interaction and interface development.

287
Q

How are real-time features managed in a web-based mapping service, and what considerations should be made?

A

Real-time features require persistent connections and should be implemented judiciously due to their resource-intensive nature, considering limitations in handling concurrent connections on servers.

288
Q

Why is a relational database like MySQL preferred for setting up an online payment system?

A

For implementing a payment system, ACID compliance is crucial for transactional consistency, making a relational database like MySQL an ideal choice.

289
Q

How can high concurrency scenarios, where multiple users try to purchase the same ticket, be managed effectively?

A

Implementing a message queue, applying the FIFO (First In, First Out) principle, or utilizing database locks with the correct transaction isolation levels are viable approaches to handle concurrency.

290
Q

What purpose does caching serve in a ticket booking scenario, and which caching technologies can be utilized?

A

Caching helps reduce database load by holding consistent but possibly inaccurate ticket counts shown on the website. Technologies like Redis, Memcached, or Hazelcast are commonly used for caching.

291
Q

Which backend technologies are suitable for managing the logic and messaging queue for user notifications in a ticket booking application?

A

Backend technologies like Java, Scala, Python, or Go can be used, while message queues such as RabbitMQ or Kafka are effective for sending notifications to users.

292
Q

What are the recommended strategies for building a responsive user interface for a ticket booking portal?

A

Leveraging CSS3 for responsive design or using open-source frameworks like Bootstrap JS can ensure responsiveness. JavaScript frameworks such as React, Angular, or Vue are also viable options for UI implementation.

293
Q

Why have mobile devices become the dominant platform for online services?

A

Mobile devices offer unparalleled accessibility and ease of use, making them the preferred choice for approximately 60-70% of global users accessing online services.

294
Q

How has the transition to mobile affected the gaming industry?

A

The popularity of smartphones has led to a shift in gaming preferences, moving from web and desktop platforms to mobile. Gaming companies observed better engagement and retention rates with mobile versions, leading to a significant increase in Monthly Active Users (MAU) and Daily Active Users (DAU).

295
Q

What impact has the mobile shift had on businesses?

A

Businesses are shifting focus from web-first to mobile-first strategies. Platforms like Facebook, once hosting numerous games, have now transitioned to mobile-only games, while businesses like Instagram, TikTok, and Pokemon Go thrive with billions of users on mobile.

296
Q

How significant is the mobile segment for businesses today?

A

Mobile devices drive the majority of traffic for businesses, with the Google Play Store boasting over 2 billion monthly active users and hosting more than 3.5 million apps, totaling 82 billion app downloads.

297
Q

What do terms like mobile-only, mobile-first, and mobile-friendly mean in the context of application development?

A

These terms represent different approaches in app development, where mobile-only refers to applications exclusive to mobile devices, mobile-first implies prioritizing mobile development, and mobile-friendly denotes applications optimized for seamless mobile user experiences.

298
Q

What are the two approaches to designing responsive websites?

A

The two approaches are mobile-first and web-first. In the mobile-first approach, the website is designed for smaller screens, adapting later to larger desktop screens. Conversely, the web-first approach designs for bigger screens and adapts to smaller screens.

299
Q

What is the analogy often used for content in responsive web design?

A

The analogy is that “content should be like water,” meaning it should take the shape of the device or screen it is displayed on.

300
Q

What is BootstrapJS, and how is it used in web development?

A

BootstrapJS is an open-source CSS framework designed for responsive user interface development. It includes pre-built CSS, JavaScript features, and commonly used website elements, simplifying web design. It offers a grid-based approach for creating web pages and provides ready-made templates and plugins.

301
Q

Why is BootstrapJS a popular choice among developers, particularly those who are not designers?

A

BootstrapJS is favored due to its ease of use, intuitive nature, and availability of pre-built elements. It’s especially useful for backend developers or non-designers transitioning to frontend development as it streamlines the design process and has a manageable learning curve.

302
Q

What prompted the creation of BootstrapJS, and where was it originally developed?

A

BootstrapJS originated at Twitter to ensure consistency across their internal tools’ user interfaces. Twitter later released it as an open-source project, aiming to provide a unified framework for frontend development.

303
Q

Besides BootstrapJS, name other frameworks used for designing responsive websites.

A

Other frameworks include jQuery Mobile, Skeleton, HTML5 Boilerplate, Less Framework, among others, each offering different features and approaches to responsive web design.

304
Q
A
305
Q

What are native mobile apps?

A

Native apps are developed exclusively for a particular operating system (e.g., Android, iOS, Windows). They interact directly with the OS and device hardware, providing high performance and a consistent user interface matching the native OS.

306
Q

What technologies are used for writing native apps on Android and iOS?

A

For Android, developers can use Java, Kotlin, or C++. For iOS, technologies include Swift, Objective C, and the Cocoa Touch framework.

307
Q

What are hybrid mobile apps?

A

Hybrid apps combine elements of both native and web-based technologies. They can be installed from app stores, access device hardware, and communicate with the OS. Built using web technologies like HTML5, CSS, and JavaScript, they run within a native container but might experience slightly lower performance compared to native apps.

308
Q

Name some popular frameworks used for developing hybrid mobile apps.

A

Frameworks like React Native, Apache Cordova, Ionic, and Flutter are popular choices for building hybrid apps. They leverage open web technologies and offer cross-platform development capabilities.

309
Q

What are some examples of companies using React Native for their mobile apps?

A

Companies like Bloomberg, Walmart, Uber Eats, and Discord utilize React Native for their mobile applications, leveraging its cross-platform capabilities and JavaScript-based development.

310
Q

How does the performance of hybrid apps typically compare to native apps?

A

Hybrid apps might have slightly lower performance and UI rendering speed due to the additional middle layer between web technologies and the native OS, which native apps do not have.

311
Q

What are the challenges in native app development that led to the emergence of hybrid apps?

A

Developing dedicated apps for different platforms, requiring distinct technologies and teams, led to the need for a common codebase and a simpler approach, resulting in the emergence of hybrid apps using web-based technologies like HTML5 and JavaScript.

312
Q

Why might businesses opt for hybrid apps over native apps?

A

Hybrid apps leverage web-based technologies, allowing developers with modern web development skills to build them without a steep learning curve. They offer a common codebase for multiple platforms, reducing the need for dedicated platform-specific teams and saving time and resources.

313
Q

1.

What are the drawbacks or issues associated with hybrid apps?

A

Hybrid apps might lack the same level of performance and smoothness as native apps due to the additional layer between the web-based technologies and the native OS. They might face challenges in achieving the same user experience as native apps.

314
Q

Can you provide examples of businesses that shifted from hybrid to native app development?

A

Airbnb shifted from React Native to native technology due to performance issues and challenges in achieving native functionality. Udacity abandoned React Native due to increased Android-specific features and maintenance costs. Facebook admitted their mistake in relying too much on HTML5 for their mobile app back in 2012.

315
Q

What’s an essential consideration when choosing between native and hybrid app development for a use case?

A

When choosing between native and hybrid app development, considering the specific use case, performance requirements, desired user experience, and long-term maintenance costs is crucial to make an informed decision.

316
Q

What defines a native app?

A

A native app is built exclusively for a particular operating system (OS), accessing hardware directly, ensuring high performance and consistent user experience.

317
Q

What technologies are used to develop native Android apps?

A

Java, Kotlin, or C++ are commonly used for writing native Android apps.

318
Q

What defines a hybrid app?

A

A hybrid app uses web-based technologies (HTML5, CSS, JavaScript), runs within a native container, and communicates with the device’s OS through a middle layer.

319
Q

What are the main drawbacks of hybrid apps compared to native apps?

A

Hybrid apps might experience performance issues, lags, and difficulty in accessing device-specific hardware due to the middle layer between the app and the OS.

320
Q

When should you opt for a native app development approach?

A

Native apps are preferred for heavy graphic or hardware requirements, demanding UI animations, complex functionalities requiring direct hardware access, and maintaining consistency with the native OS.

321
Q

In what scenarios is choosing a hybrid app advisable?

A

Hybrid apps are recommended for simpler app requirements, resource constraints, initial MVP launches, testing the market, and when the team lacks proficiency in native technologies.

322
Q

What are Progressive Web Apps (PWAs)?

A

PWAs are web applications that offer a native app-like experience, accessible through web browsers, featuring functionalities like offline access, push notifications, and device hardware integration.

323
Q

How can PWAs be installed on devices?

A

Users can install PWAs directly from the browser by clicking on an install prompt, adding a shortcut to the home screen without visiting app stores.

324
Q

What technologies are used to build PWAs?

A

PWAs are developed using web technologies such as HTML, CSS, and JavaScript, along with frameworks like Angular, React, Ionic, and Google Polymer.

325
Q

What benefits do PWAs offer to businesses?

A

PWAs help businesses provide an app-like experience directly in browsers, improving conversion rates, reducing bounce rates, and decreasing app sizes compared to native apps.

325
Q

How do PWAs differ from native apps?

A

While PWAs offer native-like experiences, native apps maintain superiority in performance, especially for CPU-intensive tasks like gaming.

326
Q

Can PWAs replace native apps entirely?

A

PWAs do not replace native apps. Instead, they compete more with responsive mobile websites, offering an app-like experience without the need for app store installations.

327
Q

What is Mobile Backend as a Service (MBaaS)?

A

MBaaS is a cloud-based service model that manages backend infrastructure, offering features like user authentication, social network integration, push notifications, databases, and more for mobile apps.

328
Q

What features does an MBaaS typically offer?

A

MBaaS services include user authentication, real-time databases, push notifications, caching, data storage, messaging, third-party tool integration, analytics, crash reporting, and more.

329
Q

How does MBaaS benefit developers during the bootstrapping phase?

A

MBaaS offers a generous free tier, enabling solo developers or small teams to build and test their app ideas without worrying about initial hosting costs, allowing them to showcase their concepts to potential investors.

330
Q

What role does an API play in MBaaS?

A

MBaaS provides APIs for various features, allowing app code to interact directly with these APIs to perform necessary operations like user authentication, database interactions, and messaging.

331
Q

When should one use MBaaS for app development?

A

MBaaS is suitable for mobile-only services and apps where a custom backend isn’t available or required. It’s ideal for mobile games, messaging apps, and simple apps like to-do lists.

332
Q

What are considerations while using MBaaS?

A

MBaaS involves keeping business logic on the client side and may require designing a custom backend if new features demand server-side logic. Vendor lock-in risk exists if the service provider discontinues or alters their service unfavorably.

333
Q
A