Movie Swap/Description

CS290F Fall 2006 - UCSB Computer Science - Thorsten von Eicken

Jump to: navigation, search

Movie Swap: Project Description, Implementation Details, Testing & SQL Optimization, Scaling to Multiple Servers
Trial & Error Page, In-Class Presentation


Contents

Current Functionality

We are going to build a website where users can trade movies they own with other users. When users create a new account, they establish a personal library of movie titles they own (and are willing to trade), by searching for their movies in our catalog. Users can then browse (or query for) the list of movies that they could obtain via trading and propose a trade with some or all other users that own the movie they want (users that already own the movie that is being proposed for trade are automatically excluded). A "trading basket" is stored in the session state, to help the user while he is browsing and before he makes his trading proposals. When users log in, they can view the potential trading transactions that have been proposed to them, and are given the choice of accepting or rejecting each transaction (atomic). The user can also see the status of the transactions he has proposed and is notified when one of his requests is accepted or rejected.

Business Logic

  • A user starts by adding movies to his library.
  • As soon as a user adds a movie to his library it becomes tradable. He does not need to flag a movie as tradable or not. This means that whenever a user searches for available movies for swapping he will get all the movies that are owned by other users.
  • A user can propose a swap to other users. This means that he presents one of his movies from his library in exchange of another movie owned by another user. This goes as following:
    • A user searches for available movies for swapping.
    • When he decides that he wants a movie, he presents one of his movies in his library in exchange for that one.
    • Doing this a user has proposed a swap to another one.
    • When he finishes he wait for the other user until that user either accepts or rejects the swap.
  • A user is not allowed more than one movie in his library. This has many affects:
    • A user can not ask for a movie in a swap if he owns it.
    • If a user added a movie to his library, all proposed swaps to him that includes this movie will be invalidated and rejected. Also all swaps he proposed asking for this movie will be invalidated.
    • A user can not ask for a movie in a swap if he owns it.
    • A user can not propose to other users movies that they own.
  • The swapping is very flexible. If a user wants to get rid of a movie then he can propose it movie to as many users as he can. He also can propose it to the same user more than once asking for different movie each time. On the other hand if a user is eager to get some movie then he can propose any number of movies from his library in exchange of this one. At the end when a swap is accepted by a user, we have to make sure that all other swaps related to it are invalidated. Related here means that the user proposed the movie twice in exchange of two other movies. This time one of the two swaps will be rejected once the other one is accepted.

Dream Functionality

  • User's can give feedback about other users and positive/negative ratings (like EBay).
  • The browse feature categorizes movies by genre.
  • In addition to listing the movies they own and are willing to trade, users can also specify their preferences, to create both a wishlist (positive preference) of the movies they would like to own and a rejection list (negative preference) of the movies they are not interested in.
  • Users can choose to block (automatically reject) transactions that don't meet their preferences (they can say, "only permit trade proposals for movies that are in my wishlist" or "don't permit trade proposals for movies I've listed in my rejection list"). Other users will not be able to propose transactions that have been blocked. Other blocking criterion can be used, such as user rating, blocking specific users, etc.
  • Users are matched based upon their preferences. When John Doe browses for the movies he can obtain via trading, he can filter the results so that the only movies shown are ones that are owned by users who have explicitly stated in their preferences that they are looking for a movie that John Doe owns.
  • The browsing results are ordered by a ranking system. Ranking criteria could include availability (how many users own the movie), likelihood of a trade succeeding with users who own the movie (ratio of how much the owner wants movies that John Doe owns to how much he values the movie in question), and the ratings of users who own the movie (see above).
  • Counter transaction proposals: If User X rejects a proposal given by User Y, he has the option of giving a counter proposal to User Y (i.e. "I won't trade Goodwill Hunting for the Lion King but I am interested in another movie you have.")
  • When a user rejects a transaction, they are given the option of blocking all future transactions proposed by that user and also the option of blocking all future transactions proposing that movie.
  • Indirect transactions: Permit complex transaction relations to take place. For instance, supposed User X owns Movie A and wants Movie B, User Y owns Movie B and wants Movie C, and User Z owns Movie C and wants Movie A. A transaction could occur if all the parties involved agree to swap their movies.
    • Smart Trader(TM): A bot that works in the background, traversing the graph of such recurrences. When it finds a dependency cycle (up to some fixed length), it automatically proposes a transaction.
  • Full-text search indexing and queries of our movie catalog.
  • User profiles: Users can create profiles and display other users' profiles, which contain biographical information about the user and list the movies they own and want.
  • Regional selection: Users can limit their browsing/queries to only include other movies owned by users who are with-in the same geographical location as them. Similarly, they can block transactions that aren't "local".
  • Movies for sale: If a user wants a movie that is unavailable through trading, we can permit them to buy it from us.

Source of Data

The data for our movie catalog is provided by Amazon eCommerce.