Documentation
¶
Overview ¶
Package govlab is GovLab, a government services portal: exam results looked up by roll number and date of birth with downloadable PDF marksheets, notices, and an online application (sign-in by one-time code, a form in sections, document upload, submission with an acknowledgement number and a PDF receipt) with a deadline. It is the reference app for the government pack.
Every query goes through a database pool of ten connections, as a portal's does; a query holds a connection for as long as it runs.
Planted bottlenecks (see README.md), each switched off by a fix flag:
- index: results are found by scanning all 100,000 rows (200ns a row, 20ms a lookup) while holding a pool connection, so on results day the pool runs out (fix "index" looks the roll number up).
- pdf: every marksheet and receipt compresses the 400 KB letterhead image again (fix "pdf" compresses it once and reuses the bytes).
- lock: every application save takes one portal-wide lock and writes the whole application and an audit entry (2ms) before letting go, so on deadline day saves run one at a time (fix "lock" locks only the application being saved).
Index ¶
Constants ¶
View Source
const ( // Candidates is how many exam results GovLab holds; roll numbers run // from FirstRoll upward. Candidates = 100_000 // FirstRoll is the first roll number. FirstRoll = 26_000_001 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.