I'm doing an ad server (sort of RTB), there are advertisers who pay to promote their ad campaigns.
When the user watched the ad I want to charge the advertiser.
Ad campaigns should participate in auctions without blocking, means he can bid for multiple ad requests at the same time. It would make it difficult to charge advertiser immediately since I'll have to block his balance.
Another approach is to not charge him immediately, but in the separate process once every N seconds, and hope so he didn't buy more impressions than he can afford. I can make some sort of threshold credit he should have to participate in auctions, it would eliminate most of the overruns but what if the process is exited and the advertiser wasn't charged and overrun a lot, that would be a problem.
Can someone please advise me how these things are usually handled, maybe recommend some book/article on the topic, please?
