Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Timer.Multi.Engine and Timer.Multi.Actor. #2

Open
jemc opened this issue Mar 21, 2022 · 0 comments
Open

Add Timer.Multi.Engine and Timer.Multi.Actor. #2

jemc opened this issue Mar 21, 2022 · 0 comments

Comments

@jemc
Copy link
Contributor

jemc commented Mar 21, 2022

As an MVP for this library, we created Timer.Engine and Timer.Actor, which together enable the basic use case of a single timer per actor.

However, we eventually want to also support the use case of a single actor efficiently supporting multiple timers, the ability to add and remove timers from the set, etc.

We likely want to use a similar approach to the one used in Pony: a set of hierarchical timing wheels. However, we'll still be different in that we allow the user to define the actor implementation and just embed the engine inside it - as opposed to in Pony where the user-defined notifier object(s) are embedded inside the library-defined actor.

Also, we will continue to support the single-timer use case as a totally separate use case (via Timer.Engine and Timer.Actor) because it is a much simpler, more efficient, and more convenient way to approach that use case than forcing everything into the multi-timer use case as Pony does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant