Skip to content

Lifecycle/Context

The Coronium Core server works much like a regular web server.

Request

A request is sent by the client, either from the Corona plug-in or the Pages API, and then a client connection is initiated and the workload is processed by one of the built-in module APIs, or a custom server-side API.

As a developer you should make sure your server-side APIs are concise and optimized to get the response back to the client as quick as possible.

Every request takes up a server connection (and memory) until a response is returned.

Response

Once the workload has been process, the response is sent back down to the client, and the client connection is closed.

No state is kept. Once the response is sent, the server no longer has access to the client connection.

Context

There are two special cases that work outside of the request/response lifecycle; Jobs and Timers.

Both of these live in their own context that is detached from the request/response lifecycle. When using Jobs or Timers you are not able to send responses to a client, as they don't exist in this context.

Jobs run in their own service and can only be managed through the Webmin. Timers can be started during a client request, but are immeadiatly detached into their own context.