Search Billions of Records in Seconds! from database | Advanced Backend

  Рет қаралды 11,375

sandeep dev

sandeep dev

Күн бұрын

Пікірлер: 83
@soumo.das23
@soumo.das23 14 күн бұрын
Please make a video on how determine bit array size and hashcount . That would be really helpful. By the way thanks for sharing your knowledge ❤
@pankajdubey1123
@pankajdubey1123 13 күн бұрын
sir aapke videos bohut jyada helpful hai accha backend banane ke liye . please sir content deliver karna jari rakhna
@sandeepdev0
@sandeepdev0 13 күн бұрын
❣️
@anuj7286
@anuj7286 13 күн бұрын
Great tutorial. I was watching bloom filter tutorial on another channel. Thank you
@rewindtube2406
@rewindtube2406 13 күн бұрын
Keep making similar kind of videos on different algorithm too.
@sairosestha
@sairosestha 7 күн бұрын
thank u brother for this informative video. Love from nepal
@mattiullah318
@mattiullah318 10 күн бұрын
Today learn new concept ..thank for this kind of videos
@shivamdubey8
@shivamdubey8 8 күн бұрын
Great video, I have heard about this algorithm first time. Thank you for this precious knowledge sharing.
@sandeepdev0
@sandeepdev0 8 күн бұрын
I'm glad you found it helpful! Stay tuned for more 😊
@shivamdubey8
@shivamdubey8 8 күн бұрын
@@sandeepdev0 yes sure
@AshishKumar-cl5ik
@AshishKumar-cl5ik 10 күн бұрын
clear explaination , Greate Knowledge with good spirit.
@jeetvadera3217
@jeetvadera3217 11 күн бұрын
Nice video. You have great knowledge thaks for sharing. Keep it up
@shubhamdas6519
@shubhamdas6519 4 күн бұрын
Thanks for the video sir
@kaushikroy000
@kaushikroy000 13 күн бұрын
Nice video bloom filter algorithm chahiya
@somyaranjandas4599
@somyaranjandas4599 14 күн бұрын
please make video on redis bitmap and how to determine bit array size
@sandeepdev0
@sandeepdev0 13 күн бұрын
Noted✅
@MuhammadAli-f9f
@MuhammadAli-f9f 6 күн бұрын
Thanks for your this awesome video, I've question suppose I'm implementing your given technique and I've 10k users added in DB and now implementing the "Bloom Filter". Suppose Sandeep name is already in DB while my index has 0 value? How manage this? because if I go with your given logic with Bloom Filter it says its unique name which is not.
@moazamali2434
@moazamali2434 10 күн бұрын
thanks for sharing
@aviralgupta9869
@aviralgupta9869 13 күн бұрын
at 10:05 shouldn't we doing modulo instead of dividing the number, because dividing a number by 1000 can also have a result greater than 1000, which will be out of index
@VivekKumar-nq2ll
@VivekKumar-nq2ll 13 күн бұрын
Sir, Iska advanced version ka video jrur bnaiye
@rummanujjaman4727
@rummanujjaman4727 8 күн бұрын
Sir, as we all are familiar with node and express js along with mongodb. But you are making blockbuster videos using hono js, Postgresql etc. I think that's the reason people are not attracting with your video and I really want your video to get hype. So please try to use node/express for your great lessons. 🎉
@sandeepdev0
@sandeepdev0 8 күн бұрын
Thank you so much for your feedback and support! 🙏 I completely understand where you're coming from-Node.js, Express, and MongoDB are incredibly popular and familiar to a lot of us. I decided to cover Hono.js, PostgreSQL, and other tools because they offer different capabilities and can really enhance our skill sets as developers. Learning new technologies can open up even more opportunities and help us stay current in the industry. 😊 I truly appreciate your encouragement and will keep your suggestion in mind for future videos. Thanks for being a part of this journey! 🎉
@prakashchandramourya872
@prakashchandramourya872 7 күн бұрын
Does it work like google search, example for 'san' the output should be true.
@RandomGuy34-j1u
@RandomGuy34-j1u 13 күн бұрын
but bloom filters ki ek limitation hoti hai right ki woh false positive de sakta hai ? Like maybe woh username database me exist nhi karta hai but still bloom filter may return ki that value exists...In that case hum user ko ek aisa username banane se rok rahe hai jo ki allow hona chayiye.
@sandeepdev0
@sandeepdev0 13 күн бұрын
Yes you are right, but there are further modified approaches based on bloom filter to get rid of this problem
@mujibulhaquetanim
@mujibulhaquetanim 13 күн бұрын
@@sandeepdev0 make a video on this too, i think this is as important as applying bloom filters and mention how to determine the value should be given for it too 23:44
@anujpandey3101
@anujpandey3101 13 күн бұрын
if the index in bit array are already marked it didnt always implies that the username is already created , how to handle this also tell us about why hashing is done three times ans size of bitarray is taken 1000 btw nice explainataion and coding part
@sandeepdev0
@sandeepdev0 13 күн бұрын
You're absolutely right; even if indices in the bit array are marked, it doesn't guarantee the username already exists, due to false positives in Bloom filters.To handle this, there are some further modified approaches/variations of bloom filter. ( we will discuss it in a live stream or upcoming videos ) As I mentioned in the video, hashing three times and using a bit array of size 1000 is a practical balance for memory efficiency and false positive reduction. There are also advanced Bloom filter variations to reduce false positives even more. I’ll dive deeper into these modified approaches and how to determine the length of array and hashcount in upcoming videos and live streams-stay tuned!
@ajithamin9196
@ajithamin9196 14 күн бұрын
Please make video on how to look for opensource project
@sandeepdev0
@sandeepdev0 14 күн бұрын
sure👍, thinking about doing a live stream on this sunday/saturday, there we can discuss this
@ajithamin9196
@ajithamin9196 14 күн бұрын
@sandeepdev0 ,sure we can have a discuss there
@blackhat5458
@blackhat5458 13 күн бұрын
@@sandeepdev0 Live Stream time? Because I don't want to miss it.
@sachinkoli-3935
@sachinkoli-3935 8 күн бұрын
this algorithm need to be implemented in app since inception otherwise it will not work right?
@future_gen
@future_gen 14 күн бұрын
Bro can you reply me that why you don't use functions instead you use classes???
@sandeepdev0
@sandeepdev0 14 күн бұрын
Hi @future_gen, Good question 👍actually using classes over functions includes 2 main reasons for me, 1. My personal choice 2. Low level design concepts can be implemented better in classes than functions ( Personal experience)
@mandipsingh6341
@mandipsingh6341 13 күн бұрын
What if, if we delete a user from db , how we can delete the same record from BF ?
@ChessPuzzlesVideo
@ChessPuzzlesVideo 11 күн бұрын
Good question
@vikasrai4915
@vikasrai4915 6 күн бұрын
Just do the reverse, i.e unset the value in BF at those indexex by calculating the hash again.
@SuryaPratap-r5h
@SuryaPratap-r5h 9 күн бұрын
Sandeep bhai! where is the kafka crash course?
@sandeepdev0
@sandeepdev0 9 күн бұрын
Hi Surya, Actually I have to made that kafka Crash Course video private ( Because one confidential system key got leaked in that video) So I made that video private, but don't worry, soon I will re upload the video...
@SuryaPratap-r5h
@SuryaPratap-r5h 9 күн бұрын
@@sandeepdev0 Hey Sandeep, thanks for considering my query. I will be waiting for that video.
@mukulkanojia576
@mukulkanojia576 13 күн бұрын
Agar koi unique h kisi ka hash ki index usse match kr rhe h or usne but one kr diya h to kya unique koi false dega
@vishalgarna12
@vishalgarna12 5 күн бұрын
❤❤❤
@soumo.das23
@soumo.das23 14 күн бұрын
How to delete an element from the bloomfilter?
@at_vlogs
@at_vlogs 8 күн бұрын
Hi Please explain why we are hashing it and storing it three thime in a single array of size 1000 instead of that we can directly store a username and search it by includes method ? Please let me know if anybody can help me
@ChessPuzzlesVideo
@ChessPuzzlesVideo 7 күн бұрын
It's all about time. Think about array with size million. Will that includes work efficiently? Check internal implementation of includes.
@at_vlogs
@at_vlogs 6 күн бұрын
@ ya got it thanks
@rummanujjaman4727
@rummanujjaman4727 8 күн бұрын
What if we delete a user from db ir user delete his acc or change his username then how It's gonna work
@sandeepdev0
@sandeepdev0 8 күн бұрын
well, there are some modified versions of bloom filter like counting bloom filter algorithm which allows us deletions, and also there are some other modified bloom fliters algorithms ex: segmented bloom filter. So basic bloom filter algorithm not allows us to delete directly, So, majorly we use modified bloom filters algorithm ( will be covering in upcoming videos )
@AshishKumar-cl5ik
@AshishKumar-cl5ik 10 күн бұрын
request to please create advance video
@roshandev8167
@roshandev8167 13 күн бұрын
apne bola ki database ka use nahi karna hai. mein apko bata du ki jo array aap dekh rahe ho index ko check karne ke liye wo v ek type ka database hi hai. Yahi same chiz hamlog bhot easy tarike se direct database se v kar sakte hai direct database pe index laga ke. Database automatic hi userName ko numeric format mein convert karke numberline pe arrange kar deta hai. And doing this process is lot more faster and efficient compare to hash and then store in array and then find in array index. Kyuki database data ko store karke and retrieve karne ke liye hi optimised hota hai using combination of cpu and Gpu power I suggest you to please check how database do data computation in insane speed jabki agar hamlog direct calculation c++ se v kare itna bada data toh v utna speed nahi ayega. Ye essa isliye hota hai kyuki database data to store, query and compute karne ke liye optimised hota hai like mongodb. Please like my comment if you think this is informative.
@piyushraj7275
@piyushraj7275 10 күн бұрын
First, let’s clarify: an array is a linear data structure, not a database type. While indexing can indeed speed up searches in a database to O(1), it comes with performance trade-offs, especially when modifying data. When you index a column, an additional data structure is created to store the locations of values in that column, which enables faster searches. However, this index must be updated every time data in that column changes, affecting performance during insertions, updates, or deletions. For example, if a billion users exist and you index the username column, both registering new users and allowing existing users to update their usernames can slow down the process, as the index needs continuous refactoring. Additionally, making two database round trips-one to check if a user exists and another to insert new data-is generally inefficient. For instance, if one round trip to the database takes 500ms, two would double that time, resulting in a 1-second delay for each new user registration.
@roshandev8167
@roshandev8167 9 күн бұрын
@piyushraj7275 i agree with your point that for every new record insert we have to refactor database index but if you keep data in array then also that array is stored in ram memory. We can assume it a kind of in memory Db. Now even if we store this much huge data on RAM then cost will increase with every new record. And this is RAM cost instead of ROM cost which is costly considering billion of records. In case of ROM cost only few sectors of data is refactored which is not that much let say 500ms. but then after that time username availity is done in O(1). again with very mimimum cost. Also keeping that much huge array will slow down service startup time.
@dev_guidance
@dev_guidance 13 күн бұрын
real life me agar implement kr k dekh skte to mza aaa jata with 1000 users or 100 users kuch bhi chlega using redis
@sandeepdev0
@sandeepdev0 13 күн бұрын
Noted✅, Probably will do in the next video
@wafiqhosain5713
@wafiqhosain5713 13 күн бұрын
A silly ques :- if a database has table called "User", thst has 1 milllion user entries. If i use redis as caching layer, should i cache all user entries/ a specific number of user entries in my redis cache so that while signin/signup I don't have to query the db.
@sandeepdev0
@sandeepdev0 13 күн бұрын
If you have 1million user entries in your DB and want to use redis as a caching layer, you have to store all the user's unique key (ex: email, userid)- But this will be highly unefficient, to make a it a little better, you can do sharding, replication on some basis,But all this will bring unnecessary complexity in your backend, So, Bloom filter algorithm is highly recommended for your example case...
@rajeshbhusal1910
@rajeshbhusal1910 13 күн бұрын
You need to cache all the users. What you can do is store the username#. Whenever you need to find the username just use the get command. As Get and Set command has time complexity of O(1) the operation is faster the only cost here is the socket trip between your program and memory. I think this is even better than bloom filters as in bloom filter you need to hash the username and set the bit if the bit is already you need to query the db which is little overhead
@wafiqhosain5713
@wafiqhosain5713 13 күн бұрын
@@rajeshbhusal1910 is it safe to store user credentials(email/password_hash,username...) in redis, store 1 million user records in redis (for caching purpose) . As a fresher, i never work in any corporate level project. So never saw how this cases actually handles.
@anikislam2150
@anikislam2150 14 күн бұрын
Is ke bareme or janna hai
@rajeshp9319
@rajeshp9319 10 күн бұрын
What if two of the users create at a time of the same username then how to handle this
@Short-Story-Talk
@Short-Story-Talk 3 күн бұрын
Race conditions can be solved by locking
@webster.
@webster. 13 күн бұрын
You will have to use mod rather division
@sukiratwarring6219
@sukiratwarring6219 13 күн бұрын
Instead of all this just do write the unique attribute on the particualr field in the schema.
@sandeepdev0
@sandeepdev0 13 күн бұрын
Using a unique attribute on a schema field is the simplest way to enforce uniqueness, as the database will prevent duplicates directly. However, Bloom filters are useful in high-traffic applications to reduce database load and latency by quickly filtering out obvious non-existent items in memory, making them efficient for large-scale systems.
@dev_guidance
@dev_guidance 13 күн бұрын
please make a video in type script.
@sandeepdev0
@sandeepdev0 13 күн бұрын
sure✅
@AjayCoding
@AjayCoding 14 күн бұрын
🙌
@lamabinod
@lamabinod 8 күн бұрын
bro where's the billion records? how do you feed billion records in your bloom filter? this supposed to be your content that match title :(.
@sandeepdev0
@sandeepdev0 8 күн бұрын
Bro, I insist you to watch the complete video carefully, because half knowledge is very dangerous, In video I have told that this is the simple implementation of bloom filter, but in order to make it work for billions of records, we have to implement it an advance manner, like using Redis's Bitmap, + using modified versions of bloom filter algorithm (Will be covering in upcoming videos) + a proper fault tolerance for this as well... don't judge a video by watching it half
@RamanPratapSingh-lr4pn
@RamanPratapSingh-lr4pn 14 күн бұрын
wouldn't the indexing technique optimize it ?
@anuj7286
@anuj7286 13 күн бұрын
Yes same question
@gamingorbesport4920
@gamingorbesport4920 13 күн бұрын
Billions of records buddy*
@ImKaustub
@ImKaustub 12 күн бұрын
There could be multiple dbs
@zdrive8692
@zdrive8692 11 күн бұрын
No indexing will only work for millions only and that is slow as well
@sunilk9760
@sunilk9760 10 күн бұрын
Partition may help
@rayhanislam7518
@rayhanislam7518 13 күн бұрын
please make video on redis bitmap and how to determine bit array size
@sandeepdev0
@sandeepdev0 13 күн бұрын
Noted✅
Из какого города смотришь? 😃
00:34
МЯТНАЯ ФАНТА
Рет қаралды 2,4 МЛН
World’s strongest WOMAN vs regular GIRLS
00:56
A4
Рет қаралды 48 МЛН
Top 8 Best Practices for API Design #api #bestpractices #apidevelopment
15:23
SWE with Vivek Bharatha
Рет қаралды 5 М.
Coding Shorts 111: Was I Wrong About Blazor?
16:35
Shawn Wildermuth
Рет қаралды 19 М.
SQLite as frontend storage - Delete localStorage and IndexedDB?
10:02
Mehul - Codedamn
Рет қаралды 12 М.
LlamaOCR - Building your Own Private OCR System
17:06
Sam Witteveen
Рет қаралды 25 М.
Из какого города смотришь? 😃
00:34
МЯТНАЯ ФАНТА
Рет қаралды 2,4 МЛН