I have an idea for a Banner Exchange Network and I'm currently looking at the theory behind it.
The problem I'm having is that the method I have in mind will absolutely hammer my server by having 3-4 MySQL requests per ad impression.
Below, I have included a guide of the process for each ad impression. I would appreciate any input you have about this process, and any amendments you think would make it more efficient in any way.
Many thanks.
1: Flash banner file hosted on website
Adobe Flash file will be provided enabling publishers to host the advert file directly on their website. This file will include advert images to cut down on bandwidth transfer between servers, and offer a simple 'Click and Go' service.
2: Get publisher address
The Adobe Flash file will get the current published web address location and store this as a variable.
3: Post publisher address to server hosted PHP file
The PHP file here will receive the data and create a query string for MySQL.
4: Query database for ad
This query will find an ad to display (at random), and get the details for it such as destination address and the image ID for the hosted flash file to display.
5: Update database for advertiser
This will send a query to update the stats for the advertiser. This will include taking 1 credit away from their credit balance, and increase their total impressions by 1 credit etc.
6: Update database for publisher
This will send a query to update the stats for the publisher. This will include adding 0.5 credits to the credit balance.
7: Send data to flash file
This will take the information from the PHP file quering the database and send it to the Flash file hosted on the publishers website.
8: Display image
The image ID taken from the database will be given to the Flash file and show the corresponding image and provide it with a link destination.
9: If link is clicked, post to server PHP file
This PHP file will send query to database to update total clicks received in advertisers stats. Ad will open in new window.