How to design API that display and filter through millions of products.REST API Filters & Pagination

How to design API that display and filter through millions of products.REST API Filters & Pagination

sudoCODE

2 года назад

113,687 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Pradeep Creations
Pradeep Creations - 13.09.2023 14:40

will this work for mongodb?

Ответить
Guru Samy
Guru Samy - 10.09.2023 15:15

Hi teacher thanks❤

Ответить
Maqbool
Maqbool - 08.09.2023 14:12

In backend for offset and limit pagination we can use db limit and offset parameter while creating a query to fetch that many rows and this quite inefficient in certain scenarios.

Keyset pagination which is quite efficient but can’t directly query a particular page. Either go forward or backward in rows with a particular limit.

Ответить
Chollangi Manisha
Chollangi Manisha - 11.08.2023 12:30

Hi,your explanation is good.

I have issue with pagination. I using one azure api to get all items. In azure portal, 500 items are there but I am getting 200 items while querying api. I applied limit and offset as well but not working. Please help.

Ответить
Travelling Soldier
Travelling Soldier - 31.07.2023 00:25

Thank u

Ответить
haki eye
haki eye - 19.06.2023 16:17

Wow terrific to the point with clear and clean message.

Ответить
Noção Constantino
Noção Constantino - 13.06.2023 21:14

Great. Wonderful explanation.......

Ответить
ILAKKIYA.S
ILAKKIYA.S - 02.06.2023 05:15

😊

Ответить
Rajesh Patil
Rajesh Patil - 12.04.2023 22:58

Nice explanation but only for a very primitive audience to understand. It does not contain any technical details on how it works or implemented . If you could add more details on server side services to map to your URI examples that would be helpful.

Ответить
Gourav Kumar Shaw
Gourav Kumar Shaw - 08.04.2023 10:33

Thanks !!

Ответить
Kaivaram Gnana Teja
Kaivaram Gnana Teja - 30.03.2023 12:43

Thank you for this informative video on designing an API that can display and filter through millions of products! As someone who's worked with APIs before, I can definitely appreciate the importance of filters and pagination for improving performance and user experience. One plugin that I highly recommend for filtering large datasets is Expertrec. Their API search engine allows for advanced filtering capabilities, including custom facets and search parameters, which can help users find the products they're looking for quickly and easily. It's a great investment for any business dealing with a large product catalog. Thanks again for sharing your expertise!

Ответить
Naveen Sharma
Naveen Sharma - 27.03.2023 16:43

Clear and crisp explanation but I've one question. Do we need to hit db for every request, Is it a good idea ? If not then what are the other ways we fetch x amount to data in once(certain threshold) and serve in 20-20 chunks ?

Ответить
Kunal Shah
Kunal Shah - 04.03.2023 13:41

What is there is no pagination.. the data is loaded based on the user scrolling the screen..

Ответить
Abhishek Jain
Abhishek Jain - 08.02.2023 13:47

You did not discuss this scenario: if client request for 100 items and server max-limit is 20, how client will be able to request items 20 to 39 in the next request? How client will set its offset ?
I am assuming client logic should have offset=lastoffset+numberOfItemsReceived

Ответить
WOYGx1010
WOYGx1010 - 27.12.2022 09:53

You did a great job with this video, thank you

Ответить
Tianyi Peng
Tianyi Peng - 02.12.2022 07:04

how does this compare to graphQL?

Ответить
Joe
Joe - 18.11.2022 15:45

Nice. Any video on cursor vs offset based pagination

Ответить
Rahul
Rahul - 07.11.2022 06:16

Mam have you created video on implementation?

Ответить
Luxury Music
Luxury Music - 19.10.2022 22:14

hey i was asked a question where i told about offset for pagination, but interviewer told the data is added on api all the time, so when i call the next page , i might get the same data in the next offset as well coz new data was appended by time i clicked on next page, so how to handle such cases???

Ответить
Maniac
Maniac - 03.10.2022 09:20

greatly explained

Ответить
DragonLord Saviour
DragonLord Saviour - 24.09.2022 23:04

you're super underrated

Ответить
Unmesh
Unmesh - 15.09.2022 00:55

Does api works to show products which are on low prices due to price error listed on amazon or flipkart?

Ответить
K w
K w - 03.09.2022 10:39

Explaination is excellent please provide practical video if possible

Ответить
rahul sen
rahul sen - 01.09.2022 06:51

Found 2 channels useful so far .. Ur channel and another.. kudos

Ответить
Guru Sahay
Guru Sahay - 20.08.2022 18:51

Mam'm how could I understand my frontend before making backend server. If I created a registration page and login page are on different pages then it's important to make the same thing on the backed side. So, I will have to login and registration page (register, update, compare password pages) are on the different pages or same page in backed side.

