About the connection workflow

This section describes what happens under the hood in order to connect the components to each other and establish a PureWeb session.

There are two basic paths: one for managed services and one for unmanaged services. The main difference resides in which entity is responsible for starting and stopping the service application.

Managed services are the most common; in that scenario, the service application and the PureWeb server reside on the same node. You must connect your service as unmanaged if you want to deploy it on a different node from the PureWeb server.

Unmanaged services are not currently supported in Java.


Managed services

In a managed service, the PureWeb server automatically manages the application/process life cycle, starting and stopping the service based on when a client connects and disconnects.

Here is the basic workflow:

  • When launched, the client first requests a session from the server.
  • The server responds by launching the service.
  • The service, on startup, connects to the server and establishes the session.
  • The client code is sent to the end user's browser (if the client is browser-based).

  • The client connects to the established session.
  • When the client disconnects, the PureWeb server stops the service.

The diagram below illustrates this workflow for an HTML5 client.



Unmanaged services

In an unmanaged service, you control the application/process life cycle outside of PureWeb. The basic workflow is as follows:

  • An external entity (the end user, or another process or application) launches the service application first, outside of PureWeb.
  • The service, on startup, connects to the PureWeb server and establishes the session. At this point, the service is recognized by the server as a queued unmanaged application.
  • The client connects to the established session.
  • When the client disconnects, the service keeps running, until explicitly stopped by an external entity outside of PureWeb.