avatarNaina Chaturvedi

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

37118

Abstract

vice.<span class="hljs-built_in">reduce_product</span>(product_id, quantity) self.orders.<span class="hljs-built_in">append</span>((order_id, product_id, quantity)) return order_id else: raise <span class="hljs-built_in">Exception</span>(<span class="hljs-string">"Product not available in required quantity."</span>)</pre></div><div id="3458"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">check_order_status</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, order_id</span>): <span class="hljs-keyword">for</span> order <span class="hljs-keyword">in</span> <span class="hljs-variable language_">self</span>.<span class="hljs-symbol">orders:</span> <span class="hljs-keyword">if</span> order[<span class="hljs-number">0</span>] == <span class="hljs-symbol">order_id:</span> <span class="hljs-keyword">return</span> <span class="hljs-string">"Order placed successfully."</span> <span class="hljs-keyword">return</span> <span class="hljs-string">"Order not found."</span></pre></div><h2 id="b1c5">A microservice for Amazon in Python:</h2><div id="e538"><pre><span class="hljs-keyword">import</span> flask <span class="hljs-keyword">import</span> json</pre></div><div id="776e"><pre><span class="hljs-attribute">app</span> <span class="hljs-operator">=</span> flask.Flask(name)</pre></div><div id="5d39"><pre><span class="hljs-comment"># Define an endpoint for retrieving information about a particular product</span> <span class="hljs-meta">@app.route(<span class="hljs-params"><span class="hljs-string">"/product/<product_id>"</span>, methods=[<span class="hljs-string">"GET"</span>]</span>)</span> <span class="hljs-keyword">def</span> <span class="hljs-title function_">get_product_info</span>(<span class="hljs-params">product_id</span>): <span class="hljs-comment"># Code to retrieve product information from the database</span> product_info = { <span class="hljs-string">"product_id"</span>: product_id, <span class="hljs-string">"name"</span>: <span class="hljs-string">"Example Product"</span>, <span class="hljs-string">"price"</span>: <span class="hljs-number">999.99</span>, <span class="hljs-string">"description"</span>: <span class="hljs-string">"This is an example product"</span>, }</pre></div><div id="091a"><pre> <span class="hljs-keyword">return</span> flask.jsonify(product_info)</pre></div><div id="5986"><pre><span class="hljs-comment"># Define an endpoint for updating the availability of a particular product</span> <span class="hljs-meta">@app.route(<span class="hljs-params"><span class="hljs-string">"/product/<product_id>/availability"</span>, methods=[<span class="hljs-string">"POST"</span>]</span>)</span> <span class="hljs-keyword">def</span> <span class="hljs-title function_">update_product_availability</span>(<span class="hljs-params">product_id</span>): <span class="hljs-comment"># Code to update the availability of the product in the database</span></pre></div><div id="bb04"><pre> <span class="hljs-keyword">return</span> flask.jsonify({<span class="hljs-string">"status"</span>: <span class="hljs-string">"success"</span>})</pre></div><div id="9506"><pre><span class="hljs-comment"># Example usage</span> <span class="hljs-keyword">if</span> name == <span class="hljs-string">"main"</span>: app.<span class="hljs-built_in">run</span>()</pre></div><h1 id="82ae">API Design</h1><p id="0adf">We would need to first define the endpoints we want to expose to our users.</p><p id="35ed">Here is an implementation of some endpoints :</p><div id="2f7d"><pre><span class="hljs-keyword">from</span> flask <span class="hljs-keyword">import</span> <span class="hljs-title class_">Flask</span>, request, jsonify</pre></div><div id="428e"><pre><span class="hljs-attribute">app</span> <span class="hljs-operator">=</span> Flask(name)</pre></div><div id="429a"><pre><span class="hljs-variable">@app</span>.route(<span class="hljs-string">'/api/v1/products'</span>, methods=[<span class="hljs-string">'GET'</span>]) <span class="hljs-keyword">def</span> <span class="hljs-title function_">get_products</span>(): <span class="hljs-comment"># code to fetch all products from the database</span> <span class="hljs-keyword">return</span> jsonify(products)</pre></div><div id="4cf0"><pre><span class="hljs-meta">@app.route(<span class="hljs-params"><span class="hljs-string">'/api/v1/products/<string:id>'</span>, methods=[<span class="hljs-string">'GET'</span>]</span>)</span> <span class="hljs-keyword">def</span> <span class="hljs-title function_">get_product</span>(<span class="hljs-params"><span class="hljs-built_in">id</span></span>): <span class="hljs-comment"># code to fetch a product by id from the database</span> <span class="hljs-keyword">return</span> jsonify(product)</pre></div><div id="8609"><pre><span class="hljs-variable">@app</span>.route(<span class="hljs-string">'/api/v1/products'</span>, methods=[<span class="hljs-string">'POST'</span>]) <span class="hljs-keyword">def</span> <span class="hljs-title function_">add_product</span>(): <span class="hljs-comment"># code to add a new product to the database</span> <span class="hljs-keyword">return</span> jsonify({<span class="hljs-string">'message'</span>: <span class="hljs-string">'Product added successfully'</span>})</pre></div><div id="34ff"><pre><span class="hljs-meta">@app.route(<span class="hljs-params"><span class="hljs-string">'/api/v1/products/<string:id>'</span>, methods=[<span class="hljs-string">'PUT'</span>]</span>)</span> <span class="hljs-keyword">def</span> <span class="hljs-title function_">update_product</span>(<span class="hljs-params"><span class="hljs-built_in">id</span></span>): <span class="hljs-comment"># code to update a product by id in the database</span> <span class="hljs-keyword">return</span> jsonify({<span class="hljs-string">'message'</span>: <span class="hljs-string">'Product updated successfully'</span>})</pre></div><div id="9972"><pre><span class="hljs-meta">@app.route(<span class="hljs-params"><span class="hljs-string">'/api/v1/products/<string:id>'</span>, methods=[<span class="hljs-string">'DELETE'</span>]</span>)</span> <span class="hljs-keyword">def</span> <span class="hljs-title function_">delete_product</span>(<span class="hljs-params"><span class="hljs-built_in">id</span></span>): <span class="hljs-comment"># code to delete a product by id from the database</span> <span class="hljs-keyword">return</span> jsonify({<span class="hljs-string">'message'</span>: <span class="hljs-string">'Product deleted successfully'</span>})</pre></div><p id="622f">In the code above, we’ve defined five endpoints:</p><ol><li><i>GET /api/v1/products: Returns a list of all products in the database.</i></li><li><i>GET /api/v1/products/:id: Returns a specific product by its ID.</i></li><li><i>POST /api/v1/products: Adds a new product to the database.</i></li><li><i>PUT /api/v1/products/:id: Updates a specific product by its ID.</i></li><li><i>DELETE /api/v1/products/:id: Deletes a specific product by its ID</i>.</li></ol><p id="1ac0"><b>A Python script for Amazon using APIs:</b></p><div id="7570"><pre><span class="hljs-keyword">import</span> requests <span class="hljs-keyword">import</span> json</pre></div><div id="32af"><pre><span class="hljs-comment"># Define the base URL for the Amazon API</span> <span class="hljs-attr">base_url</span> = <span class="hljs-string">"https://api.amazon.com/"</span></pre></div><div id="3f35"><pre><span class="hljs-comment"># Define the endpoint for retrieving information about a particular product</span> <span class="hljs-attr">product_info_endpoint</span> = <span class="hljs-string">"product/{product_id}"</span></pre></div><div id="bd05"><pre><span class="hljs-comment"># Define the endpoint for retrieving recommendations for a particular user</span> <span class="hljs-attr">recommendation_endpoint</span> = <span class="hljs-string">"recommendations/{user_id}"</span></pre></div><div id="d34e"><pre><span class="hljs-comment"># Define a function to retrieve information about a particular product</span> <span class="hljs-keyword">def</span> <span class="hljs-title function_">get_product_info</span>(<span class="hljs-params">product_id</span>): url = base_url + product_info_endpoint.<span class="hljs-built_in">format</span>(product_id=product_id) response = requests.get(url) <span class="hljs-keyword">if</span> response.status_code == <span class="hljs-number">200</span>: product_info = json.loads(response.text) <span class="hljs-keyword">return</span> product_info <span class="hljs-keyword">else</span>: <span class="hljs-keyword">raise</span> Exception(<span class="hljs-string">"Failed to retrieve product information"</span>)</pre></div><div id="4039"><pre><span class="hljs-comment"># Define a function to retrieve recommendations for a particular user</span> <span class="hljs-keyword">def</span> <span class="hljs-title function_">get_recommendations</span>(<span class="hljs-params">user_id</span>): url = base_url + recommendation_endpoint.<span class="hljs-built_in">format</span>(user_id=user_id) response = requests.get(url) <span class="hljs-keyword">if</span> response.status_code == <span class="hljs-number">200</span>: recommendations = json.loads(response.text) <span class="hljs-keyword">return</span> recommendations <span class="hljs-keyword">else</span>: <span class="hljs-keyword">raise</span> Exception(<span class="hljs-string">"Failed to retrieve recommendations"</span>)</pre></div><div id="b3d4"><pre><span class="hljs-comment"># Example usage</span> <span class="hljs-attr">product_info</span> = get_product_info(<span class="hljs-string">"ABC123"</span>) <span class="hljs-attr">recommendations</span> = get_recommendations(<span class="hljs-string">"DEF456"</span>)</pre></div><div id="16c2"><pre><span class="hljs-function"><span class="hljs-title">print</span><span class="hljs-params">(product_info)</span></span> <span class="hljs-function"><span class="hljs-title">print</span><span class="hljs-params">(recommendations)</span></span></pre></div><p id="936b"><b><i>API design will be further discussed in the workflow video ( Coming soon. Subscribe Today)</i></b></p><div id="e4df" class="link-block"> <a href="https://www.youtube.com/channel/UCOdLTXh9sIiBR_s9yh3-bEQ/about"> <div> <div> <h2>Ignito</h2> <div><h3>Excited to share that we have launched our Youtube channel — Ignito to cover all the projects and coding exercise for …</h3></div> <div><p>www.youtube.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*xRW1FtTkQFt8vXNZ)"></div> </div> </div> </a> </div><h1 id="2c23">Complete Detailed Design</h1><p id="baa0"><b><i>( Zoom it)</i></b></p><figure id="373e"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*[email protected]"><figcaption>Pic credits : Naina Chaturvedi</figcaption></figure><h1 id="f5bd">Code</h1><p id="c5b6"><b>Code implementation for above mentioned features —</b></p><ul><li><b>Search for the items: </b>To search for items on Flipkart, we can use the requests and BeautifulSoup libraries in Python to scrape the search results page. Here is a code implementation to search for “apple watch” on Flipkart:</li></ul><div id="abe5"><pre><span class="hljs-keyword">import</span> requests <span class="hljs-keyword">from</span> bs4 <span class="hljs-keyword">import</span> <span class="hljs-title class_">BeautifulSoup</span></pre></div><div id="bb96"><pre><span class="hljs-attr">url</span> = <span class="hljs-string">"https://www.flipkart.com/search?q=apple+watch&amp;otracker=search&amp;otracker1=search&amp;marketplace=FLIPKART&amp;as-show=on&amp;sort=relevance"</span> <span class="hljs-attr">response</span> = requests.get(url) <span class="hljs-attr">soup</span> = BeautifulSoup(response.text, <span class="hljs-string">'html.parser'</span>)</pre></div><div id="5fbd"><pre><span class="hljs-comment"># Get all the product names from the search result page</span> product_names = [<span class="hljs-built_in">item</span>.<span class="hljs-built_in">text</span> <span class="hljs-keyword">for</span> <span class="hljs-built_in">item</span> <span class="hljs-keyword">in</span> soup.find_all('<span class="hljs-keyword">div</span>', {'<span class="hljs-built_in">class</span>': '_4rR01T'})] print(product_names)</pre></div><ul><li><b>Add items to cart or wishlist:</b> To add items to the cart or wishlist, we need to simulate the user’s actions using Selenium or any other web automation library. Here is a code implementation to add the first item in the search results to the cart:</li></ul><div id="7200"><pre><span class="hljs-keyword">from</span> selenium <span class="hljs-keyword">import</span> webdriver <span class="hljs-keyword">from</span> selenium.webdriver.common.keys <span class="hljs-keyword">import</span> Keys

