Skip to content

Commit

Permalink
Add support for triggered updates
Browse files Browse the repository at this point in the history
  • Loading branch information
brusshamilton committed Oct 7, 2024
1 parent ebdfbb9 commit 04d7b11
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion draft-ietf-bidding-and-auction-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -733,10 +733,22 @@ response = {
; 5. add a tuple to the list in (1) of [interest group owner (2),
interest group name (4)]
; 6. return the list in (1)
? biddingGroups: {
? biddingGroups: {
* interestGroupOwner => [* int]
},

; Indices and update-if-older-than times of interest groups in the original
; request for this owner for interest groups where an update-if-older-than
; time was specified.
; Maps to https://wicg.github.io/turtledove/#server-auction-response-update-groups.
? updateGroups: {
* interestGroupOwner => [
* {
index: int,
time: int
}]
},

; Score of the ad determined during the auction.
; Any value that is zero or negative indicates that the ad cannot
; win the auction.
Expand Down Expand Up @@ -906,6 +918,27 @@ response from Bidding and Auction Services. It takes as input the
`included_groups[owner]`, return failure.
1. Let `name` be the `interest group name` for `included_groups[owner][element]`.
1. Append the tuple (`owner`, `name`) to `processed response["bidding groups"]`.
1. If `response["updateGroups"]` exists and is a map:
1. For each `key`, `value` in `response["updateGroups"]`:
1. Let `owner` be equal to `key` parsed as an [ORIGIN], continuing the next
iteration of this loop if there is an error.
1. If `request context`'s `included_groups` does not contain `owner` as a
key, continue the next iteration of this loop.
1. If `value` is not a list, return failure.
1. For each `element` in `value`:
1. If `element` is not a map, continue the next iteration of this loop.
1. If `element["index"]` does not exist or is not an integer or
`element["time"]` does not exist or is not an integer, continue the
next iteration of this loop.
1. If `element["index"]` is not an integer or `element["index"] < 0`, return failure.
1. If `element["index"]` is greater than or equal to the length of
`included_groups[owner]`, continue the next iteration of this loop.
1. Let `name` be the `interest group name` for `included_groups[owner][element]`.
1. Let `interest group key` be the tuple (`owner`, `name`).
1. Let `update duration` be `element["time"]`, parsed into a time
duration as integer milliseconds.
1. Set `processed response["update groups"][intereset group key]` to
`update duration`.
1. If `response["score"]` exists:
1. If `response["score"]` is not a floating point value, return failure.
1. Set `processed response["score"]` to `response["score"]`.
Expand Down

0 comments on commit 04d7b11

Please sign in to comment.