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

Confgurable executor service for IRP queue #2

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

colinrgodsey
Copy link

This is a supplement to original PR. It goes a little further, but I think helps solve the initial issues in my first PR, while adding more customization and removing concurrency-control code.

My latest research into the IRP queue stuff has been aimed at reducing thread count and creation. Obviously each device must keep its queue non-parallel, but there are still different execution strategies a user may want to choose (maybe only one thread for the process? higher latency, but may work for some use cases). In my case ill be using Akka actors with a custom dispatcher to maintain queue locality, while sharing a thread pool. This will help me break my worst-case 2-thread per device complexity.

Using an executorservice also helps move thread control out of the codebase. There are tonnss of great patterns you could implement with that control, and the default java executors are really solid. At first I just wanted to add a timeout to the IRP queue thread, but noticed I could do all that with the standard executors.

@colinrgodsey colinrgodsey changed the title Confgurable xecutor service for IRP queue Confgurable executor service for IRP queue Apr 27, 2014
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

Successfully merging this pull request may close these issues.

1 participant