driver = webdriver.Chrome() driver.get(url)

<span class="hljs-comment"># Click on the first product in the search results</span> driver.find_element_by_css_selector(<span class="hljs-string">'.s-result-item .a-link-normal'</span>).click()

<span class="hljs-comment"># Click on the "Add to Cart" button</span> driver.find_element_by_id(<span class="hljs-string">'add-to-cart-button'</span>).click()</pre></div><ul><li><b>Gives catalog of all the items/products: </b>We can scrape the Amazon category pages to get a list of all the products in a particular category. Here is a code implementation to get a list of all the products in the "Electronics" category:</li></ul><div id="e55d"><pre><span class="hljs-keyword">import</span> requests <span class="hljs-keyword">from</span> bs4 <span class="hljs-keyword">import</span> BeautifulSoup

url = <span class="hljs-string">"https://www.amazon.com/s?i=electronics"</span> headers = { <span class="hljs-string">'User-Agent'</span>: <span class="hljs-string">'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36'</span>} response = requests.get(url, headers=headers) soup = BeautifulSoup(response.text, <span class="hljs-string">'html.parser'</span>)

<span class="hljs-comment"># Get all the product names from the category page</span> product_names = [item.text.strip() <span class="hljs-keyword">for</span> item <span class="hljs-keyword">in</span> soup.select(<span class="hljs-string">'.s-result-item .a-text-normal'</span>)] <span class="hljs-built_in">print</span>(product_names)</pre></div><ul><li><b>View Order history: </b>To view the order history, we need to log in to the Amazon account using Selenium or any other web automation library and navigate to the "Your Orders" page. Here is a code implementation to navigate to the "Your Orders" page:</li></ul><div id="cf96"><pre><span class="hljs-keyword">from</span> selenium <span class="hljs-keyword">import</span> webdriver <span class="hljs-keyword">from</span> selenium.webdriver.common.keys <span class="hljs-keyword">import</span> Keys

driver = webdriver.Chrome() driver.get(<span class="hljs-string">'https://www.amazon.com/'</span>)

<span class="hljs-comment"># Login to the Amazon account</span> driver.find_element_by_id(<span class="hljs-string">'nav-link-accountList-nav-line-1'</span>).click() email = <span class="hljs-string">'[email protected]'</span> password = <span class="hljs-string">'your-password'</span> driver.find_element_by_id(<span class="hljs-string">'ap_email'</span>).send_keys(email) driver.find_element_by_id(<span class="hljs-string">'continue'</span>).click() driver.find_element_by_id(<span class="hljs-string">'ap_password'</span>).send_keys(password) driver.find_element_by_id(<span class="hljs-string">'signInSubmit'</span>).click()

<span class="hljs-comment"># Navigate to the "Your Orders" page</span> driver.find_element_by_id(<span class="hljs-string">'nav-orders'</span>).click()</pre></div><ul><li><b>Track their orders: </b>To track orders, we need to navigate to the “Track Package” page for a particular order using Selenium or any other web automation library. Here is a code implementation to track the first order in the “Your Orders” page:</li></ul><div id="908c"><pre><span class="hljs-keyword">from</span> selenium <span class="hljs-keyword">import</span> webdriver <span class="hljs-keyword">from</span> selenium.<span class="hljs-property">webdriver</span>.<span class="hljs-property">common</span>.<span class="hljs-property">keys</span> <span class="hljs-keyword">import</span> <span class="hljs-title class_">Keys</span></pre></div><div id="169e"><pre>driver = webdriver.Chrome() driver.<span class="hljs-built_in">get</span>(<span class="hljs-string">'https://www.amazon.com/'</span>)</pre></div><div id="8301"><pre><span class="hljs-comment"># Login to the Amazon account</span> <span class="hljs-comment"># ...</span></pre></div><div id="3224"><pre><span class="hljs-meta"># Navigate to the <span class="hljs-string">"Your Orders"</span> page</span> driver.find_element_by_id(<span class="hljs-string">'nav-orders'</span>).click()</pre></div><div id="52de"><pre><span class="hljs-comment"># Track the first order in the list</span> order_number = driver.find_element_by_css_selector<span class="hljs-params">('.a-link-normal .a-color-secondary')</span><span class="hljs-string">.text</span> driver.get<span class="hljs-params">(f'https://www.amazon.com/progress-tracker/package/<span class="hljs-attr">ref</span>=oh_aui_ajax_dpi?<span class="hljs-attr">_encoding</span>=UTF8&<span class="hljs-attr">itemId</span>=&<span class="hljs-attr">orderId</span>={order_number}')</span></pre></div><ul><li><b>Add inventory (on sellers side) using python code: </b>To add inventory on the seller’s side, we need to log in to the seller account using Selenium or any other web automation library and navigate to the “Manage Inventory” page. Here is a code implementation to navigate to the “Manage Inventory” page:</li></ul><div id="4f69"><pre><span class="hljs-keyword">from</span> selenium <span class="hljs-keyword">import</span> webdriver <span class="hljs-keyword">from</span> selenium.webdriver.common.keys <span class="hljs-keyword">import</span> Keys

driver = webdriver.Chrome() driver.get(<span class="hljs-string">'https://sellercentral.amazon.com/'</span>)

<span class="hljs-comment"># Login to the seller account</span> email = <span class="hljs-string">'[email protected]'</span> password = <span class="hljs-string">'your-password'</span> driver.find_element_by_id(<span class="hljs-string">'ap_email'</span>).send_keys(email) driver.find_element_by_id(<span class="hljs-string">'ap_password'</span>).send_keys(password) driver.find_element_by_id(<span class="hljs-string">'signInSubmit'</span>).click()

