Any tasks in progress (notably: fetching new topic content, distributing that content to subscribers, or confirming pending verifications) are doled out and managed by a cooperative advisory locking mechanism. The task queue is wrangled in the database within the `*_in_progress` tables.
+![Entity relationship diagram for Postgres engine](./documentation/media/postgres-er.svg)
+
A Hub node will periodically check for more tasks to perform, executing them up to a set concurrency limit.
### Quirks
- *.js - environment specific values, edit these as needed
- server.js - launches the application server
- src/
- - authenticator.js - interact with credentials and validation mechanisms
- common.js - utility functions
- communication.js - outgoing requests and associated logic
- db/
- enum.js - invariants
- errors.js - local Error types
- link-helper.js - processes Link headers
- - logger.js - a very simple logging class
+ - logger/ - adds service-specific data filters to our logging module
- manager.js - process incoming requests
- service.js - defines incoming endpoints, linking the API server framework to the manager methods
- - session-manager.js - process login/logout requests
- template/ - HTML content
- worker.js - maintains a pool of tasks in progress, for sending out updates, performing verifications, et cetera
- static/ - static assets