simplify bidder assembly process
venediktov opened this issue · comments
Vladimir Venediktov commented
It looks like coding a new bidder not based on Geo model we provided in examples requires quite few lines of code.
the pattern we observed is the following - output from one matcher becomes input to the next in the chain.
Following needs to be implemented to simplify bidder assembly process:
- Create chained_slector to delegate output from previous matcher to the next in the chain
- Create generic version of bidder cache loader "GenericBidderCacheLoader" capable of loading all matchers data
- Same GenericBidderCacheLoader should be utilized to retrieve matched data from caches
template<typename Entity, typename ...Entities>
struct GenericBidderCacheLoader<Entity, Entities ...> : GenericBidderCacheLoader<Entities ...>
- Simplify the use of bidder as following
.auction_async([&](const BidRequest &request) {
thread_local vanilla::Bidder<DSLT, Selector> bidder(std::move(Selector()));
return bidder.bid(request,
std::make_tuple(
request.site.get().ref,
retrieve_referer_f,
retrieve_ico_campaign_f,
retrieve_campaign_ads_f
)
);
});
If following implemented then this code
std::make_tuple(
request.site.get().ref,
retrieve_referer_f,
retrieve_ico_campaign_f,
retrieve_campaign_ads_f
)
Can be easily generated based on data model provided by DSP.
Vladimir Venediktov commented
work in progress
https://github.com/venediktov/vanilla-rtb/tree/ico_bidder20171217