Qiskit / qiskit-serverless

A programming model for leveraging quantum and classical resources
https://qiskit.github.io/qiskit-serverless/
Apache License 2.0
67 stars 31 forks source link

Tech debt: refactor of scheduler + job updates #1033

Open IceKhan13 opened 1 year ago

IceKhan13 commented 1 year ago

What is the expected enhancement?

As a dev I want program jobs emit an event and notify backend to update status of job and results in order to remove polling logic.

Currently job updated using polling logic and django commands.

Tansito commented 1 year ago

Some ideas & discussions here: https://github.com/Qiskit-Extensions/quantum-serverless/discussions/644

akihikokuroda commented 11 months ago

I'll try this. I'll make a prototype with

  1. wrap the entry point sent to Ray. it sends a notification to the gateway when the entry point completes execution. It eliminates the polling of the ray job status.
  2. put a signal listener for Job db changes. It can check if a Job to be scheduled and it some resources to be cleaned up.

The polling loop can be removed with these changes. It may remove the scheduler itself.