Pervasive computing flow

The following diagram describes how the same request functions for a request from a pervasive computing mobile device (such as a cellular phone) and from a computer's browser. The flow is the same for both, however, the JSP file displayed is specific to each device:

Typical flow for HCL Commerce pervasive computing. Descriptions of each stage of the flow are provided below the diagram.

The diagram illustrates the following:

  1. A request servlet receives a request, such as displaying a product information, from either a cellular phone or a computer's browser over the Internet.
  2. The request servlet passes the request to a device manager.
  3. The device manager determines which adapter would best process the request, and passes the request to the appropriate adapter. For example, if the request is from a cellular phone, the device manager selects the pervasive computing (PvC) adapter. If the request is from a browser from a computer, the device manager selects the browser adapter.
  4. To alleviate applications from having to handle system functions, such as access control and authentication, requests from any device are first processed by the HCL Commerce Web controller. The adapter (either PvC or browser) creates a session context and a controller request object, and passes the controller request object to the Web controller. The controller request object contains a set of properties, formatted by the adapter. It also contains a backward reference to the adapter object and a reference to the session context object created by the adapter.
  5. The Web controller executes the request by invoking the corresponding controller command. All business logic is implemented in the controller command.
  6. Based on the view name returned from the controller command and the unique device identifier specified in the adapter, the Web controller retrieves the appropriate view entry from the Struts configuration files.
  7. The Web controller invokes the view defined in the view entry. The view returns the appropriate JSP file to the requesting device. For example, if the request is to display a product information from a cellular phone, the view may send a JSP file with a monochrome thumbnail image of the product to the phone's screen. If the request is to display a product information from a computer's browser, the view may send a JSP file with a larger, full-color image of the product to be viewed through the computer's monitor.