<span class="hljs-comment"># Navigate to the "Manage Inventory" page</span> driver.find_element_by_id(<span class="hljs-string">'inventory-link'</span>).click()</pre></div><ul><li><b>Add inventory to a specific product: </b>To add inventory to a specific product, we need to navigate to the product detail page using Selenium or any other web automation library and update the available quantity. Here is a code implementation to add 10 units of inventory to a specific product:</li></ul><div id="6592"><pre><span class="hljs-keyword">from</span> selenium <span class="hljs-keyword">import</span> webdriver <span class="hljs-keyword">from</span> selenium.<span class="hljs-property">webdriver</span>.<span class="hljs-property">common</span>.<span class="hljs-property">keys</span> <span class="hljs-keyword">import</span> <span class="hljs-title class_">Keys</span></pre></div><div id="4da9"><pre>driver = webdriver.Chrome() driver.<span class="hljs-built_in">get</span>(<span class="hljs-string">'https://sellercentral.amazon.com/'</span>)</pre></div><div id="7fa0"><pre><span class="hljs-comment"># Login to the seller account</span> <span class="hljs-comment"># ...</span></pre></div><div id="f0ad"><pre><span class="hljs-comment"># Navigate to the "Manage Inventory" page</span> <span class="hljs-comment"># ...</span></pre></div><div id="d4e2"><pre><span class="hljs-comment"># Navigate to the product detail page</span> <span class="hljs-built_in">asin</span> = <span class="hljs-string">'B07N4M9V8P'</span> driver.<span class="hljs-built_in">get</span>(f<span class="hljs-string">'https://www.amazon.com/dp/{asin}'</span>)</pre></div><div id="ce0d"><pre><span class="hljs-comment"># Update the available quantity</span> driver.find_element_by_id(<span class="hljs-string">'quantity'</span>).<span class="hljs-built_in">clear</span>() driver.find_element_by_id(<span class="hljs-string">'quantity'</span>).send_keys(<span class="hljs-string">'10'</span>) driver.find_element_by_id(<span class="hljs-string">'submit-button'</span>).click()</pre></div><h1 id="93e2">More about Amazon System Design—</h1><p id="e994">User Management:</p><div id="afdf"><pre><span class="hljs-keyword">class</span> <span class="hljs-title class_">User</span>: <span class="hljs-keyword">def</span> <span class="hljs-title function_">init</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, username, password</span>): <span class="hljs-variable language_">self</span>.username = username <span class="hljs-variable language_">self</span>.password = password</pre></div><div id="af7b"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">authenticate</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, password</span>): <span class="hljs-keyword">return</span> <span class="hljs-variable language_">self</span>.password == password</pre></div><div id="f930"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">change_password</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, new_password</span>): <span class="hljs-variable language_">self</span>.password = new_password</pre></div><div id="c556"><pre><span class="hljs-comment"># Usage example</span> <span class="hljs-keyword">user</span> = <span class="hljs-keyword">User</span>(<span class="hljs-string">"john_doe"</span>, <span class="hljs-string">"password123"</span>) authenticated = <span class="hljs-keyword">user</span>.authenticate(<span class="hljs-string">"password123"</span>) <span class="hljs-keyword">user</span>.change_password(<span class="hljs-string">"new_password123"</span>)</pre></div><p id="0e3d">Product Catalog:</p><div id="99bf"><pre><span class="hljs-keyword">class</span> <span class="hljs-title class_">Product</span>: <span class="hljs-keyword">def</span> <span class="hljs-title function_">init</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, name, price, category</span>): <span class="hljs-variable language_">self</span>.name = name <span class="hljs-variable language_">self</span>.price = price <span class="hljs-variable language_">self</span>.category = category</pre></div><div id="f071"><pre><span class="hljs-keyword">class</span> <span class="hljs-title class_">ProductCatalog</span>: <span class="hljs-keyword">def</span> <span class="hljs-title function_">init</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span></span>): <span class="hljs-variable language_">self</span>.products = []</pre></div><div id="5b08"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">add_product</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, product</span>): <span class="hljs-variable language_">self</span>.products.append(product)</pre></div><div id="0bc1"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">search_products</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, keyword</span>): <span class="hljs-keyword">return</span> [product <span class="hljs-keyword">for</span> product <span class="hljs-keyword">in</span> <span class="hljs-variable language_">self</span>.products <span class="hljs-keyword">if</span> keyword <span class="hljs-keyword">in</span> product.name]</pre></div><div id="057d"><pre><span class="hljs-comment"># Usage example</span> catalog = ProductCatalog() product1 = Product(<span class="hljs-string">"iPhone X"</span>, 999, <span class="hljs-string">"Electronics"</span>) product2 = Product(<span class="hljs-string">"Samsung Galaxy"</span>, 899, <span class="hljs-string">"Electronics"</span>) catalog.add_product(product1) catalog.add_product(product2) results = catalog.search_products(<span class="hljs-string">"iPhone"</span>)</pre></div><p id="89fe">Inventory Management:</p><div id="86e9"><pre><span class="hljs-keyword">class</span> <span class="hljs-title class_">Inventory</span>: <span class="hljs-keyword">def</span> <span class="hljs-title function_">init</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, product, stock</span>): <span class="hljs-variable language_">self</span>.product = product <span class="hljs-variable language_">self</span>.stock = stock</pre></div><div id="0e02"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">update_stock</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, quantity</span>): <span class="hljs-variable language_">self</span>.stock += quantity</pre></div><div id="b145"><pre><span class="hljs-comment"># Usage example</span> <span class="hljs-attribute">product</span> = Product(<span class="hljs-string">"iPhone X"</span>, <span class="hljs-number">999</span>, <span class="hljs-string">"Electronics"</span>) <span class="hljs-attribute">inventory</span> = Inventory(product, <span class="hljs-number">10</span>) <span class="hljs-attribute">inventory</span>.update_stock(<span class="hljs-number">5</span>)</pre></div><p id="7ed5">Order Processing:</p><div id="9a19"><pre><span class="hljs-keyword">class</span> <span class="hljs-title class_">Order</span>: <span class="hljs-keyword">def</span> <span class="hljs-title function_">init</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, user, products</span>): <span class="hljs-variable language_">self</span>.user = user <span class="hljs-variable language_">self</span>.products = products</pre></div><div id="4f11"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">process</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span></span>): <span class="hljs-comment"># Logic for order processing</span></pre></div><div id="8e4b"><pre><span class="hljs-comment"># Usage example</span> <span class="hljs-keyword">user</span> <span class="hljs-title">= User</span>(<span class="hljs-string">"john_doe"</span>, <span class="hljs-string">"password123"</span>) products = [product1, product2] <span class="hljs-keyword">order</span> <span class="hljs-title">= Order</span>(user, products) order.process()</pre></div><p id="59d5">Recommendation and Personalization:</p><div id="ea86"><pre><span class="hljs-keyword">class</span> <span class="hljs-title class_">RecommendationEngine</span>: <span class="hljs-keyword">def</span> <span class="hljs-title function_">init</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, products</span>): <span class="hljs-variable language_">self</span>.products = products</pre></div><div id="ce9b"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">recommend_products</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, user</span>): <span class="hljs-comment"># Recommendation algorithm logic</span></pre></div><div id="b4ab"><pre><span class="hljs-comment"># Usage example</span> <span class="hljs-attr">product1</span> = Product(<span class="hljs-string">"iPhone X"</span>, <span class="hljs-number">999</span>, <span class="hljs-string">"Electronics"</span>) <span class="hljs-attr">product2</span> = Product(<span class="hljs-string">"Samsung Galaxy"</span>, <span class="hljs-number">899</span>, <span class="hljs-string">"Electronics"</span>) <span class="hljs-attr">products</span> = [product1, product2] <span class="hljs-attr">engine</span> = RecommendationEngine(products) <span class="hljs-attr">recommended_products</span> = engine.recommend_products(user)</pre></div><p id="1a87">Customer Reviews and Ratings:</p><div id="1a37"><pre><span class="hljs-keyword">class</span> <span class="hljs-title class_">Review</span>: <span class="hljs-keyword">def</span> <span class="hljs-title function_">init</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, user, product, rating, content</span>): <span class="hljs-variable language_">self</span>.user = user <span class="hljs-variable language_">self</span>.product = product <span class="hljs-variable language_">self</span>.rating = rating <span class="hljs-variable language_">self</span>.content = content</pre></div><div id="1c29"><pre><span class="hljs-keyword">class</span> <span class="hljs-title class_">ReviewSystem</span>: <span class="hljs-keyword">def</span> <span class="hljs-title function_">init</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span></span>): <span class="hljs-variable language_">self</span>.reviews = []</pre></div><div id="659a"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">add_review</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, review</span>): <span class="hljs-variable language_">self</span>.reviews.append(review)</pre></div><div id="2148"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">get_reviews_for_product</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, product</span>): <span class="hljs-keyword">return</span> [review <span class="hljs-keyword">for</span> review <span class="hljs-keyword">in</span> <span class="hljs-variable language_">self</span>.reviews <span class="hljs-keyword">if</span> review.product == product]</pre></div><div id="503e"><pre><span class="hljs-comment"># Usage example</span> review1 = Review(<span class="hljs-literal">user</span>, product1, <span class="hljs-number">5</span>, <span class="hljs-string">"Great product!"</span>) review2 = Review(<span class="hljs-literal">user</span>, product2, <span class="hljs-number">4</span>, <span class="hljs-string">"Good value for money."</span>) review_<span class="hljs-params">system</span> = Review<span class="hljs-params">System</span>() review_<span class="hljs-params">system</span>.add_review(review1) review_<span class="hljs-params">system</span>.add_review(review2) reviews = review_<span class="hljs-params">system</span>.get_reviews_for_product(product1)</pre></div><p id="1e4a">Payment Processing:</p><div id="1d4a"><pre><span class="hljs-keyword">import</span> random</pre></div><div id="b559"><pre><span class="hljs-keyword">class</span> <span class="hljs-title class_">PaymentGateway</span>: <span class="hljs-keyword">def</span> <span class="hljs-title function_">process_payment</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, amount, card_number</span>): <span class="hljs-comment"># Logic for processing payment</span> transaction_id = random.randint(<span class="hljs-number">1000</span>, <span class="hljs-number">9999</span>) <span class="hljs-keyword">return</span> transaction_id</pre></div><div id="7ce5"><pre><span class="hljs-comment"># Usage example</span> <span class="hljs-attr">payment_gateway</span> = PaymentGateway() <span class="hljs-attr">transaction_id</span> = payment_gateway.process_payment(<span class="hljs-number">100.0</span>, <span class="hljs-string">"1234-5678-9012-3456"</span>)</pre></div><p id="2668">Customer Support and Messaging:</p><div id="aaa4"><pre><span class="hljs-keyword">class</span> <span class="hljs-title class_">CustomerSupport</span>: <span class="hljs-keyword">def</span> <span class="hljs-title function_">init</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span></span>): <span class="hljs-variable language_">self</span>.tickets = []</pre></div><div id="eed0"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">create_ticket</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, user, issue</span>): ticket_id = len(<span class="hljs-variable language_">self</span>.tickets) + <span class="hljs-number">1</span> ticket = {<span class="hljs-string">"ticket_id"</span>: ticket_id, <span class="hljs-string">"user"</span>: user, <span class="hljs-string">"issue"</span>: issue} <span class="hljs-variable language_">self</span>.tickets.append(ticket) <span class="hljs-keyword">return</span> ticket_id</pre></div><div id="7d77"><pre><span class="hljs-comment"># Usage example</span> <span class="hljs-attr">customer_support</span> = CustomerSupport() <span class="hljs-attr">ticket_id</span> = customer_support.create_ticket(user, <span class="hljs-string">"I have an issue with my order."</span>)</pre></div><p id="c5ce">Seller Management:</p><div id="f94d"><pre><span class="hljs-keyword">class</span> <span class="hljs-title class_">Seller</span>: <span class="hljs-keyword">def</span> <span class="hljs-title function_">init</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, name, products</span>): <span class="hljs-variable language_">self</span>.name = name <span class="hljs-variable language_">self</span>.products = products</pre></div><div id="35f7"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">add_product</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, product</span>): <span class="hljs-variable language_">self</span>.products.append(product)</pre></div><div id="94c0"><pre><span class="hljs-comment"># Usage example</span> seller = Seller(<span class="hljs-string">"ABC Electronics"</span>, []) seller.add_product(product1) seller.add_product(product2)</pre></div><p id="81a0">Scalability and Performance:</p><div id="8a7b"><pre><span class="hljs-keyword">class</span> <span class="hljs-title class_">CachingMechanism</span>: <span class="hljs-keyword">def</span> <span class="hljs-title function_">init</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span></span>): <span class="hljs-variable language_">self</span>.cache = {}</pre></div><div id="4f1d"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">get</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, key</span>): <span class="hljs-keyword">return</span> <span class="hljs-variable language_">self</span>.cache.get(key)</pre></div><div id="40f9"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">set</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, key, value</span>): <span class="hljs-variable language_">self</span>.cache[key] = value</pre></div><div id="31b3"><pre><span class="hljs-comment"># Usage example</span> cache = CachingMechanism() cache.<span class="hljs-built_in">set</span>(<span class="hljs-string">"product_1"</span>, product1) cached_product = cache.<span class="hljs-built_in">get</span>(<span class="hljs-string">"product_1"</span>)</pre></div><p id="4bac">Analytics and Reporting:</p><div id="2bc9"><pre><span class="hljs-keyword">class</span> <span class="hljs-title class_">AnalyticsEngine</span>: <span class="hljs-keyword">def</span> <span class="hljs-title function_">init</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span></span>): <span class="hljs-variable language_">self</span>.sales_data = []</pre></div><div id="7be3"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">track_sale</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, product, quantity, price</span>): sale = {<span class="hljs-string">"product"</span>: product, <span class="hljs-s

Options

