home OpenMash Documentations
Class Index Method Index Class Hierarchy

TCL CLASS

ASCP/Manager

SUPERCLASSES

ASCP

MEMBERS

tid_, launched_

tid_

An array of timers indexed by service instance.

launched_

An array of services launched, indexed by service instance.

METHODS

process_packet, kill_dup_hm, handle_request, handle_launch, sched_offer_service, is_pending, cancel_timer, sched_launch, suppress_timer, pending_launches, offer_service, launch, check_precond, init, agent_type, register, unregister, announce_offer, announce_launch_ok, announce_alive, get_num_of_hms, hmaddrs, error, exec

process_packet

ASCP/Manager instproc process_packet { addr packet }

Process a message from other alm. If we get a client message, we schedule a launch if current cpu load is less than a threshold. If we get a launch message from another hm, we cancel our scheduled launch. If we get an update message from another hm from the same host, we kill one of the hm. Ignore server messages.

kill_dup_hm

ASCP/Manager instproc kill_dup_hm { name }

Kill self if pid is less than the other (duplicated) hm.

handle_request

ASCP/Manager instproc handle_request { srv_name srv_loc srv_inst curr_time {msg \" \" } }

Checks if another service for this client is running, if not schedule a launch.

handle_launch

ASCP/Manager instproc handle_launch { srv_name srv_loc srv_inst curr_time args }

Checks if another service for this client is running, if not schedule a launch.

sched_offer_service

ASCP/Manager public sched_offer_service { srv_name srv_loc srv_inst msg }

Schedule an offer announcement.

is_pending

ASCP/Manager instproc is_pending { tid }

Check if there is a timer with id == $tid pending.

tid

ID of the timer to check.

cancel_timer

ASCP/Manager instproc cancel_timer { tid }

Remove the "after" callback and information regarding a scheduled launched identified by $tid.

tid

ID of the timer to cancel.

sched_launch

ASCP/Manager public sched_launch { srv_name srv_loc srv_inst msg }

Schedule a launch by creating an "after" callback. The timeout period for launching is randomly, uniformly chosen from [0, 2000*N], where N is the estimate number of host manager currently running.

srv_inst

A unique ID to the service.

msg

Data for the service.

srv_loc

Where to find the executable of the service.

srv_name

Name of the service to launch.

suppress_timer

ASCP/Manager public suppress_timer { sid }

Cancel our own launch, because someone else has already launch the same service.

tid

ID to the service to cancel.

pending_launches

ASCP/Manager instproc pending_launches { }

Return the number of launches pending.

offer_service

ASCP/Manager private offer_service { srv_name srv_loc srv_inst msg }

Offer a service. A service is offered only if (1) the number of current pending launches is less than maximum allowable pending launches (configurable through maxPending), (2) current CPU load is less than maximum allowable CPU load (configurable through highLoad). This method is an "after" callback scheduled by sched_offer_service {} method.

srv_name

Name of the service to launch.

srv_inst

?

srv_loc

Location of the service's executable.

msg

?

launch

ASCP/Manager private launch { srv_type srv_loc srv_inst arguments }

Launch a service. A service is launch only if (1) the number of current pending launches is less than maximum allowable pending launches (configurable through maxPending), (2) current CPU load is less than maximum allowable CPU load (configurable through highLoad). This method is an "after" callback scheduled by schedule_launch {} method.

srv_name

Name of the service to launch.

srv_loc

Location of the service's executable.

srv_inst

?

msg

?

check_precond

ASCP/Manager instproc check_precond { precond }

init

ASCP/Manager instproc init { spec bw }

agent_type

ASCP/Manager instproc agent_type { }

register

ASCP/Manager instproc register { addr packet }

unregister

ASCP/Manager instproc unregister { addr packet }

announce_offer

ASCP/Manager instproc announce_offer { service_instance }

announce_launch_ok

ASCP/Manager instproc announce_launch_ok { service_instance }

announce_alive

ASCP/Manager instproc announce_alive { }

get_num_of_hms

ASCP/Manager public get_num_of_hms { }

hmaddrs

ASCP/Manager private hmaddrs { }

error

ASCP/Manager instproc error { msg }

exec

ASCP/Manager instproc exec { script service_instance arguments }

INHERITED METHODS

destroy, version, send_announcement, bye, agent_id, args, ssg_port, service_location, service_type, service_instance, recv_announcement, del_agent, bandwidth, as_args, control_port, add_timer, del_timer, timers, start, stop, announce, recv, timer, get_timer, set_announcement, get_announcement, ttl

INHERITED MEMBERS

lastann_, avgdelta_

FILENAME

tcl/indiva/lib/ascp-manager.tcl


Generated on Mon Apr 12 04:04:16 PDT 2004