![]() |
OpenMash Documentations | Class Index | Method Index | Class Hierarchy |
TCL CLASS
ASCP/Manager
An array of timers indexed by service instance.
An array of services launched, indexed by service instance.
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
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.
ASCP/Manager instproc kill_dup_hm { name }
Kill self if pid is less than the other (duplicated) hm.
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.
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.
ASCP/Manager public sched_offer_service { srv_name srv_loc srv_inst msg }
Schedule an offer announcement.
ASCP/Manager instproc is_pending { tid }
Check if there is a timer with id == $tid pending.
tid
ID of the timer to check.
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.
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.
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.
ASCP/Manager instproc pending_launches { }
Return the number of launches pending.
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
?
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
?
ASCP/Manager instproc check_precond { precond }
ASCP/Manager instproc init { spec bw }
ASCP/Manager instproc agent_type { }
ASCP/Manager instproc register { addr packet }
ASCP/Manager instproc unregister { addr packet }
ASCP/Manager instproc announce_offer { service_instance }
ASCP/Manager instproc announce_launch_ok { service_instance }
ASCP/Manager instproc announce_alive { }
ASCP/Manager public get_num_of_hms { }
ASCP/Manager private hmaddrs { }
ASCP/Manager instproc error { msg }
ASCP/Manager instproc exec { script service_instance arguments }
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
tcl/indiva/lib/ascp-manager.tcl
Generated on Mon Apr 12 04:04:16 PDT 2004