I am creating a penny auction site using PHP yii framework. The main consideration of the system is to update the database records of all active auctions (max 15 auctions) with the current ticker timer.
I am seeking for advice on how I should design the system where every auction item will have its own countdown timer stored in the database. When someone bids the auction item, the counter should reset to 2 min. All users who are connected to the system should see the same countdown timer for that particular auction.
I am little confused on how I should design the system. Will there be a performance issue if there are frequent updates to the database (Mysql)? If there are 15 active auctions, and they are updated every second, the countdown timer decreases by a second in the database table for the particular auction.
My first idea for the underlying schema, for a table called auction_lots
:
Auction_id,startdatetime,counter_timer,status
I am seeking for advice on how I should design this.