aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* iadocs: Update IA documentationRunxi Yu11 days10-44/+279
|
* docs: max-width: 50rem;Runxi Yu11 days1-1/+1
|
* docs/admin: Document database setupRunxi Yu11 days1-1/+10
|
* docs/admin: Update protocol informationRunxi Yu11 days1-3/+2
|
* iadocs: Cover page updateRunxi Yu11 days1-5/+5
|
* {,u}sem.go, ws*.go: Restructure filesRunxi Yu11 days5-235/+319
|
* {config,main}.go: Enhance configuration file processingRunxi Yu11 days2-8/+124
| | | | Implements: https://todo.sr.ht/~runxiyu/cca/5
* bench.go: ReformatRunxi Yu11 days1-2/+2
|
* bench.go: Separate connection stage from selection stagev0.1.3Runxi Yu11 days1-2/+10
|
* bench.go: More realistic benchmark for one course onlyRunxi Yu11 days1-9/+18
|
* Makefile: BSD Make also supports wildcards in targetsRunxi Yu12 days1-1/+1
|
* Makefile: Add sem.go to source file listRunxi Yu12 days1-1/+1
|
* {config,ws}.go, cca.scfg.example: Add perf.course_update_intervalRunxi Yu12 days3-6/+14
| | | | | | This causes a drastic increase in performance. References: https://todo.sr.ht/~runxiyu/cca/7
* {courses,wsm}.go: Use in-memory structure to fetch cgroup, not SQLRunxi Yu12 days2-26/+18
|
* {config,ws}.go, cca.scfg.example: Remove chanPool/SendQRunxi Yu12 days3-59/+0
|
* ws.go: &usemT{} //exhaustruct:ignoreRunxi Yu12 days1-1/+1
|
* ws.go: Check error of populateUserCourseGroupsRunxi Yu12 days1-1/+4
|
* wsm.go: Omit comparison to bool constantRunxi Yu12 days1-1/+1
|
* wsm.go: Report error when course doesn't existRunxi Yu11 days1-0/+8
| | | | | Luckily we encounter a database error before we have the chance to dereference a null pointer. But it's still good practice to check.
* {courses,sem,ws,wsm}.go: Second step towards an efficient state propagatorRunxi Yu11 days4-16/+24
| | | | References: https://todo.sr.ht/~runxiyu/cca/7
* {courses,sem,ws}.go: First step towards an efficient state propagatorRunxi Yu11 days3-6/+110
| | | | References: https://todo.sr.ht/~runxiyu/cca/7
* go.sum: go mod tidy (removing old checksums)Runxi Yu11 days1-6/+0
|
* ws.go: Index chanPool by userID, rather than session cookieRunxi Yu11 days1-5/+2
|
* {main,utils,ws}.go: Initialize cancelPool directly tooRunxi Yu11 days3-25/+1
|
* Bump dependenciesRunxi Yu11 days2-3/+9
|
* {main,ws}.go: Initialize chanPool directly instead of setupChanPool()Runxi Yu11 days2-22/+1
| | | | | | It is possible to use var chanPool = make(map[string](*chan string)) directly during declaration, even if it's a global variable. There is no need to call a function to initialize it.
* courses.go: ReformatRunxi Yu11 days1-1/+1
|
* {courses,wsm}.go: Add getCourseByIDRunxi Yu11 days2-10/+8
| | | | This also deduplicates some code.
* {courses,wsm}.go: Add (*courseT).decrementSelectedAndPropagateRunxi Yu11 days2-24/+15
| | | | This is being done quite a few times, so let's make it a function.
* {courses,ws,wsm}.go: Update userCourseGroups during choose/unchooseRunxi Yu11 days3-12/+51
|
* config.go: Emit warning when fake auth is enabledRunxi Yu11 days1-0/+2
|
* bench.go: Don't close request bodyRunxi Yu11 days1-6/+0
| | | | | | The WebSocket library closes it for us (which is not behavior that I like, but fine). Closing it again causes segmentation faults as Body becomes a null pointer or something like that.
* {courses,ws}.go: Populate userCourseGroups in a separate functionRunxi Yu11 days2-32/+35
|
* {courses,ws}.go: Populate userCourseGroups for each connectionRunxi Yu12 days2-5/+63
| | | | | | | | | | | | | | | | | | It is way too expensive to query the database every time we need to check whether a user has chosen a course in a group. Since we can (hopefully) guarantee that there is only one usable connection for any given moment and user, we could store this data along with the connection as a local variable in handleConn, which would be eligible for garbage collection when handleConn exits. Here we create the data structures that globally represent courseTypes and courseGroups, and during the initial stages of handleConn, perform database queries to populate userCourseGroups with the groups that the user has already chosen. Note that the HELLO command handler does similar database queries, and as per the TODO listed in the comments, should be moved up here for efficiency. (HELLO also serves as some sort of an initial connection check; this should probably be replaced with WebSocket's native pings.)
* courses.go, schema.sql: Validate course{Type,Group} in server, not SQLRunxi Yu12 days4-30/+45
|
* *.sql: New schema with ctypes and cgroupsRunxi Yu12 days3-18/+39
|
* drop.sql: New SQL script to drop all tablesRunxi Yu12 days1-0/+3
|
* auth.go: Improve display of OAuth 2.0 errorsRunxi Yu12 days1-4/+17
| | | | Implements: https://todo.sr.ht/~runxiyu/cca/9
* config.go: Return errors instead of panicing on auth.fake issuesRunxi Yu12 days1-3/+11
|
* {config,main}.go, cca.scfg.example: Settable static pathRunxi Yu12 days3-13/+8
| | | | | | | | | Because of the poor performance of using NGINX as a reverse proxy, I've added native TLS in commit 4a1a7af76408e956ebc343bf28960fdd00c00c58. Serving static files was already supported, but it was expected that people use a static web server to do so, so we didn't support a configurable static path. Now since reverse proxy setups are discouraged, it makes more sense to be better at serving static files.
* staff.html: Initial staff pageRunxi Yu12 days1-0/+149
| | | | | It's currently a copy of the student page with a few words changed and no checkboxes
* student.html, *.js: {main->student}.jsRunxi Yu12 days2-1/+1
|
* student.html: {{ .user.Name }} instead of Home in titleRunxi Yu12 days1-1/+1
|
* bench.go, main.js: Use an HTTPS URLRunxi Yu12 days2-2/+2
| | | | | This URL should be configurable in the JS at least, but I'm not sure how I should be filling out JS templates. I'll leave it hardcoded for now.
* {config,main}.go, cca.scfg.example: Support TLSRunxi Yu12 days3-8/+65
|
* main.go, cca.scfg.example: Remove FastCGI supportRunxi Yu12 days2-9/+5
| | | | | | I would love to serve FastCGI but it is a huge pain to get WebSocket working, at least with NGINX. I don't think OpenBSD httpd would be better at this either.
* bench.go: Use more realistic connection numbers for nowRunxi Yu12 days1-4/+4
|
* postgres_shell.sh: Delete as unnecessaryRunxi Yu13 days1-3/+0
| | | | Just use "psql cca"
* bench: Add a bit more stress (30000 connections, 30s wait)v0.1.2Runxi Yu13 days1-2/+2
|
* README.md, iadocs/{cover*, crita*}: Update documentationRunxi Yu13 days3-39/+67
|