tring">"quantity"</span>: quantity, <span class="hljs-string">"price"</span>: price} <span class="hljs-variable language_">self</span>.sales_data.append(sale)</pre></div><div id="ac3a"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">calculate_total_revenue</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span></span>): <span class="hljs-keyword">return</span> sum(sale[<span class="hljs-string">"quantity"</span>] * sale[<span class="hljs-string">"price"</span>] <span class="hljs-keyword">for</span> sale <span class="hljs-keyword">in</span> <span class="hljs-variable language_">self</span>.sales_data)</pre></div><div id="e5e8"><pre><span class="hljs-comment"># Usage example</span> <span class="hljs-attribute">analytics</span> = AnalyticsEngine() <span class="hljs-attribute">analytics</span>.track_sale(product1, <span class="hljs-number">2</span>, <span class="hljs-number">999</span>) <span class="hljs-attribute">analytics</span>.track_sale(product2, <span class="hljs-number">1</span>, <span class="hljs-number">899</span>) <span class="hljs-attribute">total_revenue</span> = analytics.calculate_total_revenue()</pre></div><p id="b095">Scalability and Performance:</p><div id="4488"><pre><span class="hljs-keyword">class</span> <span class="hljs-title class_">CachingMechanism</span>: <span class="hljs-keyword">def</span> <span class="hljs-title function_">init</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span></span>): <span class="hljs-variable language_">self</span>.cache = {}</pre></div><div id="33d7"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">get</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, key</span>): <span class="hljs-keyword">return</span> <span class="hljs-variable language_">self</span>.cache.get(key)</pre></div><div id="eb81"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">set</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, key, value</span>): <span class="hljs-variable language_">self</span>.cache[key] = value</pre></div><div id="644e"><pre><span class="hljs-comment"># Usage example</span> cache = CachingMechanism() cache.<span class="hljs-built_in">set</span>(<span class="hljs-string">"product_1"</span>, product1) cached_product = cache.<span class="hljs-built_in">get</span>(<span class="hljs-string">"product_1"</span>)</pre></div><p id="ee79">Customer Support and Messaging:</p><div id="a995"><pre><span class="hljs-keyword">class</span> <span class="hljs-title class_">CustomerSupport</span>: <span class="hljs-keyword">def</span> <span class="hljs-title function_">init</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span></span>): <span class="hljs-variable language_">self</span>.tickets = []</pre></div><div id="0848"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">create_ticket</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, user, issue</span>): ticket_id = len(<span class="hljs-variable language_">self</span>.tickets) + <span class="hljs-number">1</span> ticket = {<span class="hljs-string">"ticket_id"</span>: ticket_id, <span class="hljs-string">"user"</span>: user, <span class="hljs-string">"issue"</span>: issue} <span class="hljs-variable language_">self</span>.tickets.append(ticket) <span class="hljs-keyword">return</span> ticket_id</pre></div><div id="e489"><pre><span class="hljs-comment"># Usage example</span> <span class="hljs-attr">customer_support</span> = CustomerSupport() <span class="hljs-attr">ticket_id</span> = customer_support.create_ticket(user, <span class="hljs-string">"I have an issue with my order."</span>)</pre></div><p id="1a27"><b>Scalability and Performance:</b></p><p id="4749">Horizontal and vertical scaling strategies for handling increased traffic and user growth. Caching mechanisms (e.g., in-memory caching, CDN) to improve system performance. Load balancing, sharding, and replication techniques.</p><div id="6a61"><pre><span class="hljs-keyword">class</span> <span class="hljs-title class_">CachingMechanism</span>: <span class="hljs-keyword">def</span> <span class="hljs-title function_">init</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span></span>): <span class="hljs-variable language_">self</span>.cache = {}</pre></div><div id="26db"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">get</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, key</span>): <span class="hljs-keyword">return</span> <span class="hljs-variable language_">self</span>.cache.get(key)</pre></div><div id="e265"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">set</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, key, value</span>): <span class="hljs-variable language_">self</span>.cache[key] = value</pre></div><div id="9165"><pre><span class="hljs-comment"># Usage example</span> cache = CachingMechanism() cache.<span class="hljs-built_in">set</span>(<span class="hljs-string">"product_1"</span>, product1) cached_product = cache.<span class="hljs-built_in">get</span>(<span class="hljs-string">"product_1"</span>)</pre></div><p id="2747"><b>Analytics and Reporting:</b></p><p id="c1d4">Collecting and analyzing system metrics to gain insights into user behavior and sales performance. Implementing analytics tools for sales, inventory, and customer behavior. Providing reporting functionalities for sellers.</p><div id="60c5"><pre><span class="hljs-keyword">class</span> <span class="hljs-title class_">AnalyticsEngine</span>: <span class="hljs-keyword">def</span> <span class="hljs-title function_">init</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span></span>): <span class="hljs-variable language_">self</span>.sales_data = []</pre></div><div id="26c6"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">track_sale</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span>, product, quantity, price</span>): sale = {<span class="hljs-string">"product"</span>: product, <span class="hljs-string">"quantity"</span>: quantity, <span class="hljs-string">"price"</span>: price} <span class="hljs-variable language_">self</span>.sales_data.append(sale)</pre></div><div id="8995"><pre> <span class="hljs-keyword">def</span> <span class="hljs-title function_">calculate_total_revenue</span>(<span class="hljs-params"><span class="hljs-variable language_">self</span></span>): <span class="hljs-keyword">return</span> sum(sale[<span class="hljs-string">"quantity"</span>] * sale[<span class="hljs-string">"price"</span>] <span class="hljs-keyword">for</span> sale <span class="hljs-keyword">in</span> <span class="hljs-variable language_">self</span>.sales_data)</pre></div><div id="03da"><pre><span class="hljs-comment"># Usage example</span> <span class="hljs-attribute">analytics</span> = AnalyticsEngine() <span class="hljs-attribute">analytics</span>.track_sale(product1, <span class="hljs-number">2</span>, <span class="hljs-number">999</span>) <span class="hljs-attribute">analytics</span>.track_sale(product2, <span class="hljs-number">1</span>, <span class="hljs-number">899</span>) <span class="hljs-attribute">total_revenue</span> = analytics.calculate_total_revenue()</pre></div><h1 id="c96c">Read next — how to Design the Amazon Prime Video.</h1><div id="6edb" class="link-block"> <a href="https://readmedium.com/day-23-of-system-design-case-studies-series-design-amazon-prime-video-269b28f8675f"> <div> <div> <h2>Day 23 of System Design Case Studies Series : Design Amazon Prime Video</h2> <div><h3>Complete Design with examples</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*dzdo8jRT9qtrk9yU.png)"></div> </div> </div> </a> </div><blockquote id="6810"><p><b>Day 1 : <a href="https://readmedium.com/day-1-of-15-days-of-advanced-sql-series-a3676272dd5f?sk=991e8c82a9c378675080b83254ad13a2">SQL Basics and Kick start of Advanced SQL Series</a></b></p></blockquote><blockquote id="3423"><p><b>Day 2 : <a href="https://readmedium.com/day-1-of-15-days-of-advanced-sql-series-a3676272dd5f?sk=991e8c82a9c378675080b83254ad13a2">SQL Basics, Query Structure, Built In functions Conditions</a></b></p></blockquote><blockquote id="9f47"><p><b>Day 3 : <a href="https://readmedium.com/day-3-of-15-days-of-advanced-sql-series-c2ab52598a50?sk=bf9fb75360feb5d6506d04d011414d76">Most Important Commands, Joins and Filters</a></b></p></blockquote><blockquote id="b9e1"><p><b>Day 4 : <a href="https://readmedium.com/day-4-of-15-days-of-advanced-sql-series-3c06c9e1fc26?sk=336c132c67279805ba770156ed8e506d">Set Theory Operations, Stored Procedures and CASE statements in SQL</a></b></p></blockquote><blockquote id="718d"><p><b>Day 5 : <a href="https://readmedium.com/day-5-of-15-days-of-advanced-sql-series-310023a4083?sk=81c0eed74a24f3e43e54a0f087b898e7">Wildcards, Aggregation and Sequences in SQL</a></b></p></blockquote><blockquote id="daec"><p><b>Day 6 : <a href="https://readmedium.com/day-6-of-15-days-of-advanced-sql-series-548769f14138?sk=5a1b436c8b6ca2a738ba865f1972ee19">Subqueries, Group by, order by and Having clauses in SQL and Analytical Functions</a></b></p></blockquote><blockquote id="d268"><p><b>Day 7 : <a href="https://readmedium.com/day-7-of-15-days-of-advanced-sql-series-5f93bbfa734?sk=1b0e08bb48cf75d76f327053814ad4a7">Window Functions, Grouping Sets and Constraints in SQL</a></b></p></blockquote><blockquote id="fe1f"><p><b>Day 8 : <a href="https://readmedium.com/day-8-of-15-days-of-advanced-sql-series-8387b74d270?sk=2734fb4be2e7968e0fa27612785a76ed">BigQuery Basics, SELECT, FROM, WHERE and Date and Extract in BigQuery</a></b></p></blockquote><blockquote id="653c"><p><b>Day 9 : <a href="https://readmedium.com/day-9-of-15-days-of-advanced-sql-series-6bfde9f997a6?sk=fa5b407ba124825c5b3b26109999e28b">Common Expression Table, UNNEST Clause, SQL vs NoSQL Databases</a></b></p></blockquote><blockquote id="9d00"><p><b>Day 10 : <a href="https://readmedium.com/day-10-of-15-days-of-advanced-sql-series-9cb7438b1442?sk=437428d85d85281fa9c289fbafbaaa50">Triggers, Pivot and Cursors in SQL</a></b></p></blockquote><blockquote id="badc"><p><b>Day 11 : <a href="https://readmedium.com/day-11-of-15-days-of-advanced-sql-series-fbb863662786?sk=1342587e4be148ab2931280b52a3c05d">Views, Indexes and Auto Increment in SQL</a></b></p></blockquote><blockquote id="3b11"><p><b>Day 12 : <a href="https://readmedium.com/day-12-of-15-days-of-advanced-sql-series-98654987d9aa?sk=4c294f3c9807b87cceb52d6d8d7222bc">Query optimizations, Performance tuning in SQL</a></b></p></blockquote><blockquote id="8826"><p><b>Day 13 : <a href="https://readmedium.com/day-13-of-15-days-of-advanced-sql-series-991a315b73cf?sk=caacd74f6702270130e1875932e96d39">Introduction to MySQL, PostgreSQL and Mongo DB, Comparison between MySQL and PostgreSQL and Mongo DB, Introduction to SQL and NoSQL Databases</a></b></p></blockquote><blockquote id="5e9a"><p><b>Day 14 : <a href="https://readmedium.com/day-14-of-15-days-of-advanced-sql-series-c6126c3e8601?sk=221dc236be193d224b30a9d1972d3bb5">MySQL in Depth</a></b></p></blockquote><blockquote id="06b2"><p><b>Day 15 : <a href="https://readmedium.com/day-15-of-15-days-of-advanced-sql-series-9309f860bf1c?sk=4f44ece49732072fa796334f1611fc27">PostgreSQL inDepth</a></b></p></blockquote><p id="9662">Anyways, For Day 15 of 15 days of Advanced SQL, we will cover —</p><blockquote id="6da9"><p><b>PostgreSQL inDepth</b></p></blockquote><p id="bba6"><b><i>Github for Advanced SQL that you can follow —</i></b></p><div id="325c" class="link-block"> <a href="https://github.com/Coder-World04/Complete-Advanced-SQL-Series/blob/main/README.md"> <div> <div> <h2>Complete-Advanced-SQL-Series/README.md at main · Coder-World04/Complete-Advanced-SQL-Series</h2> <div><h3>This repository contains everything you need to become proficient in Advanced SQL Structured Query Language Query…</h3></div> <div><p>github.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*Ryx7inaYd_Q2GsQu)"></div> </div> </div> </a> </div><p id="3f6b"><b><i>All the projects, data structures, algorithms, system design, Data Science and ML, Data Engineering, MLOps and Deep Learning videos will be published on our youtube channel ( just launched).</i></b></p><p id="b7f2"><b><i>Subscribe today!</i></b></p><div id="93d8" class="link-block"> <a href="https://www.youtube.com/channel/UCOdLTXh9sIiBR_s9yh3-bEQ/about"> <div> <div> <h2>Ignito</h2> <div><h3>Excited to share that we have launched our Youtube channel — Ignito to cover all the projects and coding exercise for …</h3></div> <div><p>www.youtube.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*okwkD4LOH9YJcx2S)"></div> </div> </div> </a> </div><h1 id="29d1">System Design Case Studies — In Depth</h1><blockquote id="f5c2"><p><a href="https://readmedium.com/day-4-of-system-design-case-studies-series-design-instagram-part-1-10943440f29c?sk=38e68a213058e169e71754e00c501813"><b>Design Instagram</b></a></p></blockquote><blockquote id="380d"><p><a href="https://readmedium.com/day-5-of-system-design-case-studies-series-design-messenger-app-7b73c589f4a?sk=4a53b122e8f02836c17fa35622aa0309"><b>Design Messenger App</b></a></p></blockquote><blockquote id="20e8"><p><a href="https://readmedium.com/day-7-of-system-design-case-studies-series-design-twitter-fd0722d7bb7c?sk=cdfc23d38edd5f48dc30efdcc0801c3e"><b>Design Twitter</b></a></p></blockquote><blockquote id="c9fd"><p><a href="https://readmedium.com/day-8-of-system-design-case-studies-series-design-url-shortener-91c812a08e0b?sk=5e20d426c91ebaacfe43031bc43642da"><b>Design URL Shortener</b></a></p></blockquote><blockquote id="a6bc"><p><a href="https://readmedium.com/day-9-of-system-design-case-studies-series-design-dropbox-ead523ccccfa?sk=03b3b4ea3633051f7a9a7d379b1066b8"><b>Design Dropbox</b></a></p></blockquote><blockquote id="d03a"><p><a href="https://readmedium.com/day-10-of-system-design-case-studies-series-design-youtube-58bc4ad09c4b?sk=18560ffcc3d7174566d38d60c99d4914"><b>Design Youtube</b></a></p></blockquote><blockquote id="3c62"><p><a href="https://readmedium.com/day-11-of-system-design-case-studies-series-design-api-rate-limiter-8627993c5a92?sk=fad32cada40f414aef47b7928dfb7e67"><b>Design API Rate Limiter</b></a></p></blockquote><blockquote id="cf0a"><p><a href="https://readmedium.com/day-12-of-system-design-case-studies-series-design-web-crawler-efba93f40030?sk=185e88e37fbc3d30dcaf41bc3863a868"><b>Design Web Crawler</b></a></p></blockquote><blockquote id="4199"><p><a href="https://naina0412.medium.com/day-13-of-system-design-case-studies-series-design-facebooks-newsfeed-e96294c7d871?sk=f0956b536721902c7da6a1ec8e2f0880"><b>Design Facebook’s Newsfeed</b></a></p></blockquote><blockquote id="6006"><p><a href="https://readmedium.com/day-14-of-system-design-case-studies-series-design-yelp-af432d13e838?sk=55e19b7d8ad43c4109e9b1694678c177"><b>Design Yelp</b></a></p></blockquote><blockquote id="28fa"><p><a href="https://readmedium.com/day-15-of-system-design-case-studies-series-design-uber-2adc612701d?sk=d1c5481fcfd4f30e84074e5a5d7c548e"><b>Design Uber</b></a></p></blockquote><blockquote id="580e"><p><a href="https://readmedium.com/day-16-of-system-design-case-studies-series-design-tinder-a0867163f449?sk=6313f0b9760c3d78a17443a98bdb3330"><b>Design Tinder</b></a></p></blockquote><blockquote id="6b84"><p><a href="https://readmedium.com/day-17-of-system-design-case-studies-series-design-tiktok-58e5a93bcfb5?sk=5eed7cbac7af8b6506951417514ec8e0"><b>Design Tiktok</b></a></p></blockquote><blockquote id="1a51"><p><a href="https://readmedium.com/day-18-of-system-design-case-studies-series-design-whatsapp-38ec39f32b44?sk=89cc7003e78917fd65330ad56a7ed8f0"><b>Design Whatsapp</b></a></p></blockquote><blockquote id="5fc4"><p><a href="https://readmedium.com/most-popular-system-design-questions-mega-compilation-45218129fe26?sk=6432dd01c067dd28bc81da1dfceccdab"><b>Most Popular System Design Questions</b></a></p></blockquote><blockquote id="c87c"><p><a href="https://readmedium.com/quick-roundup-solved-system-design-case-studies-6ad776d437cf?sk=e42f56968e1b592382f484c222e7c111"><b>Mega Compilation : Solved System Design Case studies</b></a></p></blockquote><h1 id="c325">Complete Data Structures and Algorithm Series</h1><blockquote id="c8f1"><p><a href="https://readmedium.com/day-4-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-83d4c90d9115?sk=8ab3d284915f8f28534651d1c9cf41e5"><b>Complexity Analysis</b></a></p></blockquote><blockquote id="c155"><p><a href="https://readmedium.com/day-5-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-backtracking-f7de93dbe72d?sk=08c8ce11404387e46fdd73013aec267f"><b>Backtracking</b></a></p></blockquote><blockquote id="66fd"><p><a href="https://readmedium.com/day-3-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-af62dc4aec9c?sk=704354dbc4c0048ac0a0b5c97f1eef0e"><b>Sliding Window</b></a></p></blockquote><blockquote id="da37"><p><a href="https://readmedium.com/day-6-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-greedy-technique-4b219a8488d0?sk=540b74ce2d13f345dd00cbbfb252815f"><b>Greedy Technique</b></a></p></blockquote><blockquote id="d262"><p><a href="https://readmedium.com/day-8-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-two-pointer-7c513302dfa9?sk=cc32bc3ce22139845c64d195553859e0"><b>Two pointer Technique</b></a></p></blockquote><blockquote id="43b9"><p><a href="https://readmedium.com/day-11-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-arrays-bf7045a3c98b?sk=42ad70a29aa9f7891794d7feaa63bea9"><b>Arrays</b></a></p></blockquote><blockquote id="8dbb"><p><a href="https://readmedium.com/day-13-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-linked-list-6536f0041153?sk=952899c3d2e2bd5b4dbd6c8ad7debf05"><b>Linked List</b></a></p></blockquote><blockquote id="29e2"><p><a href="https://readmedium.com/day-12-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-strings-fa27c45a5fd6?sk=f6b3fc7bf5c770d2d04107667be1c446"><b>Strings</b></a></p></blockquote><blockquote id="95aa"><p><a href="https://readmedium.com/day-14-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-stack-b26d68eb3477?sk=ed28cc4e45134ad3562a3594ddea4017"><b>Stack</b></a></p></blockquote><blockquote id="d072"><p><a href="https://readmedium.com/day-15-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-queue-db38d5477cd5?sk=44ae516bf0f1da510ee9618b7f135995"><b>Queues</b></a></p></blockquote><blockquote id="0e08"><p><a href="https://readmedium.com/day-17-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-hash-ddfe72657211?sk=a457b598d5f5f3d2572029693c587198"><b>Hash Table/Hashing</b></a></p></blockquote><blockquote id="b6d3"><p><a href="https://readmedium.com/day-16-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-binary-search-8799ce6321cb?sk=e4ee1b96f1cd2f9531b5e739539d8b7e"><b>Binary Search</b></a></p></blockquote><blockquote id="5586"><p><a href="https://readmedium.com/day-7-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-1-d-dynamic-2560f585499?sk=0756b6bd798238d9a96fe3d161690350"><b>1- D Dynamic Programming</b></a></p></blockquote><blockquote id="be69"><p><a href="https://readmedium.com/day-10-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-divide-and-a00f7375507?sk=3d52023dade6f37c396b58e039ca29f2"><b>Divide and Conquer Technique</b></a></p></blockquote><blockquote id="b173"><p><a href="https://readmedium.com/day-9-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-recursion-ed6f7f41742?sk=bf98ce6abdb3e3f2fa71213c6ed8caa9"><b>Recursion</b></a></p></blockquote><p id="9215"><b>Github —</b></p><div id="3244" class="link-block"> <a href="https://github.com/Coder-World04/Complete-Data-Structures-and-Algorithms"> <div> <div> <h2>GitHub — Coder-World04/Complete-Data-Structures-and-Algorithms: This repository contains everything…</h2> <div><h3>This repository contains everything you need to become proficient in Data Structures and Algorithms Start here : Day 1…</h3></div> <div><p>github.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*82WWl4vZvYx1zwkR)"></div> </div> </div> </a> </div><h1 id="788c">Complete System Design Series.</h1><blockquote id="03f0"><p><a href="https://readmedium.com/complete-system-design-series-part-1-45bf9c8654bc"><b>1. System design basics</b></a></p></blockquote><blockquote id="c535"><p><a href="https://readmedium.com/complete-system-design-series-part-2-922f45f2faaf"><b>2. Horizontal and vertical scaling</b></a></p></blockquote><blockquote id="18a1"><p><a href="https://readmedium.com/part-3-complete-system-design-series-e1362baa8a4c"><b>3. Load balancing and Message queues</b></a></p></blockquote><blockquote id="4d43"><p><a href="https://readmedium.com/part-4-complete-system-design-series-138bc9fbcfc0"><b>4. High level design and low level design, Consistent Hashing, Monolithic and Microservices architecture</b></a></p></blockquote><blockquote id="d211"><p><a href="https://readmedium.com/part-5-complete-system-design-series-4b9b04f23608"><b>5. Caching, Indexing, Proxies</b></a></p></blockquote><blockquote id="10ec"><p><a href="https://readmedium.com/part-6-complete-system-design-series-59a2d8bbf1ed"><b>6. Networking, How Browsers work, Content Network Delivery ( CDN)</b></a></p></blockquote><blockquote id="2fb1"><p><a href="https://readmedium.com/part-7-complete-system-design-series-1bef528923d6"><b>7. Database Sharding, CAP Theorem, Database schema Design</b></a></p></blockquote><blockquote id="982a"><p><a href="https://readmedium.com/part-8-complete-system-design-series-57bc88433c8e"><b>8. Concurrency, API, Components + OOP + Abstraction</b></a></p></blockquote><blockquote id="f09e"><p><a href="https://readmedium.com/part-9-complete-system-design-series-df975c85ec51"><b>9. Estimation and Planning, Performance</b></a></p></blockquote><blockquote id="9128"><p><b>10. <a href="https://readmedium.com/part-10-complete-system-design-series-523b4dd978bf?sk=741f92929c8639a2e4cf218521e8cc4a">Map Reduce, Patterns and Microservices</a></b></p></blockquote><blockquote id="f879"><p><b>11. <a href="https://naina0412.medium.com/part-11-complete-system-design-series-9c8efbc0237a?sk=5bddf2adc78ea4947ae88ab21c94af1c">SQL vs NoSQL and Cloud</a></b></p></blockquote><blockquote id="bdf5"><p><a href="https://readmedium.com/most-popular-system-design-questions-mega-compilation-45218129fe26"><b>12. Most Popular System Design Questions</b></a></p></blockquote><h1 id="a23a">Github —</h1><div id="b414" class="link-block"> <a href="https://github.com/Coder-World04/Complete-System-Design/blob/main/README.md"> <div> <div> <h2>Complete-System-Design/README.md at main · Coder-World04/Complete-System-Design</h2> <div><h3>This repository contains everything you need to become proficient in System Design Topics you should know in System…</h3></div> <div><p>github.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/)"></div> </div> </div> </a> </div><p id="404a"><b><i>Subscribe/ Follow, Like/Clap and Stay Tuned!!</i></b></p><h1 id="c583">Some of the other best Series —</h1><blockquote id="ca4e"><p><a href="https://readmedium.com/day-1-day-60-quick-recap-of-60-days-of-data-science-and-ml-6fc021643d1?sk=4e75e043b7630a9f963562ebac94e129"><b>60 days of Data Science and ML Series with projects</b></a></p></blockquote><blockquote id="1ff6"><p><a href="https://readmedium.com/quick-recap-30-days-of-natural-language-processing-nlp-with-projects-series-ceb674e3c09b?sk=ca09b27b3d5867f23ab4dc367b6c0c32"><b>30 Days of Natural Language Processing ( NLP) Series</b></a></p></blockquote><blockquote id="c2cf"><p><a href="https://readmedium.com/day-1-of-30-days-of-machine-learning-ops-7c299e4b09be?sk=4ab48350a5c359fc157109e48b1d738f"><b>30 days of Machine Learning Ops</b></a></p></blockquote><blockquote id="5c01"><p><a href="https://readmedium.com/day-1-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-dsa-and-system-965e860ec677?sk=aa49bdbc46a72f600cb51774f0aea6b6"><b>30 days of Data Structures and Algorithms and System Design Simplified</b></a></p></blockquote><blockquote id="f2fd"><p><a href="https://readmedium.com/day-1-of-60-days-of-deep-learning-with-projects-series-4a5caa305cf6?sk=89f3d43dd450035546bf3a8cf85bb125"><b>60 Days of Deep Learning with Projects Series</b></a></p></blockquote><blockquote id="b8a0"><p><a href="https://readmedium.com/day-1-of-30-days-of-data-engineering-894822fcb128?sk=76ba558bfe2d9f85cbe741e505295531"><b>30 days of Data Engineering with projects Series</b></a></p></blockquote><blockquote id="9d85"><p><a href="https://readmedium.com/day-1-data-science-and-ml-research-papers-simplified-a68b00a3b1c4?sk=56136229ff738bd734f19d2b6953f78c"><b>Data Science and Machine Learning Research ( papers) Simplified</b></a><b> **</b></p></blockquote><blockquote id="fb06"><p><a href="https://readmedium.com/100-days-your-data-science-and-ml-degree-part-3-c621ecfdf711?sk=1a8c7b0c204d73432d56b7d1a3a26474"><b>100 days : Your Data Science and Machine Learning Degree Series with projects</b></a></p></blockquote><blockquote id="5203"><p><a href="https://ai.plainenglish.io/23-data-science-techniques-you-should-know-61bc2c9d1b3a?sk=1680c36193eb22198974c9008d62a33c"><b>23 Data Science Techniques You Should Know</b></a></p></blockquote><blockquote id="ac12"><p><a href="https://readmedium.com/mega-post-tech-interview-the-only-list-of-questions-you-need-to-practice-ee349ea197bb?sk=fac3614684daff4b50a70c0a71e4d528"><b>Tech Interview Series — Curated List of coding questions</b></a></p></blockquote><blockquote id="dede"><p><a href="https://readmedium.com/system-design-made-easy-quick-recap-of-complete-system-design-34af7e3aedfb?sk=bdd6a19edc1f3ce4a5064923f5b68721"><b>Complete System Design with most popular Questions Series</b></a></p></blockquote><blockquote id="6508"><p><a href="https://readmedium.com/complete-data-preprocessing-and-data-visualization-with-projects-mega-compilation-part-2-41584ef0920e?sk=842390da51689b8d43148c3980570db0"><b>Complete Data Visualization and Pre-processing Series with projects</b></a></p></blockquote><blockquote id="409a"><p><a href="https://readmedium.com/complete-python-and-projects-mega-compilation-7ec8f7adfe71?sk=ee0ecf43f23c6dd44dd35d984b3e5df4"><b>Complete Python Series with Projects</b></a></p></blockquote><blockquote id="67e0"><p><a href="https://readmedium.com/complete-advanced-python-with-projects-mega-compilation-part-6-729c1826032b?sk=7faffe20f8039fa57099f7a372b6d665"><b>Complete Advanced Python Series with Projects</b></a></p></blockquote><blockquote id="4ded"><p><a href="https://readmedium.com/my-list-of-kaggle-best-notebooks-topic-wise-data-science-and-machine-learning-part-2-84772863e9ae?sk=5ed02e419854a6c11add3ddc1e52947f"><b>Kaggle Best Notebooks that will teach you the most</b></a></p></blockquote><blockquote id="4b2e"><p><a href="https://medium.datadriveninvestor.com/the-complete-developers-guide-to-git-6a23125996e1?sk=e30479bbe713930ea93018e1a46d9185"><b>Complete Developers Guide to Git</b></a></p></blockquote><blockquote id="732e"><p><a href="https://readmedium.com/6-exceptional-github-repos-for-all-developers-part-1-21e8fa04e150?sk=9140b249af6fe73d45717185fad48962"><b>Exceptional Github Repos</b></a><b> — Part 1</b></p></blockquote><blockquote id="7079"><p><a href="https://readmedium.com/6-exceptional-github-repos-for-all-developers-part-2-3eec9a68c31c?sk=8e31d0eb7eb1d2d0bbbcecaa66bd4e7e"><b>Exceptional Github Repos</b></a><b> — Part 2</b></p></blockquote><blockquote id="d9c6"><p><a href="https://medium.datadriveninvestor.com/best-resources-for-data-science-and-machine-learning-full-list-5ceb9a2791bf?sk=cf85b2cef95560c58509877a794577ff"><b>All the Data Science and Machine Learning Resources</b></a></p></blockquote><blockquote id="b2cb"><p><a href="https://medium.datadriveninvestor.com/210-machine-learning-projects-with-source-code-that-you-can-build-today-721b035649e0?sk=da5f593572a0261a6314afad99a0356c"><b>210 Machine Learning Projects</b></a></p></blockquote><h2 id="9083">Tech Newsletter —</h2><blockquote id="f86c"><p>If you are interested, you can join my newsletter through which I send tech interview tips, techniques, patterns, hacks — Software Development, ML, Data Science, Startups and Technology projects to more than 30K readers. You can subscribe to <b>Tech Brew :</b></p></blockquote><div id="8d5c" class="link-block"> <a href="https://naina0405.substack.com/"> <div> <div> <h2>Ignito</h2> <div><h3>Data Science, ML, AI and more… Click to read Ignito, by Naina Chaturvedi, a Substack publication. Launched 7 months…</h3></div> <div><p>naina0405.substack.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*_ER1J-h50iqAjH70)"></div> </div> </div> </a> </div><p id="eb48"><b><i>For Python Projects —</i></b></p><div id="22a4" class="link-block"> <a href="https://readmedium.com/complete-python-and-projects-mega-compilation-7ec8f7adfe71"> <div> <div> <h2>Complete Python And Projects — Mega Compilation</h2> <div><h3>Everything that you need to know in Python with Projects…</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*NnCSMN6etFjjw4Jn.jpg)"></div> </div> </div> </a> </div><div id="471c" class="link-block"> <a href="https://medium.datadriveninvestor.com/analyzing-video-using-python-opencv-and-numpy-5471cab200c4"> <div> <div> <h2>Analyzing Video using Python, OpenCV and NumPy</h2> <div><h3>With Code Implementation…</h3></div> <div><p>medium.datadriveninvestor.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*PYNCDW3IXI2BcT5f.jpg)"></div> </div> </div> </a> </div><p id="f199"><b><i>For complete 60 days of Data Science and ML : Day 1 — Day 60 : Quick Recap of 60 days of Data Science and ML</i></b></p><div id="9d77" class="link-block"> <a href="https://readmedium.com/day-1-day-60-quick-recap-of-60-days-of-data-science-and-ml-6fc021643d1"> <div> <div> <h2>Day 1 — Day 60 : Quick Recap of 60 days of Data Science and ML</h2> <div><h3>Connect the ML dots…</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*ZfJ1yKIzPLGABAI_.png)"></div> </div> </div> </a> </div><p id="1253"><b><i>Follow for more updates. Stay tuned and keep coding!</i></b></p><h1 id="21c3">For other projects, tune to —</h1><p id="b31f"><b>Build Machine Learning Pipelines( With Code)</b></p><div id="5b37" class="link-block"> <a href="https://medium.datadriveninvestor.com/build-machine-learning-pipelines-with-code-part-1-bd3ed7152124"> <div> <div> <h2>Build Machine Learning Pipelines( With Code) — Part 1</h2> <div><h3>Complete implementation…</h3></div> <div><p>medium.datadriveninvestor.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*KdToBD8RDMBH4jXM.png)"></div> </div> </div> </a> </div><p id="946c"><b>Recurrent Neural Network with Keras</b></p><div id="f317" class="link-block"> <a href="https://medium.datadriveninvestor.com/recurrent-neural-network-with-keras-b5b5f6fe5187"> <div> <div> <h2>Recurrent Neural Network with Keras</h2> <div><h3>Project Implementation and cheatsheet…</h3></div> <div><p>medium.datadriveninvestor.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*xs3Dya3qQBx6IU7C.png)"></div> </div> </div> </a> </div><p id="ec53"><b>Clustering Geolocation Data in Python using DBSCAN and K-Means</b></p><div id="2b3e" class="link-block"> <a href="https://medium.datadriveninvestor.com/clustering-geolocation-data-in-python-using-dbscan-and-k-means-3705d9f44522"> <div> <div> <h2>Clustering Geolocation Data in Python using DBSCAN and K-Means</h2> <div><h3>Project Implementation…</h3></div> <div><p>medium.datadriveninvestor.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*0uPCZnohdaPCO4NN.png)"></div> </div> </div> </a> </div><p id="a29c"><b>Facial Expression Recognition using Keras</b></p><div id="ccaa" class="link-block"> <a href="https://medium.datadriveninvestor.com/facial-expression-recognition-using-keras-cbdd661a0a54"> <div> <div> <h2>Facial Expression Recognition using Keras</h2> <div><h3>Project Implementation…</h3></div> <div><p>medium.datadriveninvestor.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*CGch7hzdjg1fpgKy.jpg)"></div> </div> </div> </a> </div><p id="0db7"><b>Hyperparameter Tuning with Keras Tuner</b></p><div id="6dff" class="link-block"> <a href="https://medium.datadriveninvestor.com/hyperparameter-tuning-with-keras-tuner-3a609d3fd85b"> <div> <div> <h2>Hyperparameter Tuning with Keras Tuner</h2> <div><h3>Project Implementation….</h3></div> <div><p>medium.datadriveninvestor.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*jlaEz8AZaptNWHEr.png)"></div> </div> </div> </a> </div><p id="fed8"><b>Custom Layers in Keras</b></p><div id="e4fd" class="link-block"> <a href="https://medium.datadriveninvestor.com/custom-layers-in-keras-de5f793217aa"> <div> <div> <h2>Custom Layers in Keras</h2> <div><h3>Code implementation …</h3></div> <div><p>medium.datadriveninvestor.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*1IH67KJadqeqeO01.png)"></div> </div> </div> </a> </div></article></body>

