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

Support Prefer: handling=strict #701

Open
6 tasks
fmigneault opened this issue Aug 28, 2024 · 0 comments
Open
6 tasks

Support Prefer: handling=strict #701

fmigneault opened this issue Aug 28, 2024 · 0 comments
Assignees
Labels
project/OGC Related to OGC testbeds or relavant projects. triage/feature New requested feature.

Comments

@fmigneault
Copy link
Collaborator

Description

  • Support Prefer: handling=strict to enforce a given mode (respond-async or wait)
    For example, using Prefer: handling=strict, wait=5 and failing to complete the process synchronously within the allocated wait time would result in an error rather than switching to asynchronous execution automatically.

  • If Prefer: wait=X, handling=strict cannot be respected (since the server is not permitted to fall back to async by strict within the wait time), return "408 Request Timeout".

  • For the opposite case, where Prefer: respond-async, handling=strict cannot be respected, respond with "412 Precondition Failed".

  • Support Prefer: handling=lenient (default when omitted), that allows automatically switching to async after sync if within wait and respond-async provided simultaneously

  • Ensure that allowed execution mode by the process are still respected.
    If they mismatch, directly respond "400 Bad Request".

  • Update documentation with Prefer: handling=strict that can be used to enforce (rather than preference only)

    .. warning::
    It is important to remember that the ``Prefer`` header is indeed a *preference*. If `Weaver` deems it cannot
    allocate a worker to execute the task `synchronously` within a reasonable delay, it can enforce the `asynchronous`
    execution. The `asynchronous` mode is also *prioritized* for running longer :term:`Job` submitted over the task
    queue, as this allows `Weaver` to offer better availability for all requests submitted by its users.
    The `synchronous` mode should be reserved only for very quick and relatively low computation intensive operations.

References

@fmigneault fmigneault added triage/feature New requested feature. project/OGC Related to OGC testbeds or relavant projects. labels Aug 28, 2024
@fmigneault fmigneault self-assigned this Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project/OGC Related to OGC testbeds or relavant projects. triage/feature New requested feature.
Projects
None yet
Development

No branches or pull requests

1 participant