Framework Flashcards
(82 cards)
What are the main sections of the delivery framework
- Requirements
- Core Entities
- API or Interface
- Data Flow
- High-level Design
- Deep Dives
Describe the time limit and goal of the requirements section
Time limit: 5 mins
Goal: Gain a clear understanding of the system by breaking requirements into function and non-functional requirements
What are functional requirements
- Core features of the system being designed
- “Users/Clients should be able to…” statements.
- Requirements should be targeted
- Prioritize on top 3
What are non-functional requirement
- System qualities important to users
- “The system should be able to…” or “The system should be..” statements
- Should be in context of the system and quantified where possible, e.g. “The system should have a low latency search, <500ms” instead of “The system should be low latency”
- Prioritize top 3-5
What are things to consider when creating non-functional requirements
- CAP Theorem: prioritize consistency or availability
- Environment Constraints: Web, mobile, etc.
- Scalability: Bursty traffic at certain times of days, read write ratio
- Latency: how quickly does the system need to respond to user requests
- Durability: how important is it to not lose data
- Security: Data protection, regulations
- Fault Tolerance: How does the system handle failures
- Compliance: Any legal or regulatory requirements
Describe the time limit and goal of the core entities section
Time limit: 2 minutes
Goal: a bulleted list of the entities in the system
- Who are the core actors in the system?
- What are the nouns or resources necessary to satisfy the functional requirements
- Use good names for entities
Describe the time limit and goal of the API or system interface section
Time limit: 5 minutes
Goal: Define the contract between the system and it’s users
- REST, GraphQL, or Wire Protocol (Generally use REST unless you are concerned with over-fetching
- Generate a list of endpoints and what they would return
Describe the time limit and goal of the data flow section
Time limit: 5 minutes
Goal: Describe the high level sequence of actions or processes that the system performs on the inputs to produce the desired outputs
- The data flow output will be a simple list
Describe the time limit and goal of the high level design section
Time limit: 10-15 minutes
Goal: A drawing of components and how they interact
- Ensure the architecture satisfies the design
- You may be able to go through your API one-by-one and build up your design
- While drawing, talk through the process and how the data flow
- Document relevant column/fields in the DB
- Stay focused, this is only the high level design, complexity can be added later
Describe the time limit and goal of the deep dive section
Time limit: 10 minutes
Goal: harden the design
- Ensure the design meets all of the non-functional requirements
- Address edge cases
- Identify and address issues and bottlenecks
- Improve the design based on questions from the interviewer
- A senior candidate should identify the above cases and lead the discussion
What is a core database and what are choices for a core database
- A core database is the data storage for your product
- Choices are: Relational (SQL), NoSQL, Blob
What is a relational database (RBDMS) and when should you use it
- Relational databases store relations and are good at storing transactions
- This is the default choices for a product design interview
What is a NoSQL database and when should you use it
- NoSQL databases are a broad category of databases that are often schma-less
- Common data models are:
- key-value
- document
- column-family
- graph
- Great candidates for
- Flexible data models
- Scalability
- Handling big Data and real-time web apps
What is a blob storage and when should you use it
- A blob storage is used to store large unstructured blobs of data, e.g. video, images, etc.
- You should avoid using a blob storage as your primary database
What is a search optimized database and when should you use it
- You should use a search optimized database when you need full-text search
In the context of a search optimized database, what is an inverted index
An inverted index is a data structure that maps words to documents. This allows you to quickly find the documents that contain the words you are searching
In the context of a search optimized database, what is tokenization
Tokenization is the process of breaking a piece of text into individual words. This allows the mapping of words to an inverted index
In the context of a search optimized database, what is stemming
Stemming is the process of reducing words to their root form. For exampling, “running” and “runs” would both be reduced to “run”
In the context of a search optimized database, what is fuzzy search
Fuzzy search is the ability to find words similar to a given search term. This can be done with algorithms like edit distance to find words that might be mispelled
In the context of a search optimized database, what is scaling
Search optimized databases can be scaled horizontally by adding more nodes to a cluster and sharding across those nodes
What are some examples of search optimized databases
- Elastic Search
- Postgres with a GIN index
- Redis full text search
In the context of a blob storage, what is durability
Durability relates to the chance of data loss during a failure. Blob storages are quite durable
In the context of a blob storage, what is scalability
Blob storages can be considered infinitely scalable
In the context of a blob storage, what is cost
Blob storages are cheap, generally an order of magnitude cheaper than NoSQL solutions