tarun_bathwal1

Tarun Bathwal

Real Time Bidding App

https://github.com/tarun-bathwal/Real-Time-Bidding-App

This was my first major Node.js project. It was a project made in group of 2. The app works as an online platform to sell any items through the medium of bidding. It allows a seller to upload the product up for sale. The seller may upload the name, image, starting bidding price, additional details etc. Once every night at 9pm, the bidding begins. Anyone who signs up to purchase item, may bid for the product. Products come into the auction only once and do not repeat. Each product, when it comes upon to the auction table, gets a viewing time of 2minutes, wherein the buyers can view product, see its images, description and initial betting price. At the end of stipulated 2minutes, the bidding for that product starts. If no one bids for 10 seconds after the latest bid, then the product is sold to the latest bidder who obviously had bid the highest price i.e. with every new bid, the timer is restarted with limit of 10 seconds. The current version of this app allows a multiplier of 2 by default on bidding but does not allow the bidder to enter manual bid i.e. every time someone bids, the new bid is two times the previous bid made for the product. Once one product goes through the bidding process, it may remain sold or unsold and then the next product comes into the auction automatically. By the end of the night, all products will have had gone through the auction only once.

While building this app, i faced certain issues most pertaining of which was how to handle everything in real time i.e, for every buyer who has logged in to be at the same instant where every other buyer is. Since this is auction, every buyer has to be in the same moment, where if some items current bid is going on at say Rs 2,000 and there are 4 seconds left for a bid to be made ( if any ) then for every buyer it should appear that the current bid for this product is going on at Rs 2,000 and that only 4 seconds are left before the product is sold if no further bid is made. The other primary concern was to make sure that concurrent bids made at the very same moment were handled correctly and consecutive bids made within very very small time frame be handled so that the bid price is multiplied only once and the second bid is not considered. The third concern was to make sure that the auction begins only at 9pm everyday and not before that.

The solution to real time came up in the form of sockets in node.js. Socket.io serves this purpose. But to integrate it as per the functionality we needed , required some programming efforts to make sure concurrency and delay problems were dealt with. To let the auction begin every night at 9pm, cronjob was used. ‘Cron’ serves this purpose in Node.js. ‘Sleep’, a node package, served the purpose of not allowing any bid to take place during the 2 minute period allotted to view the new product.

Projects

A decentralised KYC system using blockchain based smart contracts

We aim to divide costs, allow hassle-free verification and transparent process of KYC. KYC needs to be performed only once and then can be shared among institutions, thus saving repeated work.IPFS, Infura

Skills

PHP
Solidity
JavaScript
Node.js
C++
HTML
CSS
MySQL
MongoDB

Experience

  • Apptech Interactive