When a user is starting a workspace, the following procedure is followed:

  1. Che master checks for plug-ins to start from the workspace definition.

  2. Plug-in metadata is retrieved, and the type of each plug-in is recognized.

  3. A broker is selected according to the plug-in type.

  4. The broker processes the installation and deployment of the plug-in (the installation process is different for each broker).

There are different types of plug-ins. A broker ensures all installation requirements are met for a plug-in to deploy correctly.
che theia plug in lifecycle
Figure 1. Che-Theia plug-in lifecycle

Before a Che workspace is launched, Che master starts containers for the workspace:

  1. The Che-Theia plug-in broker extracts the plug-in (from the .theia file) to get the sidecar containers that the plug-in needs.

  2. The broker sends the appropriate container informations to Che master.

  3. The broker copies the Che-Theia plug-in to a volume to have it available for the Che-Theia editor container.

  4. Che workspace master then starts all the containers of the workspace.

  5. Che-Theia is started in its own container and checks the correct folder to load the plug-ins.

Che-Theia plug-in lifecycle:

  1. When a user is opening a browser tab or window with Che-Theia, Che-Theia starts a new plug-in session (browser or remote TODO: 'what is remote in this context?'). Every Che-Theia plug-in is notified that a new session has been started (the start() function of the plug-in triggered).

  2. A Che-Theia plug-in session is running and interacting with the Che-Theia backend and frontend.

  3. When the user is closing the browser tab or there is a timeout, every plug-in is notified (the stop() function of the plug-in triggered).