-
Notifications
You must be signed in to change notification settings - Fork 8
Auction orchestration #147
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
base: main
Are you sure you want to change the base?
Conversation
92c19a7 to
39cb7dc
Compare
39cb7dc to
c82ffd3
Compare
aram356
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Good start
- Please address tests and formatting
- I would like to re-review
d694498 to
eaee2cf
Compare
| let mut responses = Vec::new(); | ||
|
|
||
| for (provider_name, pending, start_time, provider) in pending_requests { | ||
| match pending.wait() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 We have to wait for each response sequentially but i think we should use select to wait for the first ready response so that we can do work while others still execute
see: https://docs.rs/fastly/latest/fastly/http/request/fn.select.html
| // Phase 1: Launch all requests concurrently | ||
| let mut pending_requests = Vec::new(); | ||
|
|
||
| for provider_name in provider_names { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 We should have timeout for each provider
| price: None, // Encoded price in metadata, decoded by mediation | ||
| currency: "USD".to_string(), | ||
| creative: None, | ||
| adomain: Some(vec!["amazon.com".to_string()]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Why is amazon.com hard coded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I set it to None for now. Looking into it I think my aps request structure isn't accurate to what I see in the browser.
| ); | ||
|
|
||
| // Create a modified request with all bids attached | ||
| let mut mediation_request = request.clone(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
♻️ Reconsider cloning with Cow<'_, AuctionRequest>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cow wouldn't help because we need to mutate.
What do you think of these changes? 0b7811
| @@ -0,0 +1,906 @@ | |||
| //! Amazon Publisher Services (APS/TAM) integration. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ We decide not mock here. Is there reason why it is still here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This module for now is sending "aps" bid requests to the configured mock server, to test orchestrator and simulate how aps bids flow to an ad server, but perhaps it shouldn't be called aps.
8e518c7 to
c6dee36
Compare
Closes #139