Day 22 of System Design Case Studies Series : Design Amazon

Complete Design with examples

Pic credits : Naina Chaturvedi

Hello peeps! Welcome to Day 22 of System Design Case studies series where we will design Amazon.

Note : Please read System Design Important Terms you MUST know and Most Important System Design basics before reading this post.

Projects Videos —

All the projects, data structures, SQL, algorithms, system design, Data Science and ML , Data Analytics, Data Engineering, , Implemented Data Science and ML projects, Implemented Data Engineering Projects, Implemented Deep Learning Projects, Implemented Machine Learning Ops Projects, Implemented Time Series Analysis and Forecasting Projects, Implemented Applied Machine Learning Projects, Implemented Tensorflow and Keras Projects, Implemented PyTorch Projects, Implemented Scikit Learn Projects, Implemented Big Data Projects, Implemented Cloud Machine Learning Projects, Implemented Neural Networks Projects, Implemented OpenCV Projects,Complete ML Research Papers Summarized, Implemented Data Analytics projects, Implemented Data Visualization Projects, Implemented Data Mining Projects, Implemented Natural Leaning Processing Projects, MLOps and Deep Learning, Applied Machine Learning with Projects Series, PyTorch with Projects Series, Tensorflow and Keras with Projects Series, Scikit Learn Series with Projects, Time Series Analysis and Forecasting with Projects Series, ML System Design Case Studies Series videos will be published on our youtube channel ( just launched).

