![]() |
RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
#include <master_banker.h>
Public Types | |
| enum | PersistenceCallbackStatus { SUCCESS, BACKEND_ERROR, DATA_INCONSISTENCY } |
|
typedef std::function< void(std::shared_ptr < Accounts > , PersistenceCallbackStatus, const std::string &info)> | OnLoadedCallback |
|
typedef std::function< void(PersistenceCallbackStatus, const std::string &info)> | OnSavedCallback |
Public Member Functions | |
| virtual void | loadAll (const std::string &topLevelKey, OnLoadedCallback onLoaded)=0 |
| virtual void | saveAll (const Accounts &toSave, OnSavedCallback onDone)=0 |
For want of a better name... Router accounts have a float that they try to maintain; this is topped up either by recycling from post auction loops or increasing the budgets.
Post Auction Loop
Budget Controller
Principles:
Start PNT: Bud = $100, CM = $10, CR = $0, RO = $0, Avl = $89 RTR: Bud = $10, RI = $0, CM = $0, CR = $0, Sp = $0, Avl = $10 PAL: CR = $0, Sp = $0
Authorize $2 PNT: Bud = $100, CM = $10, CR = $0, RO = $0, Avl = $89 RTR: Bud = $10, RI = $0, CM = $2, CR = $0, Sp = $0, Avl = $8 PAL: CR = $0, Sp = $0
Win $1 PNT: Bud = $100, CM = $10, CR = $0, RO = $0, Avl = $89 RTR: Bud = $10, RI = $0, CM = $2, CR = $0, Sp = $0, Avl = $8 PAL: CR = $2, Sp = $1
SetAvail $10 $1 PNT: Bud = $100, CM = $11, CR = $0, RO = $1, Avl = $89 RTR: Bud = $11, RI = $1, CM = $2, CR = $0, Sp = $0, Avl = $10 PAL: CR = $2, Sp = $1
Recycled = $
Definition at line 145 of file master_banker.h.
1.7.6.1