PageSourceSearch

https://umakantv.com/_next/static/chunks/pages/problems/interview-…/system-design-rattle-07bdfc606fcf0884.js

js umakantv.com collected 2026-10-03 23:26:51 UTC 3,702 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1214],{7358:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/problems/interview-questions/system-design-rattle",function(){return s(6587)}])},6587:function(e,n,s){"use strict";s.r(n);var r=s(5893),i=s(1151);function c(e){var n=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",pre:"pre",code:"code"},(0,i.ah)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Design a database for Aadhar System"}),"\n",(0,r.jsx)(n.p,{children:"Aadhar"}),"\n",(0,r.jsx)(n.p,{children:"GET /users"}),"\n",(0,r.jsx)(n.p,{children:"SQL - Postgres/mysql"}),"\n",(0,r.jsx)(n.p,{children:"NUMBER, NOT NULL"}),"\n",(0,r.jsx)(n.p,{children:"Name\naadhar_number\nGender - VARCHAR(10), NOT NULL,\ndate_of_birth - INT, NOT NULL,\nPincode - INT, NOT NULL,"}),"\n",(0,r.jsx)(n.p,{children:"Indices"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"pincode"}),"\n",(0,r.jsx)(n.li,{children:"date_of_birth"}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"111111, male, (19-32),"}),"\n",(0,r.jsx)(n.p,{children:"EXPLAIN select * from people where gender = ''"}),"\n",(0,r.jsx)(n.p,{children:"EXPLAIN ANALYZE select * from people where gender = ''"}),"\n",(0,r.jsx)(n.p,{children:"Sharding"}),"\n",(0,r.jsx)(n.p,{children:"1,00,00,000"}),"\n",(0,r.jsx)(n.p,{children:"male - 57,00,000"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"5001 - 5050\nselect * from people where gender = 'male' limit 50 offset 5000;"}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"select count(*) as totalRecords from people where gender = 'male'"}),"\n",(0,r.jsx)(n.p,{children:"5001-5050 of 57,00,000\n{"}),"\n",(0,r.jsx)(n.p,{children:"}"}),"\n",(0,r.jsx)(n.p,{children:'auth_token: { "6:39": 50, "6:41": 0 }'}),"\n",(0,r.jsx)(n.p,{children:"GET /users -> time.minute() -> read the value + update the value"}),"\n",(0,r.jsx)(n.p,{children:"if (value > threshold) return 4xx"}),"\n",(0,r.jsx)(n.p,{children:"GET /emoji_reactions ->\n{\nchannel_id,\nmessage_id,\n}"}),"\n",(0,r.jsx)(n.p,{children:"message"}),"\n",(0,r.jsx)(n.p,{children:"customer_id\nslack_message_id -\ncreated_at: 27th April,\nreactions:"}),"\n",(0,r.jsx)(n.p,{children:"schedule job -> 4th May,"}),"\n",(0,r.jsx)(n.p,{children:"select * from messages where customer_id = '' AND created_at <= 20th April and reactions != null limit 50 offset 100;"}),"\n",(0,r.jsx)(n.p,{children:"Rate Limiting"}),"\n",(0,r.jsx)(n.p,{children:"1 batch - 50 messages"}),"\n",(0,r.jsx)(n.p,{children:"async function processBatch(messages) {\n# GET /emoji"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"# \nif request failed because of Rate limit\n    wait(); // 60 seconds\n"})}),"\n",(0,r.jsx)(n.p,{children:"}"}),"\n",(0,r.jsx)(n.p,{children:"async function processRequest(customerId, offset, limit) {"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"messages = getData()\n\nprocessBatch(messages)\n"})}),"\n",(0,r.jsx)(n.p,{children:"}"}),"\n",(0,r.jsx)(n.p,{children:"customer_ids = [] // 50 customer_ids"}),"\n",(0,r.jsx)(n.p,{children:"async function processCustomer(id) {"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"offset - 0, limit 50\n\nlet messages = \nwhile there are messages to be processed  {\n    processRequest\n}\n"})}),"\n",(0,r.jsx)(n.p,{children:"}"}),"\n",(0,r.jsx)(n.p,{children:"customer_ids.map()"})]})}n.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign({},(0,i.ah)(),e.components),s=n.wrapper;return s?(0,r.jsx)(s,Object.assign({},e,{children:(0,r.jsx)(c,e)})):c(e)}}},function(e){e.O(0,[9774,2888,179],(function(){return n=7358,e(e.s=n);var n}));var n=e.O();_N_E=n}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.