# Lifecycle
# Kernel Lifecycle
The module lifecycle is designed so that kernel module functionality and classpaths become available at the very earliest opportunity. The lifecycle is as follows:
- Kernel Start
- Kernel Filesystem is created
droplet://kernel/modules.list
is read, producing list of existing kernel modules- Kernel classloader is created as the combination of all kernel modules
- Kernel loads all existing modules (initially none), sorted by
order
- Plugin set is loaded
# Component Lifecycle
Some components in the Sunshower.io Kernel manage operations in phases, which allows for extensibility, traceability, and simplicity.
For instance, consider the DefaultModuleManager
. A user or process provides an
installation request, at which the following phases are executed:
- The ModuleDownloadPhase downloads the module to the Kernel temporary storage folder and dispatches the following events
- DownloadStarted
- DownloadProgressed
- DownloadComplete
- The ModuleUnpackPhase