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

Propose a simple trigger prioritization algo for flex event #1112

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions flexible_event_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ _Note: This document describes possible new functionality in the Attribution Rep
- [Goals](#goals)
- [Phase 2: Full Flexible Event-Level](#phase-2-full-flexible-event-level)
- [API changes](#api-changes)
- [Trigger prioritization](#trigger-prioritization)
- [Trigger-data modulus matching example](#trigger-data-modulus-matching-example)
- [Configurations that are equivalent to the current version](#configurations-that-are-equivalent-to-the-current-version)
- [Equivalent event sources](#equivalent-event-sources)
Expand Down Expand Up @@ -169,6 +170,17 @@ When the `event_report_window` for a spec completes, we will map its summary val
"trigger_summary_bucket": [<bucket start>, <bucket end>]
}
```
### Trigger prioritization

Given that triggering attribution can affect a source's state without producing a report, we will need a new algorithm for doing trigger prioritization. Here is a sketch of how it could work:

1. For every source, maintain a list of triggers, sorted in order of priority (descending), then trigger time (ascending)
2. At the end of any report window (across all of a source's specs, breaking ties arbitrarily):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any concern that breaking ties arbitrarily will make it harder to ensure interop conformance?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could someone please give an example where breaking a tie one way would differ from another? What choice are we referencing here?

1. Iterate through the source's triggers in order, "applying" them to generate a list of "speculative" reports. Stop whenever privacy limits are hit.
2. Send all of the speculative reports that are scheduled to be emitted in the current window
3. Update the source's total value per trigger data, and total # of event-level reports based on all of the triggers that were successfully applied in the current window.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference between "successfully" applied and otherwise applied?

4. Delete all of the speculative reports that are not scheduled to be emitted in this window.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did the reports that are deleted here get created?

5. Delete all of the triggers associated with the current spec and window from the source's trigger list
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this works with the current Android implementation that has "partial" application of a trigger's value, which can extend to the next window. Maybe I'm misunderstanding.


### Trigger-data modulus matching example

Expand Down