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

C/C++/Rust implementation of Scaler's scheduler #19

Open
rafa-be opened this issue Sep 24, 2024 · 6 comments
Open

C/C++/Rust implementation of Scaler's scheduler #19

rafa-be opened this issue Sep 24, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@rafa-be
Copy link
Collaborator

rafa-be commented Sep 24, 2024

A C, C++ or Rust implementation of Scaler's scheduler will have a few performance advantages, mainly by relying on a more efficient memory management, and by avoiding unnecessary copies of objects.

Contrary to the client and the worker implementation, re-implementing the scheduler in a language different from Python is less challenging, as it's not actively interacting with Python objects.

The scheduler is also the main scalability blocking piece, which makes its efficiency more critical in making Scaler more scalable.

@sharpener6 sharpener6 self-assigned this Sep 27, 2024
@sharpener6 sharpener6 added the enhancement New feature or request label Sep 27, 2024
@bcncpp
Copy link

bcncpp commented Jan 17, 2025

Hello, i am also interested on this. If we go to the rust path we could use maturin, if we go to c++, pybind. Let's discuss here your plans and add a design.

@rafa-be
Copy link
Collaborator Author

rafa-be commented Jan 17, 2025

Hi @bcncpp,

At the moment, our plans are to fully rewrite the scheduler in C++ or Rust, without any Python code or binding.

The current implementation already communicates with 0mq and Cap’n Proto messages, which are not tied to any specific language.

However, we are still experimenting with new features to the Scaler's scheduler, so this is a mid-to-long term project.

Do you already have performance issues with the current Python implementation?

Raphael.

@bcncpp
Copy link

bcncpp commented Jan 18, 2025

Hi @rafa-be
No, it is something that I can volunteer. it is a good opportunity to me. I provide a draft pr, so slowly i can iterate on your supervision.

@rafa-be
Copy link
Collaborator Author

rafa-be commented Jan 20, 2025

Hi @rafa-be No, it is something that I can volunteer. it is a good opportunity to me. I provide a draft pr, so slowly i can iterate on your supervision.

Please do 😃 . I'd suggest you keep the implementation as separated as possible from Python's (possibly even creating a new repository), limiting the dependency to the Can'p protocol files.

@bcncpp
Copy link

bcncpp commented Jan 20, 2025

I use my fork, i create a folder native_scheduler that does the game,

@bcncpp
Copy link

bcncpp commented Jan 20, 2025

  1. Scheduler uses:

    • SchedulerConfig for configuration.
    • ZMQConfig for monitor address setup.
    • AsyncBinder to bind to the main address.
    • AsyncConnector for monitor connections.
    • VanillaClientManager to manage client interactions.
    • VanillaObjectManager for object-related operations.
    • VanillaGraphTaskManager for managing graph tasks.
    • VanillaTaskManager for task management.
    • VanillaWorkerManager to manage worker interactions.
    • StatusReporter to report statuses.
  2. All manager classes (Vanilla*Manager) and StatusReporter are registered with dependencies like:

    • binder
    • binder_monitor
    • Other relevant managers (e.g., client_manager, task_manager).

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

No branches or pull requests

3 participants