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

Updated list of what can be a promise #1298

Open
patmmccann opened this issue Oct 10, 2024 · 19 comments
Open

Updated list of what can be a promise #1298

patmmccann opened this issue Oct 10, 2024 · 19 comments

Comments

@patmmccann
Copy link
Contributor

Several things that cannot be a promise seem to not have good reason to be excluded, eg

sellerExperimentGroupId
perBuyerExperimentGroupIds
perBuyerCurrencies

As async auctions become more popular, it would be useful to have as much as possible as a promise. Currently the fledge explainer lists these: "The values of some signals (those configured by fields auctionSignals, sellerSignals, perBuyerSignals, perBuyerTimeouts, deprecatedRenderURLReplacements, and directFromSellerSignals) can optionally be provided not as concrete values, but as Promises."

Is that a full list?

@patmmccann
Copy link
Contributor Author

cc @mkendall @dgirardi

@morlovich
Copy link
Collaborator

morlovich commented Oct 10, 2024 via email

@patmmccann
Copy link
Contributor Author

cc prebid/Prebid.js#12205

@patmmccann
Copy link
Contributor Author

@morlovich that list is extremely helpful, it seems a Pr on the explainer with the full list is in order? Referencing that list isn't the most user friendly thing :) Works for me, but seems awkward if I point to it in documentation

@JacobGo
Copy link
Contributor

JacobGo commented Oct 10, 2024

+1, I'd also add perBuyerGroupLimits and perBuyerMultiBidLimits to the feature request list. There's certain fields that can't be deferred though, e.g.perBuyerExperimentGroupIds must be passed on the DSP lookup.

I do hope that as part of maturing Protected Audience / Ad Selection API, browsers will code-generate TypeScript interfaces from the IDLs like other web APIs.

@dmdabbs
Copy link
Contributor

dmdabbs commented Oct 10, 2024

Also maybe perBuyerCumulativeTimeouts, if I correctly read latest published spec:

Promise<record<USVString, any>> perBuyerSignals;
Promise<record<USVString, unsigned long long>> perBuyerTimeouts;
Promise<record<USVString, unsigned long long>> perBuyerCumulativeTimeouts;

@MattMenke2
Copy link
Contributor

perBuyerGroupLimits as a promise would mean we can't start loading buyer scripts, so it seems not too useful as a promise, since we effectively can't do anything, at least for any component auction without it set yet, though if we care about values like that, it would seems simpler to allow entire componentAuctions to be promises.

@rdgordon-index
Copy link
Contributor

perBuyerGroupLimits as a promise would mean we can't start loading buyer scripts

Wouldn't there still be value here in limiting how many IGs to execute per component seller, even if they have been loaded?

It would seems simpler to allow entire componentAuctions to be promises.

That's an interesting option, since it avoids the all-or-nothing promise at the top-level seller level.

@MattMenke2
Copy link
Contributor

Wouldn't there still be value here in limiting how many IGs to execute per component seller, even if they have been loaded?

What if an IG we had been asked to exclude had already won the auction?

@rdgordon-index
Copy link
Contributor

rdgordon-index commented Oct 15, 2024

What if an IG we had been asked to exclude had already won the auction?

Not sure I follow -- the auction wouldn't start until the rest of the promises had resolved (like auctionSignals, sellerSignals, and perBuyerGroupLimits), which are needed to make any sense of the bids...

@MattMenke2
Copy link
Contributor

Not sure I follow -- the auction wouldn't start until the rest of the promises had resolved (like auctionSignals, sellerSignals, and perBuyerGroupLimits), which are needed to make any sense of the bids...

If we can't start the auction, there's not much point in using promises - which was why I was saying it was not useful.

@rdgordon-index
Copy link
Contributor

Well, you can start the auction -- in the sense that script runners can be fired up, KV calls can be initiated etc. -- but you're talking about an auction winner above....

@MattMenke2
Copy link
Contributor

So you're proposing a new stage to auctions, where we have bids (which may or may not be scored), but haven't applied the group limit filter on them, and then we can apply the group limit to the bids. It's doable, but it very much can't just be lumped into how we handle other promises, because of that new phase. I'm skeptical it's worth the complexity for just letting that one field be a promise, though not my call.

@rdgordon-index
Copy link
Contributor

Also maybe perBuyerCumulativeTimeouts, if I correctly read latest published spec:

It's not entirely clear how some of these were chosen to be promises or not... for example, perBuyer* -- we did talk about limits above, but not about the others.

On the seller side, what about currency?

And perhaps there's a nuance from https://github.com/WICG/turtledove/blob/main/PA_implementation_overview.md#phase-2-bidding-and-scoring-phase that I've missed, but on the seller side, since the KV calls are not made until after generate bid, what's the requirement for the TSS being known in advance?

@patmmccann
Copy link
Contributor Author

patmmccann commented Oct 21, 2024

Just noting as well that the TSS can't be a promise concern of @rdgordon-index is particularly difficult to many implementors

I certainly understand things that delay the downloads of decisionLogicUrls are not good candidates

@rdgordon-index
Copy link
Contributor

https://github.com/WICG/turtledove/blob/main/PA_implementation_overview.md#component-auctions mentions that:

In the case of top-level auction with multiple nested component auctions, the auctions are largely run independently, except that the interest group loading phases for all auctions must complete before any auction enters the generate bid phase

Can you clarify why this is the case? What would prevent starting the auction for seller A if its interestGroupOwners are loaded, even if seller B's IG owners aren't?

@MattMenke2
Copy link
Contributor

https://github.com/WICG/turtledove/blob/main/PA_implementation_overview.md#component-auctions mentions that:

In the case of top-level auction with multiple nested component auctions, the auctions are largely run independently, except that the interest group loading phases for all auctions must complete before any auction enters the generate bid phase

Can you clarify why this is the case? What would prevent starting the auction for seller A if its interestGroupOwners are loaded, even if seller B's IG owners aren't?

Note that's the "implementation overview" - how it is implemented, as opposed to normative "this is how it must be implemented". That code predates the introduction of promises, and refactoring it would be a pretty significant undertaking, since tracking all the types of things we need to wait for to gauge auction progress is non-trivial. It's also tightly coupled to histogram collection.

@rdgordon-index
Copy link
Contributor

rdgordon-index commented Oct 23, 2024

As per the discussion on today's WICG call, I'll open a new issue regarding the possibility of a trustedScoringSignalsURL promise.

EDIT: #1314

@rdgordon-index
Copy link
Contributor

From #1314 (comment) (emphasis added):

Our current architecture keys worklets on all URLs and everything that goes into the trusted signals query param that can't be merged (e.g., slot size, experiment ID)

unsigned short sellerExperimentGroupId;
record<USVString, unsigned short> perBuyerExperimentGroupIds;

Re: experiment ID -- as mentioned in other issues, if this cannot be a promise, this would mean that client-side logic would need some ability to manage, and persist, experiments -- yet another significant challenge to being able to adopt the parallel auction workflow. The bid adapters have very little business intelligence in them, and managing server-side seems like an obvious need.

Looking more closely, I now see that buyer experiment group ID also isn't a promise -- I can't speak for buyers, but I'd assume they are expecting contextual responses to power experiments as well -- since they don't have any code in page with which to manage such configuration (and neither would sellers on their behalf).

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

6 participants