RTBKit  0.9
Open-source framework to create real-time ad bidding systems.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Types | Public Member Functions
RTBKIT::BankerPersistence Struct Reference

#include <master_banker.h>

Inheritance diagram for RTBKIT::BankerPersistence:
RTBKIT::MockBankerPersistence RTBKIT::NoBankerPersistence RTBKIT::OldRedisBankerPersistence RTBKIT::RedisBankerPersistence

List of all members.

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

Detailed Description

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.

Router

Post Auction Loop

Budget Controller

Banker

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.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator