Essential Architectural Building Blocks and Patterns Flashcards

(17 cards)

1
Q

What are the core principles of API Design?

A

RESTful principles, versioning, authentication/authorization

REST (Representational State Transfer) principles include statelessness, cacheability, and a uniform interface.

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

What is the difference between SQL and NoSQL databases?

A

SQL is structured and relational, while NoSQL is non-relational and can be document-based, key-value, column-family, or graph

SQL databases use structured query language, while NoSQL databases are more flexible in data storage.

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

When should you use NoSQL databases?

A

When handling large volumes of unstructured data, requiring high scalability and flexibility

Common use cases include big data applications and real-time web apps.

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

What are common types of NoSQL databases?

A
  • Key-value
  • Document
  • Column-family
  • Graph

Each type has specific use cases, such as key-value stores for caching and graph databases for social networks.

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

Why is indexing important in databases?

A

It improves query performance by allowing faster data retrieval

Indexes can significantly reduce the amount of data scanned during queries.

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

What are the different levels of caching placement?

A
  • Client
  • CDN
  • Application-level
  • Database-level

Each level has its own benefits and trade-offs in terms of speed and consistency.

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

What are common caching strategies?

A
  • Write-through
  • Write-back
  • LRU (Least Recently Used)
  • LFU (Least Frequently Used)

These strategies help manage how data is stored and retrieved in cache.

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

What is a common challenge in caching?

A

Invalidation

Keeping cached data consistent with the underlying data can be complex.

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

What is the purpose of message queues?

A

Asynchronous communication, decoupling, buffering, fan-out

They help manage communication between different services or components in a system.

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

Name two examples of message queues.

A
  • Kafka
  • RabbitMQ

Both are popular tools for handling message brokering and event streaming.

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

What are the pros of microservices?

A

Scalability, flexibility, and independent deployment

Microservices allow teams to work on different components without affecting the whole system.

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

What are the cons of microservices?

A

Increased complexity, potential for inter-service communication issues

Managing many microservices can lead to challenges in coordination and consistency.

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

What is the CQRS design pattern?

A

Separates reads and writes to optimize performance

CQRS stands for Command Query Responsibility Segregation.

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

What is the Bulkhead design pattern?

A

Isolates failures to prevent system-wide outages

This pattern helps maintain service availability by containing faults.

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

What does the Circuit Breaker pattern do?

A

Prevents cascading failures in a system

It allows a system to gracefully handle failures and avoid overwhelming dependent services.

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

What is the Publisher/Subscriber design pattern?

A

Decouples components and allows asynchronous communication

This pattern helps in building event-driven architectures.

17
Q

What is the purpose of the Retry Pattern?

A

Handles transient failures by retrying requests

It is commonly used in distributed systems to improve reliability.