Subscribe today!

System Design Case Studies — In Depth

Design Tinder

Design TikTok

Design Twitter

Design URL Shortener

Design Dropbox

Design Youtube

Design API Rate Limiter

Design Web Crawler

Design Facebook’s Newsfeed

Design Yelp

Design Instagram

Design Messenger App

Design Uber

Most Popular System Design Questions

Mega Compilation : Solved System Design Case studies

We will be discussing in depth -

  • What is Amazon
  • Important Features
  • Scaling Requirements — Capacity Estimation
  • Data Model — ER requirements
  • High Level Design
  • API Design
  • Complete Detailed Design

Pre-requisite to this post -

Complete System Design Series — Important Concepts that you should know before starting the Case studies

1. System design basics

2. Horizontal and vertical scaling

3. Load balancing and Message queues

4. High level design and low level design, Consistent Hashing, Monolithic and Microservices architecture

5. Caching, Indexing, Proxies

6. Networking, How Browsers work, Content Network Delivery ( CDN)

7. Database Sharding, CAP Theorem, Database schema Design

8. Concurrency, API, Components + OOP + Abstraction

9. Estimation and Planning, Performance

10. Map Reduce, Patterns and Microservices

11. SQL vs NoSQL and Cloud

12. Most Popular System Design Questions

13. System Design Template — How to solve any System Design Question

14. Quick RoundUp : Solved System Design Case Studies

Github —

Day 1 of System Design Case Studies can be found below-

Day 2 of System Design Case Studies can be found below-

Day 3 of System Design Case Studies can be found below-

Day 4 of System Design Case Studies can be found below-

What is Amazon?

Amazon is a platform which lets users —

  1. Buy items
  2. Search for the items
  3. Add the items to the cart or put them as a wishlist
  4. Gives catalog of all the items/products
  5. View Order history
  6. Track their orders
  7. Add inventory ( on sellers side)

Users can be both mobile based and web based.

Designing Amazon would involve —

  1. Product catalog: You would need to create a catalog of products that users can browse and purchase. This could involve negotiating deals with manufacturers and suppliers, or developing your own products.
  2. Inventory management: You would need to create a system for managing your inventory, including tracking stock levels, processing orders, and handling returns.
  3. Payment gateway: You would need to integrate a payment gateway that allows users to securely make payments using various methods such as credit cards, debit cards, and electronic funds transfer.
  4. Shipping and logistics: You would need to develop a system for handling shipping and logistics, including calculating shipping costs, creating shipping labels, and tracking packages.
  5. User registration and authentication: You would need to implement a registration and authentication system that allows users to create accounts and log in.
  6. User experience: You would need to design and implement a user interface that is intuitive and easy to use, with features such as search, filtering, and recommendations.
  7. Customer service: You would need to create a customer service system that can handle inquiries, complaints, and returns.
  8. Marketing: You would need to develop a marketing strategy to drive traffic to your site, including SEO, PPC, and affiliate marketing.
  9. Quality assurance: You would need to test the platform to ensure that it is stable and reliable, and make any necessary changes.

Important Features

We will consider the most important features —

Buy items

Search Items

Cart — Add and Remove

Scaling Requirements — Capacity Estimation

Pic credits : Amz

For the sake of simplicity, I’ll show a small scale simulation.

Let’s say we have —

Total No of users : 400 Million

Daily active users ( DAU) : 200 Million/day

No of users/month : 200 Million * 30 days = 6 Billion/month

User profile : 200 KB

Product profile : 500 KB

No of products on Amazon : 10000/day

Storage Estimation —

Total Storage per day for products : 100 * 500 KB = 50 GB

Total storage per day for users : 200 Million * 200 KB = 40 TB

For next 30 days, Total storage needed for users = 40 TB * 30 = 1.2 PB

Data Model — ER requirements

Users

User_id : Int

Username : String

Password : String

Status: Timestamp

