-
Notifications
You must be signed in to change notification settings - Fork 758
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
Support video cache #324
Comments
@mkendall07 and @dbemiller - we've discussed this internal to Rubicon, and are willing to build it if you guys sign off on the concept and design. |
Yes, we definitely do need this feature. I also agree it belongs in the There's one issue I know of, and I have a few questions about the motivation. Backwards compatibilityI tried to get peoples' attention on #216... but there was no response from Rubicon, so we just discussed use-cases offline and started building it. I kept commenting in that thread, so you can follow the discussion if you're interested. Cacheing the VAST was discussed. A full-blown "cache by mediaType" feature was not. Since Prebid Mobile has already been updated to use The good news is that I knew a feature like this was coming, so we can add support backwards-compatibly. For example, we could extend it to something like this:
MotivationI have a few questions about these I strongly believe that APIs should be extensible for future use-cases... but I also strongly believe that we shouldn't expose options which aren't worth the documentation burden, learning curve for our users, and time it takes to debug broken page setups. With that in mind:
|
Use case is important, it shows what functionalities we should provide. We may need to collect it from all bidders for all media types and channels. |
The use-cases that I know of are:
It sounds to me like my (2) describes this issue too. These are some concrete enhancements which we think we'll want in the future, but aren't prioritized or on our roadmap to implement anytime soon:
I'm also suspicious that we may need to cache both VAST XML and JSON, for Mobile Video. Nobody is able to confirm or deny, so... in the interest of flexibility, I consider it a possibility. From @bretg's comment above, it sounds like there's another possible case:
If there are others, it's better to know sooner rather than later. There are never any guarantees, but it minimizes the likelihood that we'll find ourselves having to make a breaking change (or live with an ugly API) in the future. This is the API design process which I've found works pretty well:
Although there are never any guarantees, these steps minimize the likelihood of deprecated options and breaking changes in the future. The best "idealized" API I could come up with in #216 (and tweaked to support the TTL case added here) is something like this:
If we like that, the next step would be to publicize this:
However... this design has a flaw (only one that I can see). If "cache bids and vastxml" will never be a valid use-case, then it offers too much flexibility. If a user asks us to cache both ways, then the If we're certain that "cache bids and vastxml" will never be a future use-case, then my idealized API is kinda crappy and we should rethink it. If we're not certain, then we'll need to return |
Make a lot of sense. I don't know what Mobile video wants to cache either. So far your "idealized" API should be the best solution. |
Let's assume that we may need to cache both XML and Bid JSON for the same bid someday. Make
Today, we support the For this feature, we would add |
The original comment from @bretg said:
I'm not sure what he means, though. To be clear:
|
That is a good point about where the cache URL info can be stored. If information does not need to be stored in targeting parameters, then best to keep it out to keep the parameters from being overloaded. I think there is a limit to the maximum number of bytes that can be sent as targeting parameters, so excessive use may eventually hit that wall. |
So currently I am thinking the cache API would look something like this:
By default Caching the VAST from |
@dbemiller I totally agree with your design: for this feature, build |
I don't care about the legacy endpoint at all. IMO our goal should be to encourage pubs to upgrade prebid.js versions and stop using it so we can delete it all from the project ASAP. If you find value in it and want to update the legacy API, I'll approve just about anything that doesn't violate the prebid code of conduct, doesn't have egregious performance drawbacks (no double-cache calls), and is written cleanly enough that I can tell it won't segfault :).
This is a really good point.. wasn't even on my radar for this project. In prebid.js we worked around this by making our own VAST which wraps that NURL. You can see how it's done here. If we need to cache a bid with a NURL, we should do the same in PBS.
This is a great thought, but... unfortunately I think we need to cache these too. I'm told that DFP forces pubs to hardcode the domain which will be serving their video creatives. NURLs can come from any domain, so... we still need to cache something and return a UUID for them in the targeting keys. |
(Picking up this thread) This covers the known use cases:
We're going to start building out this feature in Prebid-Server Java as defined here, and the prebidServerAdapter updates will follow. But we need to figure out what changes to make there. How about we support passing arbitrary ext.prebid objects through s2sConfig?
Since a full json-merge would probably be too expensive in the browser, I think we can just copy any objects found in s2sConfig.openrtbExt into bidRequest.ext.prebid. Don't believe pbsAdapter sets anything in request.ext.prebid right now. This design would allow a page to specify other PBS extensions as well:
|
hmm... I think that API is good from a PBS side, but should point out: TTLs are tricky, because everyone has some stake in them.
So... if we put a As for the I liked your idea a lot at first glance... but after thinking about it a while, it definitely has some warts that I would point out. It mostly affects the Prebid.js community, though, so it's probably better had over there in a design issue. |
Getting good questions from the engineering team that's forced me to re-evaluate my position on targeting variables. Right now we have Here's a summary of the PBS pseudo-code as I'm understanding it from above: if request.ext.prebid.cache.bids object is specified:
if request.ext.prebid.cache.vastxml object is specified:
Notes:
|
That's a fair summary... and yes, I agree that |
* OTT-356: Setting WB=1 for adpod bids for new generate bid id feature (prebid#304) * OTT-478: Added updatedrequest in debug log to know about floor rule selection (prebid#306) * OTT-478: Fixed UT for floors enforcement (prebid#308) * OTT-583 :: Refactored floor code and used RequestWrapper for retrieving and setting extension object (prebid#310) * OTT-589: Eids is getting passed randomly to user.eids for appnexus adapter (prebid#311) * OTT-583: Added formating (prebid#318) * OTT-479: Updated for currency conversion related valiation and error in rejected bids (prebid#320) * OTT-598:: Added check if floor data is nil * OTT-596: Updated error message for currency conversion error (prebid#322) * OTT-596: Fixed UT's for error message for currency conversion error (prebid#323) Co-authored-by: Jaydeep Mohite <30924180+pm-jaydeep-mohite@users.noreply.github.com> Co-authored-by: Jaydeep Mohite <jaydeep.mohite@pubmatic.com> Co-authored-by: Viral Vala <63396712+pm-viral-vala@users.noreply.github.com> Co-authored-by: Pubmatic-Dhruv-Sonone <83747371+Pubmatic-Dhruv-Sonone@users.noreply.github.com> Co-authored-by: PubMatic-OpenWrap <UOEDev@pubmatic.com>
Behavior:
The
cacheMarkup
flag causes PrebidServer to cache the bids and remove the creative body from the response to the client.The PrebidServerBidAdapter places
cacheMarkup
at the global s2sConfig level.Problem:
When the same web page contains both video (cached) and banner (uncached), the
s2sConfig.cacheMarkup
flag has to be changed in between requestBids() calls.Proposed solution:
Define
cacheMarkup
per media type.This allows for more control over when Prebid Server caches and responds with
hb_cache_url
andhb_cache_id
. The client should to be able to tell the server what it wants to do for responses of different media types.The proposed mechanism is to add a prebidServer-options extension to the bidRequest to allow the client to define what should happen for each mediaType. E.g.
When
cacheMarkup
is true for the given bid response based on mediaType, Prebid Server caches and responds withhb_cache_url
andhb_cache_id
.There could also be a default cacheMarkup value for each mediaType:
The text was updated successfully, but these errors were encountered: