What is the progress of this project now?
bkda opened this issue · comments
-
From the wiki page, it seems that there's a part called Banker, but I can't find it.
-
As a matter of fact, when we tried to use this project, we need to do some custom work maybe refactor
rtb/core/openrtb.hpp
which means many part of it will be modified. So can you give me some advice about this? -
By the way, is there a branch that supports Redis so that we can handle data with other component written by Python .etc.
Thanks.
Dear TracyDa, thank you for your interest in vanilla-rtb project. The status of the project - ongoing ( work-in progress )
From the wiki page, it seems that there's a part called Banker, but I can't find it.
-
- We thought of generic interface for a Banker to have sort of authorize() function , but currently you will have to read data directly as in examples here:
-
- If you run only on 1 machine, then you don't need master->slave , the slave option is only when your stack runs on farm of servers. As a designer of your system you will have to fill in the gaps, we only provide examples how to use libraries as vanilla-rtb is not an application.
As a matter of fact, when we tried to use this project, we need to do some custom work maybe refactor rtb/core/openrtb.hpp which means many part of it will be modified. So can you give me some advice about this?
- In the wiki https://github.com/venediktov/vanilla-rtb/wiki/Creating-bidder
- I tried to explain how to customize openrtb formats without actually changing vanilla stack as it's going to be harder for you to merge as we put in the changes .
- I would recommend for you to create a project as stated in vanilla front page pointing to
https://github.com/vanilla-rtb/rapid-bidder - I suggest to create your own project similar to rapid-bidder and refer to vanilla-rtb via github submodule , or subtree. ( I will add wiki page how to do that )
- https://github.com/vanilla-rtb/rapid-bidder/ + DSL - create a directory like that and put your
custom_dsl.hpp there , your custom dsl can be like
template<typename T=std::string , unsigned int Size=128>
class CustomDSL {
using deserialized_type = openrtb::v25::BidRequest<T>;
using serialized_type = openrtb::v25::BidResponse<T>;
using parse_error_type = jsonv::parse_error;
//....
//....
//....
};
I am not familiar with version of openrtb you are trying to support , but we use DSL mapper with boost::optional and that allows us to have missing fields in the message as long as openrtb::BidRequest uses boost::optional for that field. So if you want to write your own you can use boost::optional for those extra fields , but you have to add magic code to CustomDSL to map those
new fields, even though they are optional extractor needs to know how to map them in case they are sent.
So, if you see field in openrtb::BidRequest as optional , most likely we already provided DSL code for that and you don't have to do anything , you can simply ignore sending this field in the message.
By the way, is there a branch that supports Redis so that we can handle data with other component written by Python .etc.
- we did not want to include specific implementation of Redis or Aerospike or other client, we only provided interfaces
- if you look at this directory https://github.com/venediktov/vanilla-rtb/tree/master/rtb/client
There is a dummy implementation of Key /Value client , you can create under your project
https://github.com/vanilla-rtb/rapid-bidder/ + client - put your implementation there , you should use your namespace not vanilla::client.
Then in the examples we show how user matching can be done with decision_router ( you don't have to use decision_router , you can simply use if/else logic )
So , if say you had created your redis_key_value_client.hpp
then if you look in the latest examples :
https://github.com/venediktov/vanilla-rtb/blob/master/examples/bidder/http_bidder_test.cpp
you will substitute
using kv_type = vanilla::client::empty_key_value_client;
with
using kv_type = your_project::client:: redis_key_value_client;
You can use rapid-bidder as a prototype for your project . I would not modify vanilla stack or even examples , because they are changing
and you might have to resolve merge conflicts
We're going to add more to WIKI and put some redis client code into rapid-bidder model project, please give us few days.
Thank you for providing such a meticulous answer, this will be great help to my work.
I hope you will like our new classes, allowing you to reuse GenericDSL and create just mapping for your custom protocol.
https://github.com/venediktov/vanilla-rtb/wiki/Customizing--BidRequest-and-BidResponse
If you get stuck or need some clarification , you can ask us anytime.
I hope it was OK to use your code with your comments for our WIKI pages.