Sunday, November 11, 2012

Object oriented design for an online auction site

Object oriented design for an online auction site

Typical set of operations on the online auction site from the user perspective are

  • Users should register themselves and sign in to participate or start auctions in the online auction site. 
  • A user can create a new item category to be auctioned in the site or else he can search ongoing auctions on the item and participate in one or more of these auctions simultaneously. 
  • Upon participating in auction he/she can place the bids.
  • He/she can come out of the auction at any time.
  • If he wins the auction by placing the highest bid, he has to pay the bid price to the payment sub system
  • If he is the owner of the auction which was complete with a winner, he should send the items to the delivery sub system.
Based on the above description the main components of the system would be
User -> can act as bidder/seller
Item -> Things which are sold and bought in the system
Auction -> Process in which seller wants to sell the item
Bid -> users quotes for the item being sold
Auctioneer -> one who oversees the process of start, stop and conducts the whole process
PaymentHandler -> component which accepts the payments from winning bidder and transfers the payment to the seller


Based on the above description this is the class diagram of the system:



6 comments:

  1. i didn't really get it
    is this system built like an auction is only one lot? where is some queue of auction lots?
    how does user creates auction if it might be done by auctionController?
    what does declareWinner() do? it should go back to auctionController but how?

    ReplyDelete
  2. Auction will be an observable for which multiple users will be observers .. Any change in best bid value for auction will be notified directly

    AuctionController will have map all such auctions currently running.

    User can see these auction and register for a particular auctionid via AuctionController

    Auction will also have a timer running which will trigger AuctionController's stopAuction().

    ReplyDelete
  3. roles of AuctionController:
    1. create auctions
    2. for user: register to auctions,search/browse auctions
    3. stores map to all auctions [maintains status].

    Auctioner roles:
    1. notify registered users for bid updates
    2. places bids from users via Controller and update best bid for Auction if in case
    3. maintain timing(start-stop) of Auction.
    4. notifies auctionController when auction stop
    5. Payments

    ReplyDelete
  4. Very nice, Are there any pattern based designs,on usage of interfaces?

    ReplyDelete
  5. I would have liked you to talk about:
    What are the clear Goals of the System you want to achieve
    What would be the Services and APIs of each of them
    The DB Schema
    a. Algorithm to rank the highest bidders
    b. Identify various uses cases that might bring Issues
    Propose alternate solutions and their trade-offs
    Data Structures to use in each of those solution(if any)
    c. Communication flow of the system
    along with a Component Diagram
    d. Concurrency use cases and their handling
    ...may more
    I hope you can make it as I liked your initial write-ups

    ReplyDelete
  6. Civil Lab Equipment Manufacturer offer a comprehensive range of oil and petroleum testing lab equipments, which are widely used in Schools, Colleges and

    Universities. We offer a wide range of Civil Engineering Lab Equipments Manufacturers and Civil Engineering Lab Equipments Exporters in India.

    Website : http://civillabequipmentmanufacturer.com, http://www.setestindia.com


    Mob: +91-9891445495, +91-8448366515, +91-8587026175

    ReplyDelete