[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[hyades-dev] HCE Requirements: Service Control Agent
|
Additional details for the HCE Service
Control Agent requirement (attached).
--Victor
System Service Control Agent.
[Draft requirement]
Problem Definition
Current RAC implementation has built-in capabilities for launching a process on
a RAC hosting system. There is a set of predefined commands for
querying/setting environment variables, creating a process and receiving
notifications on process status change. On the client side this subsystem is
represented by the Appropriate Java API. In the current implementation
functionality of the execution subsystem is limited by launching a Java process
only. HCE already has a requirement for being able to launch any user process;
however this requirement doesnt cover system services. This proposal
introduces the concept of System Services Control Agent.
System Services
The concept of System Services is not universal. Services can be found in most
Windows systems, most Linux versions and on some UNIX platforms. (ToDo: find
out about i-series and z-series). System Services, unlike user processes are
not started by a user or another process, but are rather controlled by a System
Service Manager. Platforms that support services usually provide service
control API. Most common functions of service control API include:
-
Start service
-
Stop service
-
Restart service
-
Query service status
-
Query service properties
-
Set service properties
Proposed Solution
System service management implementation should extend the current Hyades
execution subsystem and will have two parts:
-
Execution API extension for service control
-
System Service Control
Agent Service Control API should provide following features:
-
System queries (enumerate services etc.)
-
Service Execution Control (Start, Stop, Restart)
-
Service status query
-
Service status change notification events
-
Service properties control
-
Service properties query
Service Control Agent should provide commands and data sets for supporting the
Service Control API (above).
Sample use case
Applications, components and HCE elements named in this use case are for
illustration only.
One of the tires of distributed system is implemented as relational database
system running as a system service on one of the network nodes. The SQL request
processor for the database is implemented in Java. One of the Hyades teams
implemented a SQL request profiler based on the Probe Kit. Probes hook SQL
related APIs and send XML data stream describing API invocations back to HCE
client(s). However, to start the dynamic probe insertion it is necessary to
restart the database service on the node of interest and instruct the JVM to
hook the class loader with probe insertion API.
Eclipse user selects profiling perspective, selects remote node, opens service
control tab, selects the SQL Broker Service from the list of services, assigns
the SQL Request Profiler Probe to it, clicks restart button, waits for the
service status to become running, opens statistical view, starts a database
application and enjoys the SQL queries per second graph.
The remote node was started with HCE service running. Opening the service
control tab is initiating a sequence of invocations into Service Control API
services = org.eclipse.hyades.execution.ServiceManager.getServiceList(node);
foreach(service in services) {
properties = service.getProperties();
if(properties.find(service_name, property) {
if(property.getValue.equals(selectedServiceName); service.restart();
}
}
|
This results in the following message interchange between Eclipse and HCE:
Eclipse->HCE
<hce:command code=start_agent target=AgentControler>
<hce:property name =AgentName value=ServiceControlAgent />
<hce:property name=user value=root/>
</hce:command>
HCE->Eclipse
<hce:response source=ServiceControlAgent>
<hce:property name=return_code value=0/>
</hce_response>
Eclipse->HCE
<hce:command code=list_services target=ServiceControlAgent>
<hce:property name=filter value=*/>
</hce:command>
HCE->Eclipse
<hce:response source=ServiceControlAgent>
<service name=Telnet process_id=123 status=stopped>
<hce:property name=user value=root/>
</service>
<service name=SQL Broker process_id=125 status=running>
<hce:property name=user value=root/>
</service>
</hce:response>
Eclipse->HCE
<hce:command code=restart_service target=AgentController>
<hce:property name=service_name value=SQL Broker/>
</hce:command>
|