cs445 - Spring 2012

Project - Questions And Answers


Many thanks to the following students who have contributed questions for this section:

  • Snehal Mahalle
  • Joseph Bates
  • Harika Thadakamalla
  • Jiarui Huo
  • Zixiang Cao
  • Sabin Popa

Q: How many ad banners are there in one page? Is there a maximum number?

A: There can be as little as none, or as many as you want. Good websites limit the number of ads to no more than a few per page. Also, as a practical matter, the number of placements is in the single digit or low double-digit, or else the sales process is unmanageable.

Q: Is the layout the same for all pages in a section?

A: Yes, all pages in a section have the same layout in terms of number of ads.

Q: What happens if two sales people attempt to sale all available inventory on a placement at the same time, who gets the booking?

A: This is the classic problem of critical section. A properly written application should use synchronization primitives, such as semaphores, to make sure only one of the two sales people gets the booking, not both, in which case the inventory would be oversold.

Q: What is the relationship between placements and ad tags?

A: There is a one-to-one correspondence between placements and ad tags.

Q: What is "projected" inventory?

A: Projected inventory is all the inventory that will be available to sell for a specific placements on a specific date or date range.

Q: What is the average CPM?

A: The average CPM is a weighted average of all the CPMs in the order.

Q: When the Ad Operations employee enters the inventory, do they do it on a day-by-day basis or she uses date ranges?

A: The basic implementation for your project requires day-by-day. Doing it based on date ranges is a worthy enhancement for the future.

Q: Can the Ad Operations employee upload projected inventory from a file?

A: Yes. Probably the simplest is to get the inventory from an XML file. Here is a sample XML file for a website that has six placements.

Q: How should we notify the sales person who created the sale and the VP of sales (e.g. e-mail, message when they next log in, etc.)?

A: In real life this would be something like email notification. For the project this will be just a message sent to stdout saying "Notification sent to X and Y", whomever X and Y may happen to be; this is to make sure you don't have to mess up with setting an email gateway and such.

Q: How should we maintain state between sessions?

A: The easiest way is to serialize all objects that matter and save them to file(s) on exit. When you start the application you can test for the existence of that file and restore objects from it. If you're going to use a database for persistence, then you can use the database to persist information that's relevant to session(s).

Q: Who has the right to do what in the system?

A: The table below provides the answer.
Role Users Inventory
adminview, create, update, delete  
ownerview, update book; view/cancel any booking, including committed inventory
adoperations  add/view/modify projected inventory; view bookings
accountingview view projected inventory and bookings; can change bookings to committed inventory
salesview view projected inventory; create booking; view/modify/cancel own bookings; cannot modify or cancel committed inventory
vpsalesview view projected inventory; create booking; view/modify/cancel any bookings -- including committed inventory -- created by herself or her employees in Sales

Q: Can the order and the individual bookings in the order have different start and end dates?

A: Yes. An order is an umbrella for various buys at the placement level. It's not uncommon to place an order at the beginning of the year that specifies what will run every month.

Q: Do we need to validate the input data?

A: Aren't you tired of crappy applications? Yes, you have to do it. It's not enough to do it on the client side, you must (also) do it on the server side: this is called "complete mediation" in information security and prevents attackers from sending bad data directly to the server.

Q: Are the names of placements immutable?

A: No, the names of placements can be changed.

Q: Does CPM varies for each day? Can it be static for a placement? i.e to be entered when the actual placement is created and stay like that for a longer time?

A: The CPM for a placement doesn't change on a day-by-day basis, however it may change from booking to booking based on how prices are negotiated between the sales person and the buyer. Each website that generates revenue from advertising will publish a rate card that lists the prices charged for advertising, however, in reality prices tend to be negotiated down from the rate card. The rate card may ask for $5 CPM for the leaderboard on the home page, but one booking may show an actual price of $3.50, while another booking for the same placement may be at $4.25 CPM.

Q: What happens if within the date range for a booking there are days when no inventory is available?

A: This is where the project gets interesting, i.e. how to create a booking if the buy spans multiple days when what's available on each day is different from any other day. The general rule is that the booking should be possible if the sum of all available inventory for the desired placement and in the desired time frame is less than what the advertiser wants to buy on that placement. The real question is how much of the inventory you subtract from each day when doing the booking.

Multiple algorithms are possible for dealing with the problem. For purposes of this project we'll implement "Constant", which attempts to distribute the booked inventory in equal parts to each of the days in the booking period. So, if you're trying to book 10,000 impressions over a period of ten days, then you should attempt to subtract 10,000/10=1,000 impressions from each day's available inventory. Let's say one of those days only has 500 impressions available: in this case the 500 impressions will be booked on that days, and the remaining 9,500 impressions will be evenly distributed over the other 9 days, which is 9,500/9=1,056 impressions per day.

$Id: QandA.html,v 1.7 2012/04/09 23:12:33 virgil Exp $