Email : String

Address : String

Phone no: String

Functionality —

  • Users should be able to create their profile which consists of Name, address, Phone no etc.

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -

Product

product_id: Int

product_name : String

product_description : String

product_rating : String

price : String

product_comments : String

product_url : String

Functionality —

  • Products description should be uploaded by sellers
  • Products can have ratings and comments by the users

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -

Cart

product_id: String

Phone_no : String

User_id: String

user_address: String

payment_type : String

Functionality —

  • Cart can have one or more products as orders

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -

Order

order_id : Int

User_id: Int

product_id: Int

Order_details: string

payment_id : Int

Functionality —

  • User can place one or more product orders
  • Users can pay using multiple payment gateways

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -

Search

product_id: Int

product_description: String

user_id : Int

Functionality —

  • Users can search as many products using product name/description or id

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -

Data Model

High Level Design

Assumptions on technical aspects —

  1. System should be highly reliable.
  2. System should have both mobile and web interface.
  3. System can have low latency.
  4. System should be able to handle huge amount of data ( text, photos, videos etc)
  5. Consistency vs Availability : System should be highly consistent and highly availability
Pic credits : Naina Chaturvedi

Components

  • Client : Both mobile and web Users
  • Application Servers : Should be able to talk each other
  • Load Balancers : To allocate requests to designated Application server using consistent hashing
  • Database : MongoDB, Redis Cluster, Cassandra db or Hbase — Key value stores allow for great horizontal scaling and low latency to access data. HBase is a column-oriented key-value NoSQL database.
  • HDFS Cluster
  • Speark Job server — To provide RESTful API to manage spark jobs
  • Cache
  • Media Storage ( S3) : To store photos/videos
  • Content Delivery Network

Services

Before we go in depth with respect to services, first understand what is stateless and stateful services. Stateless service ( which can be monolithic services) doesn’t require the server to retain any information about the state whereas Stateful services requires to save the information about the users session and the connection is persistent to a chat server.

Pic credits : MSdocsonline
  • Sessions Service — To store the sessions information of different users
  • Cart Service — To handle cart related actions
  • Product Onboard service — To handle product related actions
  • Payment service — To handle payment related actions
  • User Profile Service — To handle users profile information
  • Inventory Service — To handle the inventory information.
  • Order tracking Service — To keep a tap on order tracking

An implementation of the mentioned services in Python:

class SessionsService:
    def __init__(self):
        self.sessions = {}
    
    def add_session(self, user_id, session_id):
        self.sessions[user_id] = session_id
        
    def remove_session(self, user_id):
        if user_id in self.sessions:
            del self.sessions[user_id]
            
    def get_session(self, user_id):
        if user_id in self.sessions:
            return self.sessions[user_id]
        return None
class CartService:
    def __init__(self):
        self.carts = {}
    
    def add_to_cart(self, user_id, product_id):
        if user_id in self.carts:
            self.carts[user_id].append(product_id)
        else:
            self.carts[user_id] = [product_id]
    
    def remove_from_cart(self, user_id, product_id):
        if user_id in self.carts and product_id in self.carts[user_id]:
            self.carts[user_id].remove(product_id)
    
    def get_cart(self, user_id):
        if user_id in self.carts:
            return self.carts[user_id]
        return []
    
    def clear_cart(self, user_id):
        if user_id in self.carts:
            del self.carts[user_id]
class ProductOnboardingService:
    def __init__(self):
        self.products = {}
    
    def add_product(self, product_id, product_info):
        self.products[product_id] = product_info
        
    def remove_product(self, product_id):
        if product_id in self.products:
            del self.products[product_id]
            
    def get_product(self, product_id):
        if product_id in self.products:
            return self.products[product_id]
        return None
class PaymentService:
    def __init__(self):
        self.payments = {}
    
    def add_payment(self, order_id, payment_info):
        self.payments[order_id] = payment_info
        
    def get_payment(self, order_id):
        if order_id in self.payments:
            return self.payments[order_id]
        return None
    
class UserProfileService:
    def __init__(self):
        self.profiles = {}
    
    def add_profile(self, user_id, profile_info):
        self.profiles[user_id] = profile_info
        
    def update_profile(self, user_id, profile_info):
        if user_id in self.profiles:
            self.profiles[user_id].update(profile_info)
            
    def get_profile(self, user_id):
        if user_id in self.profiles:
Pic credits : Naina Chaturvedi

Implementation in Python for Inventory Service and Order Tracking Service:

class InventoryService:
    def __init__(self):
        self.inventory = {}
    def add_product(self, product_id, quantity):
        if product_id in self.inventory:
            self.inventory[product_id] += quantity
        else:
            self.inventory[product_id] = quantity
    def reduce_product(self, product_id, quantity):
        if product_id in self.inventory and self.inventory[product_id] >= quantity:
            self.inventory[product_id] -= quantity
        else:
            raise Exception("Product not available in required quantity.")
    def check_product_availability(self, product_id):
        if product_id in self.inventory:
            return self.inventory[product_id]
        else:
            return 0
class OrderTrackingService:
    def __init__(self):
        self.orders = []
    def place_order(self, order_id, product_id, quantity):
        inventory_service = InventoryService()
        available_quantity = inventory_service.check_product_availability(product_id)
        if available_quantity >= quantity:
            inventory_service.reduce_product(product_id, quantity)
            self.orders.append((order_id, product_id, quantity))
            return order_id
        else:
            raise Exception("Product not available in required quantity.")
    def check_order_status(self, order_id):
        for order in self.orders:
            if order[0] == order_id:
                return "Order placed successfully."
        return "Order not found."

A microservice for Amazon in Python:

import flask
import json
app = flask.Flask(__name__)
# Define an endpoint for retrieving information about a particular product
@app.route("/product/<product_id>", methods=["GET"])
def get_product_info(product_id):
    # Code to retrieve product information from the database
    product_info = {
        "product_id": product_id,
        "name": "Example Product",
        "price": 999.99,
        "description": "This is an example product",
    }
    return flask.jsonify(product_info)
# Define an endpoint for updating the availability of a particular product
@app.route("/product/<product_id>/availability", methods=["POST"])
def update_product_availability(product_id):
    # Code to update the availability of the product in the database
    return flask.jsonify({"status": "success"})
# Example usage
if __name__ == "__main__":
    app.run()

API Design

We would need to first define the endpoints we want to expose to our users.

Here is an implementation of some endpoints :

from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/api/v1/products', methods=['GET'])
def get_products():
    # code to fetch all products from the database
    return jsonify(products)
@app.route('/api/v1/products/<string:id>', methods=['GET'])
def get_product(id):
    # code to fetch a product by id from the database
    return jsonify(product)
@app.route('/api/v1/products', methods=['POST'])
def add_product():
    # code to add a new product to the database
    return jsonify({'message': 'Product added successfully'})
@app.route('/api/v1/products/<string:id>', methods=['PUT'])
def update_product(id):
    # code to update a product by id in the database
    return jsonify({'message': 'Product updated successfully'})
@app.route('/api/v1/products/<string:id>', methods=['DELETE'])
def delete_product(id):
    # code to delete a product by id from the database
    return jsonify({'message': 'Product deleted successfully'})

In the code above, we’ve defined five endpoints:

  1. GET /api/v1/products: Returns a list of all products in the database.
  2. GET /api/v1/products/:id: Returns a specific product by its ID.
  3. POST /api/v1/products: Adds a new product to the database.
  4. PUT /api/v1/products/:id: Updates a specific product by its ID.
  5. DELETE /api/v1/products/:id: Deletes a specific product by its ID.

A Python script for Amazon using APIs:

import requests
import json
# Define the base URL for the Amazon API
base_url = "https://api.amazon.com/"
# Define the endpoint for retrieving information about a particular product
product_info_endpoint = "product/{product_id}"
# Define the endpoint for retrieving recommendations for a particular user
recommendation_endpoint = "recommendations/{user_id}"
# Define a function to retrieve information about a particular product
def get_product_info(product_id):
    url = base_url + product_info_endpoint.format(product_id=product_id)
    response = requests.get(url)
    if response.status_code == 200:
        product_info = json.loads(response.text)
        return product_info
    else:
        raise Exception("Failed to retrieve product information")
# Define a function to retrieve recommendations for a particular user
def get_recommendations(user_id):
    url = base_url + recommendation_endpoint.format(user_id=user_id)
    response = requests.get(url)
    if response.status_code == 200:
        recommendations = json.loads(response.text)
        return recommendations
    else:
        raise Exception("Failed to retrieve recommendations")
# Example usage
product_info = get_product_info("ABC123")
recommendations = get_recommendations("DEF456")
print(product_info)
print(recommendations)

API design will be further discussed in the workflow video ( Coming soon. Subscribe Today)

Complete Detailed Design

( Zoom it)

Pic credits : Naina Chaturvedi

Code

Code implementation for above mentioned features —

  • Search for the items: To search for items on Flipkart, we can use the requests and BeautifulSoup libraries in Python to scrape the search results page. Here is a code implementation to search for “apple watch” on Flipkart:
import requests
from bs4 import BeautifulSoup
url = "https://www.flipkart.com/search?q=apple+watch&otracker=search&otracker1=search&marketplace=FLIPKART&as-show=on&sort=relevance"
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.parser')
# Get all the product names from the search result page
product_names = [item.text for item in soup.find_all('div', {'class': '_4rR01T'})]
print(product_names)
  • Add items to cart or wishlist: To add items to the cart or wishlist, we need to simulate the user’s actions using Selenium or any other web automation library. Here is a code implementation to add the first item in the search results to the cart:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys

driver = webdriver.Chrome()
driver.get(url)

# Click on the first product in the search results
driver.find_element_by_css_selector('.s-result-item .a-link-normal').click()

# Click on the "Add to Cart" button
driver.find_element_by_id('add-to-cart-button').click()
  • Gives catalog of all the items/products: We can scrape the Amazon category pages to get a list of all the products in a particular category. Here is a code implementation to get a list of all the products in the "Electronics" category:
import requests
from bs4 import BeautifulSoup

url = "https://www.amazon.com/s?i=electronics"
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36'}
response = requests.get(url, headers=headers)
soup = BeautifulSoup(response.text, 'html.parser')

# Get all the product names from the category page
product_names = [item.text.strip() for item in soup.select('.s-result-item .a-text-normal')]
print(product_names)
  • View Order history: To view the order history, we need to log in to the Amazon account using Selenium or any other web automation library and navigate to the "Your Orders" page. Here is a code implementation to navigate to the "Your Orders" page:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys

driver = webdriver.Chrome()
driver.get('https://www.amazon.com/')

# Login to the Amazon account
driver.find_element_by_id('nav-link-accountList-nav-line-1').click()
email = '[email protected]'
password = 'your-password'
driver.find_element_by_id('ap_email').send_keys(email)
driver.find_element_by_id('continue').click()
driver.find_element_by_id('ap_password').send_keys(password)
driver.find_element_by_id('signInSubmit').click()

# Navigate to the "Your Orders" page
driver.find_element_by_id('nav-orders').click()
  • Track their orders: To track orders, we need to navigate to the “Track Package” page for a particular order using Selenium or any other web automation library. Here is a code implementation to track the first order in the “Your Orders” page:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.get('https://www.amazon.com/')
# Login to the Amazon account
# ...
# Navigate to the "Your Orders" page
driver.find_element_by_id('nav-orders').click()
# Track the first order in the list
order_number = driver.find_element_by_css_selector('.a-link-normal .a-color-secondary').text
driver.get(f'https://www.amazon.com/progress-tracker/package/ref=oh_aui_ajax_dpi?_encoding=UTF8&itemId=&orderId={order_number}')
  • Add inventory (on sellers side) using python code: To add inventory on the seller’s side, we need to log in to the seller account using Selenium or any other web automation library and navigate to the “Manage Inventory” page. Here is a code implementation to navigate to the “Manage Inventory” page:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys

driver = webdriver.Chrome()
driver.get('https://sellercentral.amazon.com/')

