scanner icon indicating copy to clipboard operation
scanner copied to clipboard

Prototype of new scheduler

Open swjz opened this issue 7 years ago • 3 comments

Hi Alex,

scanner/engine/scheduler.h contains my prototype of the new scheduler. Please take a look and let me know if you have any comments.

swjz avatar Jul 23 '18 06:07 swjz

Goal: Merge the experimental scheduler in this PR into master.

We would like to merge this branch into master so that it's development can occur in parallel and in sync with improvements to the systems. By merging, it will make it possible to test both variants of the scheduler side by side for performance and correctness, and enable use cases that might benefit from the nascent experimental scheduler. The current approach for enabling both schedulers side-by-side is to insert a flag when starting the master that tells it which mode to start in: the existing scheduler or the new experimental one.

Minimum requirements:

  • [ ] Rebase onto current master
  • [ ] Add a flag in db.run that switches between the schedulers
  • [ ] Duplicate or make compatible with the old scheduler the structs and functions that have been modified
  • [ ] Create a new worker class for the experimental scheduler to keep the old one unmodified
  • [ ] Add conditionals in the master to enable switching between the old strategy and the new one

I'm likely missing some TODOs. Let me know and I'll add them.

fpoms avatar Oct 19 '18 19:10 fpoms

I've finished these minimum requirements:

  • [x] Rebase onto current master
  • [x] Add a flag in Database() that switches between the schedulers For coding convenience, I added a flag in the constructor of Database() (rather than db.run) to switch between the schedulers. Example: db = Database(new_scheduler=True)
  • [x] Duplicate or make compatible with the old scheduler the structs and functions that have been modified
  • [x] Create a new worker class for the experimental scheduler to keep the old one unmodified
  • [x] Add conditionals in the master to enable switching between the old strategy and the new one I actually created a new master class as well in order to enable switching between two schedulers.

When new_scheduler is True, the new scheduler should behave exactly the same as what I specified in my doc. Can you also test it from your side and let me know if any problem occurs?

swjz avatar Nov 13 '18 13:11 swjz

Awesome! I'll do a review pass now.

fpoms avatar Nov 17 '18 17:11 fpoms