-
Notifications
You must be signed in to change notification settings - Fork 765
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
Prebid Server Stored Responses #861
Comments
One variation might be to store the expected response from the bidder. This would allow for testing the bidder adapter code to some extent. The adapter reads the request and prepares a call (to the bidder). Instead of actually sending the request out over the internet, you feed the adapter the stored response, which it then processes into bids. The upside is you get some validation on the bidder parameters you are sending to the adapter, and some testing of the adapter code. (it is almost an end to end test) The downside is it requires knowledge of the bidder's expected response in order to set up, rather than a standard format that can be used for all bidders. |
Also a note on the above format, in the go version generating the targeting key/values is done by the base PBS code, not the adapters. Does the Java version generate targetting inside the adapter, or should that section be dropped as the parameters will be automatically generated in the normal execution flow after the stored bids are merged in with and adapter bids? |
@hhhjort - I'm not real fond of the work that will involved in trying to get valid bid response examples from 20+ adapters. But I agree that could be useful in setting up tests, including the end-to-end test environment we've discussed. If we go with the "override" approach, then targeting key/values are just in the override. If not, then we let core generate them. Another thing I don't love about the "per-bidder" approach is the difficulty in supplying multiple stored response IDs. My team wants a simple way of specifying a test scenario, and requiring them to enter multiple IDs isn't so simple. e.g. And the last thing I don't like is that every bidder is going to need to changed to understand this feature. And all future bidders. Rather invasive. For my first concern, I guess we can give up on having the stored-responses look like actual responses, and just make up a new format that's processed by core.
The second concern may also be relatively minor as it's only a couple lines of code added into each bidder hopefully. Welcome feedback from the broader community. I'm still leaning slightly towards the simpler Option 1 as it's quite a bit easier to implement and doesn't require mass coordination. |
We talked about this in the Prebid Server committee and realized both approaches have use cases. Proposal updated. |
Note: updated what's stored in the DB to just the array portion of the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This has been implemented in PBS-Java. Waiting on the Prebid.js changes to be merged before we can really try it out. |
Hello @bretg
is this a valid case? Should bidder name be unique? If yes - do we need to validate it? Thank you! |
Hadn't considered it @VeronikaSolovei9 , but I'd say yes, it should be supported. It's completely valid nowadays with the multibid feature for a single bidder to supply more than one bid. |
@bretg |
Bottom line: stored responses is a debug feature. And IMO, storedbidresponse is lower priority than storedauctionresponse. So I'm fine with keeping the code simple. |
Implemented in PBS-Go 0.208.0. |
While testing SDK and video integrations, it's important, but often difficult, to get consistent responses back from bidders that cover a range of scenarios like different CPM values, deals, etc.
We discussed in the Prebid Server PMC supporting a 'stored-response' feature. After discussing with the Prebid Server committee, we've decided to go with two approaches:
Single Stored Auction Response ID
When a storedauctionresponse ID is specified:
e.g. this request:
could result in:
Multiple Stored Bid Response IDs
In contrast, this approach lets some real auctions take place while some bidders have test responses that still exercise bidder code.
Which could result in:
Setting up the Stored Response
We would add a new (logical) table within Prebid Server's DB alongside
stored_requests
. Entries in the DB designed for Single Stored Auction Responses would be the array portion of theseatbid
with bids on one impression from many bidders:The impid should match what was placed into the request so that the response can be matched up properly to the ad unit.
Entries in the DB designed for Multiple Stored Bid Response IDs would reflect whatever a bidder actually responds with. e.g. Rubicon XAPI returns something like:
Instead of actually calling their exchange, each bidder will be updated to have a debug mode where it can be told what the response would be, using that bidders parsing logic to create the PBS bidResponse object.
Coordinated changes in Prebid.js and SDK
In order to utilize this feature, the PrebidServerBidAdapter in Prebid.js could to be updated to pass the storedauctionrequestid and/or storedbidrequestid in the openrtb field(s). e.g. We may be able to have a simple invocation mechanism like adding a
pbjs_stored_auction_response_id=111111111
to the page's query string. Or perhaps we can utilize the existing pbjs.setConfig("debugging") functionality. This feature will be worked out at a later time.The SDK would also need to be updated to support passing the openrtb field(s), but the app would need to have a "debug mode" to pass the response IDs when necessary.
The text was updated successfully, but these errors were encountered: