Application Server - crazedsanity/webcron GitHub Wiki
What is the Application Server?
This is the web-based interface that users view. New scheduled jobs are created here: single-run apps (including "right now" runs); and schedules that have a set (or unlimited) number of runs. Running processes can be monitored in near real-time and canceled in the same fashion.
The main elements are:
- the user interface (the actual HTML page that users view and interact with)
- the API (the URL scheme that daemons and other programs use to get information, make changes, etc)
The User Interface (UI)
TODO: finish this section.
The API
TODO: finish this section.
The API is an HTTP/HTTPS based URL scheme that daemons (and possibly other programs) use to interact with the application server. An API URL is in the form of https://webcron.cs.local/api/(key)/(action)
; examples from here on will use only the absolute path, without the hostname, and (key)
would actually have a hash that uniquely references that daemon, e.g. /api/0f00d5f361296b0dec489678a66e043b27f4f3fa/updates
.
Some examples:
(POST) /api/(key)/updates
: daemons will POST multiple messages here. Includes newly-spawned processes, existing running processes, and ended processes.(GET) /api/(key)/updates
: daemons will constantly connect here to receive changes. An immediate reconnect (limited to once/second) will occur upon disconnect.(POST) /api/new/register
: daemons will post information here for auto-registration (TODO); the registration value returned will be used for future messages(GET) /api/new/register
: daemons will request this page in the event that they did not receive an API key from the original POST. This should probably never happen...?