Ответить
Daniel Castillo
Daniel Castillo - 10.08.2022 20:29

Your explainations are the best, right to the point, well illustrated, real world examples. Thank you.

Ответить
Jagan Siram
Jagan Siram - 08.07.2022 14:06

Didn't work.. getting complete result

Ответить
Sergio Rodriguez
Sergio Rodriguez - 21.06.2022 20:43

amazing video thank you!

Ответить
HASEEB ALAM RAFIQ
HASEEB ALAM RAFIQ - 04.04.2022 18:28

mam you explain awesome. Thanks

Ответить
i YAKKA Private Limited
i YAKKA Private Limited - 31.03.2022 02:37

This explanation is so valuable thank you for that , also I would like to suggest if possible to do a video demo with a limited paging server response for example : API like Zoho, or deluge code based API's , how to use the explained methods on a study case like this

Ответить
KESHAV SETHI
KESHAV SETHI - 26.03.2022 10:27

just one word Awesome.

Ответить
Itsme Ry
Itsme Ry - 27.01.2022 05:11

Nic mam

Ответить
Stephen Selvaraj
Stephen Selvaraj - 18.12.2021 09:28

Super :)

Ответить
Jinal Patel
Jinal Patel - 12.12.2021 19:30

This is nice topic. Sometime I feel that pure REST approach is not suitable for business need. It mainly revolve around single entity but business application has complex need like to filter. Let's say for example Employee Belong to specific company and organization and there are multiple attribute associated with that and we have to pass multiple filter attribute. I feel that sometime pragmatic approach will make more sense and expose end-point like /search / filters etc will make more sense.

Ответить
Myth iyen
Myth iyen - 06.11.2021 09:09

CDN can you share

Ответить
BUCKY BARNES
BUCKY BARNES - 30.10.2021 17:16

by your presentation we easily got the concepts, thanks to your editor😅😅

Ответить
Chandan Kumar
Chandan Kumar - 29.10.2021 08:49

Designing the APIs are fine, but how to implement such things? What is the right approach. Let's assume that I am building an ecommerce site and where from the database I want top 20 filtered items, how to do that in code? Thanks for the awesome content.

PS: All theory and no code, makes jhony a dull boy 😉

Ответить
Raam Vlogs in Telugu
Raam Vlogs in Telugu - 28.10.2021 23:10

Wonderful explanation

Ответить
venkatesh kolla
venkatesh kolla - 26.10.2021 20:41

please cover sorting also

Ответить
Adesh gangwar
Adesh gangwar - 23.10.2021 10:03

Hi
I have a quick question.
So if i have 50 orders fetched from api and are available in dom. Now i want to implement search the order by id. In this case shall I do a internal filter in the dataset or shall I fetched filtered data from api?
What would be the best approach to do it?

Ответить
Utkarsh Malviya
Utkarsh Malviya - 17.10.2021 11:22

This is really wonderful explanation. I know its not in scope of this series but out of curiosity would you mind throwing some light on how backing code for pagination can be implemented? Will it use some sort of sorted cache from where it returns results based on offset and max limit or is there a better way to get this done?

Ответить
Kartik V
Kartik V - 12.10.2021 21:19

Some information on how the backend queries will manage limit and offset would have been helpful to tie in the solution end to end.

Ответить
Nihal
Nihal - 12.10.2021 18:47

Love this video.
Can you please create a video dedicated to API Security? How do you secure an API?

Ответить
Abhijit Dixit
Abhijit Dixit - 12.10.2021 11:49

One more way to reduce payload is sending it back as a stream, can you share use case for the same?
Could it be video/audio streaming?

Ответить
Catalyst
Catalyst - 11.10.2021 14:45

can we send a json data in filter if filtering data is complex?
I currently POST and json body for it currently

Ответить
Kumar Amresh
Kumar Amresh - 11.10.2021 07:41

actually i learned these terms pagination, limit, offset, filters while learning DBMS and i think they're more related to that that rest Api

Ответить
Versatile
Versatile - 11.10.2021 06:09

Amazing explanation

Ответить
Praveen j
Praveen j - 10.10.2021 18:35

It's clear ..but there is more link to fetch more data in some pagination APIs

Ответить
Deepak Jangra
Deepak Jangra - 10.10.2021 16:05

Critical: what if you request, say first 10 (sorted by latest) orders and then 1 new order received. Now if you request next page then 1 order (1st of second page) will be repeated because thats 11th order now (not 10th anymore). How can we fix that.

Ответить
Saurabh Chopade
Saurabh Chopade - 10.10.2021 08:45

Thanks for posting this one

Ответить