# Login to the seller account
email = '[email protected]'
password = 'your-password'
driver.find_element_by_id('ap_email').send_keys(email)
driver.find_element_by_id('ap_password').send_keys(password)
driver.find_element_by_id('signInSubmit').click()

# Navigate to the "Manage Inventory" page
driver.find_element_by_id('inventory-link').click()
  • Add inventory to a specific product: To add inventory to a specific product, we need to navigate to the product detail page using Selenium or any other web automation library and update the available quantity. Here is a code implementation to add 10 units of inventory to a specific product:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.get('https://sellercentral.amazon.com/')
# Login to the seller account
# ...
# Navigate to the "Manage Inventory" page
# ...
# Navigate to the product detail page
asin = 'B07N4M9V8P'
driver.get(f'https://www.amazon.com/dp/{asin}')
# Update the available quantity
driver.find_element_by_id('quantity').clear()
driver.find_element_by_id('quantity').send_keys('10')
driver.find_element_by_id('submit-button').click()

More about Amazon System Design—

User Management:

class User:
    def __init__(self, username, password):
        self.username = username
        self.password = password
    def authenticate(self, password):
        return self.password == password
    def change_password(self, new_password):
        self.password = new_password
# Usage example
user = User("john_doe", "password123")
authenticated = user.authenticate("password123")
user.change_password("new_password123")

Product Catalog:

class Product:
    def __init__(self, name, price, category):
        self.name = name
        self.price = price
        self.category = category
class ProductCatalog:
    def __init__(self):
        self.products = []
    def add_product(self, product):
        self.products.append(product)
    def search_products(self, keyword):
        return [product for product in self.products if keyword in product.name]
# Usage example
catalog = ProductCatalog()
product1 = Product("iPhone X", 999, "Electronics")
product2 = Product("Samsung Galaxy", 899, "Electronics")
catalog.add_product(product1)
catalog.add_product(product2)
results = catalog.search_products("iPhone")

Inventory Management:

class Inventory:
    def __init__(self, product, stock):
        self.product = product
        self.stock = stock
    def update_stock(self, quantity):
        self.stock += quantity
# Usage example
product = Product("iPhone X", 999, "Electronics")
inventory = Inventory(product, 10)
inventory.update_stock(5)

Order Processing:

class Order:
    def __init__(self, user, products):
        self.user = user
        self.products = products
    def process(self):
        # Logic for order processing
# Usage example
user = User("john_doe", "password123")
products = [product1, product2]
order = Order(user, products)
order.process()

Recommendation and Personalization:

class RecommendationEngine:
    def __init__(self, products):
        self.products = products
    def recommend_products(self, user):
        # Recommendation algorithm logic
# Usage example
product1 = Product("iPhone X", 999, "Electronics")
product2 = Product("Samsung Galaxy", 899, "Electronics")
products = [product1, product2]
engine = RecommendationEngine(products)
recommended_products = engine.recommend_products(user)

Customer Reviews and Ratings:

class Review:
    def __init__(self, user, product, rating, content):
        self.user = user
        self.product = product
        self.rating = rating
        self.content = content
class ReviewSystem:
    def __init__(self):
        self.reviews = []
    def add_review(self, review):
        self.reviews.append(review)
    def get_reviews_for_product(self, product):
        return [review for review in self.reviews if review.product == product]
# Usage example
review1 = Review(user, product1, 5, "Great product!")
review2 = Review(user, product2, 4, "Good value for money.")
review_system = ReviewSystem()
review_system.add_review(review1)
review_system.add_review(review2)
reviews = review_system.get_reviews_for_product(product1)

Payment Processing:

import random
class PaymentGateway:
    def process_payment(self, amount, card_number):
        # Logic for processing payment
        transaction_id = random.randint(1000, 9999)
        return transaction_id
# Usage example
payment_gateway = PaymentGateway()
transaction_id = payment_gateway.process_payment(100.0, "1234-5678-9012-3456")

Customer Support and Messaging:

class CustomerSupport:
    def __init__(self):
        self.tickets = []
    def create_ticket(self, user, issue):
        ticket_id = len(self.tickets) + 1
        ticket = {"ticket_id": ticket_id, "user": user, "issue": issue}
        self.tickets.append(ticket)
        return ticket_id
# Usage example
customer_support = CustomerSupport()
ticket_id = customer_support.create_ticket(user, "I have an issue with my order.")

Seller Management:

class Seller:
    def __init__(self, name, products):
        self.name = name
        self.products = products
    def add_product(self, product):
        self.products.append(product)
# Usage example
seller = Seller("ABC Electronics", [])
seller.add_product(product1)
seller.add_product(product2)

Scalability and Performance:

class CachingMechanism:
    def __init__(self):
        self.cache = {}
    def get(self, key):
        return self.cache.get(key)
    def set(self, key, value):
        self.cache[key] = value
# Usage example
cache = CachingMechanism()
cache.set("product_1", product1)
cached_product = cache.get("product_1")

Analytics and Reporting:

class AnalyticsEngine:
    def __init__(self):
        self.sales_data = []
    def track_sale(self, product, quantity, price):
        sale = {"product": product, "quantity": quantity, "price": price}
        self.sales_data.append(sale)
    def calculate_total_revenue(self):
        return sum(sale["quantity"] * sale["price"] for sale in self.sales_data)
# Usage example
analytics = AnalyticsEngine()
analytics.track_sale(product1, 2, 999)
analytics.track_sale(product2, 1, 899)
total_revenue = analytics.calculate_total_revenue()

Scalability and Performance:

class CachingMechanism:
    def __init__(self):
        self.cache = {}
    def get(self, key):
        return self.cache.get(key)
    def set(self, key, value):
        self.cache[key] = value
# Usage example
cache = CachingMechanism()
cache.set("product_1", product1)
cached_product = cache.get("product_1")

Customer Support and Messaging:

class CustomerSupport:
    def __init__(self):
        self.tickets = []
    def create_ticket(self, user, issue):
        ticket_id = len(self.tickets) + 1
        ticket = {"ticket_id": ticket_id, "user": user, "issue": issue}
        self.tickets.append(ticket)
        return ticket_id
# Usage example
customer_support = CustomerSupport()
ticket_id = customer_support.create_ticket(user, "I have an issue with my order.")

Scalability and Performance:

Horizontal and vertical scaling strategies for handling increased traffic and user growth. Caching mechanisms (e.g., in-memory caching, CDN) to improve system performance. Load balancing, sharding, and replication techniques.

class CachingMechanism:
    def __init__(self):
        self.cache = {}
    def get(self, key):
        return self.cache.get(key)
    def set(self, key, value):
        self.cache[key] = value
# Usage example
cache = CachingMechanism()
cache.set("product_1", product1)
cached_product = cache.get("product_1")

Analytics and Reporting:

Collecting and analyzing system metrics to gain insights into user behavior and sales performance. Implementing analytics tools for sales, inventory, and customer behavior. Providing reporting functionalities for sellers.

class AnalyticsEngine:
    def __init__(self):
        self.sales_data = []
    def track_sale(self, product, quantity, price):
        sale = {"product": product, "quantity": quantity, "price": price}
        self.sales_data.append(sale)
    def calculate_total_revenue(self):
        return sum(sale["quantity"] * sale["price"] for sale in self.sales_data)
# Usage example
analytics = AnalyticsEngine()
analytics.track_sale(product1, 2, 999)
analytics.track_sale(product2, 1, 899)
total_revenue = analytics.calculate_total_revenue()

Read next — how to Design the Amazon Prime Video.

Day 1 : SQL Basics and Kick start of Advanced SQL Series

Day 2 : SQL Basics, Query Structure, Built In functions Conditions

Day 3 : Most Important Commands, Joins and Filters

Day 4 : Set Theory Operations, Stored Procedures and CASE statements in SQL

Day 5 : Wildcards, Aggregation and Sequences in SQL

Day 6 : Subqueries, Group by, order by and Having clauses in SQL and Analytical Functions

Day 7 : Window Functions, Grouping Sets and Constraints in SQL

Day 8 : BigQuery Basics, SELECT, FROM, WHERE and Date and Extract in BigQuery

Day 9 : Common Expression Table, UNNEST Clause, SQL vs NoSQL Databases

Day 10 : Triggers, Pivot and Cursors in SQL

Day 11 : Views, Indexes and Auto Increment in SQL

Day 12 : Query optimizations, Performance tuning in SQL

Day 13 : Introduction to MySQL, PostgreSQL and Mongo DB, Comparison between MySQL and PostgreSQL and Mongo DB, Introduction to SQL and NoSQL Databases

Day 14 : MySQL in Depth

Day 15 : PostgreSQL inDepth

Anyways, For Day 15 of 15 days of Advanced SQL, we will cover —

PostgreSQL inDepth

Github for Advanced SQL that you can follow —

All the projects, data structures, algorithms, system design, Data Science and ML, Data Engineering, MLOps and Deep Learning videos will be published on our youtube channel ( just launched).

Subscribe today!

System Design Case Studies — In Depth

Design Instagram

Design Messenger App

Design Twitter

Design URL Shortener

Design Dropbox

Design Youtube

Design API Rate Limiter

Design Web Crawler

Design Facebook’s Newsfeed

Design Yelp

Design Uber

Design Tinder

Design Tiktok

Design Whatsapp

Most Popular System Design Questions

Mega Compilation : Solved System Design Case studies

Complete Data Structures and Algorithm Series

Complexity Analysis

Backtracking

Sliding Window

Greedy Technique

Two pointer Technique

Arrays

Linked List

Strings

Stack

Queues

Hash Table/Hashing

Binary Search

1- D Dynamic Programming

Divide and Conquer Technique

Recursion

Github —

Complete System Design Series.

1. System design basics

2. Horizontal and vertical scaling

3. Load balancing and Message queues

4. High level design and low level design, Consistent Hashing, Monolithic and Microservices architecture

5. Caching, Indexing, Proxies

6. Networking, How Browsers work, Content Network Delivery ( CDN)

7. Database Sharding, CAP Theorem, Database schema Design

8. Concurrency, API, Components + OOP + Abstraction

9. Estimation and Planning, Performance

10. Map Reduce, Patterns and Microservices

11. SQL vs NoSQL and Cloud

12. Most Popular System Design Questions

Github —

Subscribe/ Follow, Like/Clap and Stay Tuned!!

Some of the other best Series —

60 days of Data Science and ML Series with projects

30 Days of Natural Language Processing ( NLP) Series

30 days of Machine Learning Ops

30 days of Data Structures and Algorithms and System Design Simplified

60 Days of Deep Learning with Projects Series

30 days of Data Engineering with projects Series

Data Science and Machine Learning Research ( papers) Simplified **

100 days : Your Data Science and Machine Learning Degree Series with projects

23 Data Science Techniques You Should Know

Tech Interview Series — Curated List of coding questions

Complete System Design with most popular Questions Series

Complete Data Visualization and Pre-processing Series with projects

Complete Python Series with Projects

Complete Advanced Python Series with Projects

Kaggle Best Notebooks that will teach you the most

Complete Developers Guide to Git

Exceptional Github Repos — Part 1

Exceptional Github Repos — Part 2

All the Data Science and Machine Learning Resources

210 Machine Learning Projects

Tech Newsletter —

If you are interested, you can join my newsletter through which I send tech interview tips, techniques, patterns, hacks — Software Development, ML, Data Science, Startups and Technology projects to more than 30K readers. You can subscribe to Tech Brew :

For Python Projects —

For complete 60 days of Data Science and ML : Day 1 — Day 60 : Quick Recap of 60 days of Data Science and ML

Follow for more updates. Stay tuned and keep coding!

For other projects, tune to —

Build Machine Learning Pipelines( With Code)

Recurrent Neural Network with Keras

Clustering Geolocation Data in Python using DBSCAN and K-Means

Facial Expression Recognition using Keras

Hyperparameter Tuning with Keras Tuner

Custom Layers in Keras

Software Development
Tech
Programming
Data Science
Machine Learning
Recommended from ReadMedium