Hey there guys! One of the questions I'm always asked on my interviews where I need to get the data from an API is "What happens when the API request is slow and takes more than X seconds, how to solve this and make it faster and what are the downsides?"
I know this is solvable with the implementation of cache, but what happens when an API contains some filters, let's say books older than the year 1997.
It is really rare that someone will look at that request with the same filters where I can return the data.
Should I get all of the books and do the filtering in my app? This sounds like a bad idea. Is there any other way of handling the slow API requests? Am I missing something? How do you cache your requests?
submitted by /u/ugar777
[link] [comments]
from Software Development – methodologies, techniques, and tools. Covering Agile, RUP, Waterfall + more! https://ift.tt/3nXAQ72