Monday 21 January 2019

HELP ! Fetching data on search & filter logic

Hello node redditers,My mobile app has implemented a search and filter method, it should filter products based on client criteria for exemple, brand, price etc..Suppose we have 1 million products, Is it better :- client fetchs all products from server then datas are filtered on client sideor- client sends http request for criterias (one or multiple) , then datas are filtered server side before sending back to client.​I believe they all have pros and cons.First method :Pros : datas are feched once / Cons : Datas are too big and can take times.​Second method :Pros : Only needed datas are fetch / Cons : A lot of request. Server does too much work in my opinion.Can anybody give me an insight ? What's the best way to deal with this without loosing on performance ?Thanks in advance for your help :)

Submitted January 21, 2019 at 09:42AM by Surikaate

No comments:

Post a Comment