Open sandywadhwa opened 4 years ago
That's a great idea @sandywadhwa :) Would be the biggest change in terms of code to get this up and running, not sure if can be picked right away.
This can be done in backward compatible way with low cost of code churn or codebreak (by having redundant data for some time).
This should reduce cost of changes and any regressions. While providing flexibility to anytime switch back to old code paths.
Yep, that's the release plan if going with it - the issue is urgency/bandwidth not feasibility. Feel free to raise a PR :)
Current Database design has two blockers for site extensibility.
CURRENT DESIGN user codeforces_handle codeforces_lr codechec_handle codeforces_lr spoj_handle spoj_lr ......
PROPOSED DESIGN Add a new table
coding_profiles user_id : (reference field to user table) site_name: (string: one of -- CODEFORCES, CODECHEF, SPOJ, ...) site_handle: user's handle of site last_retrieved: DateTime of last retrieval
This will allow adding new sites support easy and elegant and allows a user to add his multiple handles into his single account.
Lastly, this also allows allows LOSE COUPLING between crawlers and user table or sites. e.g. a Crawler can be written to just fetch one site specific handles and crawl just for that rather than crawling for all user handles of a single user at once.