divviup / divviup/divviup-api

Provide idempotency key to the task creation endpoint in an HTTP header

Open
#200 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

byohelper
Dominant language
Rust
Stars
10
Forks
5
Avg merge
2h 41m
Merged PRs (30d)
66

Description

For resilience against transient errors, we should make sure divviup-api's interfaces are idempotent. The challenge is establishing a useful idempotency key: in this proposal, the subscriber is no longer responsible for choosing any unique task parameter like task ID or VDAF verify key. In the near term, we can accept that when task creation fails, it may leave orphaned tasks in one or the other aggregator's database, which is not a significant concern because it only costs a single database row and it should be easy enough for something like Janus' garbage collector to identify and reap the orphaned tasks. In the longer term, we can implement support for an idempotency key in an HTTP header (see draft-ietf-httpapi-idempotency-key-header for one solution strategy) that would make this endpoint properly idempotent.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing divviup-api's task creation endpoint and reviewing the draft-ietf-httpapi-idempotency-key-header proposal. Define the HTTP-header behavior and verify that repeated task-creation requests are handled idempotently, while considering the stated orphaned-task and Janus garbage-collection context.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.