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

Incremental retrieval of plans as they are discovered #39

Open
jan-dolejsi opened this issue Jun 1, 2022 · 0 comments
Open

Incremental retrieval of plans as they are discovered #39

jan-dolejsi opened this issue Jun 1, 2022 · 0 comments

Comments

@jan-dolejsi
Copy link

Planners that support multiple plans are penalized by this interface in the eyes of the end user. The planner may have come up with one or multiple plans, but the end-user still stares at a blanc screen.

Rather than the state transition from PENDING to ok, we should support QUEUEING -> INITIALIZING -> SEARCHING_FOR_INITIAL_PLAN -> SEARCHING_FOR_INITIAL_PLAN -> STOPPED -> HTTP404 (when the plans are removed).

The first endpoint post request should return the session/run ID:

POST /package/xyz/solve

{
  "status": "QUEUEING",
  "id": "qwer-qwer-qwer-qwer"
}

GET /package/xyz/solve/qwer-qwer-qwer-qwer

{
  "status": "SEARCHING...",
  "plansFound": 2
}

GET /package/xyz/solve/qwer-qwer-qwer-qwer/plans/1

{
  "actions": [],
  "metric": 123,
  "elapsedTime": 1234
}

Similarly, the client should have the power to stop the planning process and purged all the data:

DELETE /package/xyz/solve/qwer-qwer-qwer-qwer/

Note that that the URL structure does not need to repeat the /package/xyz/solve/ prefix, but if it does not, we have to come up with a different term for it, e.g. /request/qwer-qwer-qwer-qwer/

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