Suppose we have a Service or Function (
limited_f ) that can respond to each call in 1 second. I want to develop an intermediary service that take (
user_id, x ) as input and prioritize the requests in order to fairly allocate the limited service to users and call
limited_f(x) . The problem is that user A might send thousands of requests in a row so user B can’t access the service until the server responds to all of the user A’s request.
How should I implement the mentioned intermediary service in Flask framework?
P.S: I took take flask course in Codecademy… and I applied for a flask job… they sent me this task to qualify for the interview… I have no idea where should I begin… because there were no subjects about this matter… can you point me in the right direction … ?