Question 14

This was design question.
I have a single timer class which is running on a single port of a machine.
There are multiple clients that can send request to this timer class as follows.
request_timer (x)
where x is time in seconds.
when the timer class gets this request from a client it starts a timer object of x seconds and after x seconds are over it sends an event to the requesting client and client can handle the event the way it wants to .
The problem is if you have large number of clients then the timer class is single point of congestion and the clients may receive the event from it after a long time.
What are the good ways to scale this for a large number of clients?

[advanced_iframe securitykey=”undefined” src=”https://code.kodnest.com/” width=”100%” height=”600″]

KodNest Training New Batch is starting on 02nd November 2020. Attend one week free demo classes.Register Now

New Report

Close