Amazon DQ Price Tracking Website
Current popular Amazon price tracking systems are:
Amazon Standard Identification Number (ASIN)
1. Price tracking infrastructure - PULL MODEL: more like a web scraping tool which can monitor prices of various item urls online
Bots to crawl websites looking for templated information
(or) More web scraping techniques looking for specific html tags of prices can also be employed.
(or) Subscription to RSS Feeds to indicate price changes
PUSH MODEL: Where Amazon provides an event on price changes which the clients can subscribe to.
This guarantees that an infrastructure to notify the server when prices change is available.
Architecture: Real time distributed system which runs web scraper on different target websites on a time-to-time basis.
2. Notification infrastructure - on a price of a given item changing, the server needs to update its database on price it has previously recorded for the specific item. If the current price of the item falls below a target price given by any user, the user needs to be sent an email alert.
Two APIs need to be published.
UpdateItemPrice(ASIN, Price) - updates database of the price change
NotifyUsers(EmailID); - collects the list of users who qualify for an alert due to the price change mentioned.
SQL databases are sufficient as the data is fairly structured.
ItemDB - {ASIN/ ItemID, Price, DateUpdated} - Every time a price changes, this table gets an entry. Keeps entries for the last N days for search and keeps others for archival.
UserDB { UserID, Email ID} - alerting mechanism if user-to-email requires a unique relationship
AlertDB{UserID, ItemID, TargetPrice}
When there is a UpdateItemPrice API called, ItemDB gets updated. It further collects a list of users who qualify for alert - by scanning through AlertDB for given ItemURL and TargetPrice > current price. For each candidate user, gets email id from UserDB, notifies them using NotifyUsers.
Distributed SQL DBs which stores user records of a specific IP Domain
Backup servers to regularly update the last reads and writes
Cache on servers at transaction log level - log first model on update prices information - which can recreate the list of transactions in case the server goes down suddenly.
Other features / analytics:
Trends of item prices of a specific group for the last N days
Item Recommendations based on user features to track different set of items which match the item which is tracked by the user and based on what similar users are tracking. - Collaborative Filtering + Content Based Systems.
http://www.techlicious.com/tip/these-4-price-trackers-could-save-you-a-fortune/
http://www.makeuseof.com/tag/3-amazon-price-watch-trackers-bargain-hunter/
To understand the polling / push model architecture better on price tracking, I have put up a question in Quora:
https://www.quora.com/What-infrastructure-real-time-or-distributed-infrastructure-do-price-tracking-systems-have-eg-tracktor-com-Amazon-price-tracker-system?__snids__=1401983277&__nsrc__=2