- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::acs::Cluster
::acs::ClusterClass for managing a cluster of OpenACS nodescreate ... \
[ -allowed_command (default " set "" unset "" nsv_set "" nsv_unset "" nsv_incr "" nsv_dict "" bgdelivery "" callback "" ns_cache "^ns_cache\s+eval" ns_cache_flush "" util_memoize_flush_regexp_local "" ns_urlspace "" acs::cache_flush_all "" acs::cache_flush_pattern "" lang::message::cache "" ad_parameter_cache_flush_dict "" ::acs::cluster "^::acs::cluster\s+join_request" ::acs::cluster "^::acs::cluster\s+disconnect_request" ") ] \
[ -allowed_host (default " "127.0.0.1" 1 ") ] \
[ -myLocation (default "") ] \
[ -url (default "/acs-cluster-do") ]
Defined in packages/acs-tcl/tcl/cluster-procs.tcl
Class Relations
Methods (to be applied on instances)
broadcast (scripted, public)
<instance of acs::Cluster> broadcast args [ args... ]
Send requests to all cluster peers.
- Parameters:
- args (required)
- Testcases:
- No testcase defined.
check_state (scripted, public)
<instance of acs::Cluster> check_state
Check the livelyness of the dynamic cluster nodes. This method is intended to be run on the canonical server only, since it might update the DynamicClusterPeers via acs::clusterwide.
- Testcases:
- No testcase defined.
current_server_is_canonical_server (scripted, public)
<instance of acs::Cluster> current_server_is_canonical_server
Check, if the current server is the canonical_server.
- Testcases:
- No testcase defined.
current_server_is_dynamic_cluster_peer (scripted, public)
<instance of acs::Cluster> current_server_is_dynamic_cluster_peer
We are a dynamic cluster peer, when we are not the canonical server neither isted in the static server locations.
- Testcases:
- No testcase defined.
disconnect_request (scripted, public)
<instance of acs::Cluster> disconnect_request peerLocation
Server received a request to disconnect $peerLocation from dynamic cluster nodes.
- Parameters:
- peerLocation (required)
- Testcases:
- No testcase defined.
dynamic_cluster_nodes (scripted, public)
<instance of acs::Cluster> dynamic_cluster_nodes
Convenience function returning the list of dynamic cluster nodes.
- Testcases:
- No testcase defined.
dynamic_cluster_reconfigure (scripted, public)
<instance of acs::Cluster> dynamic_cluster_reconfigure operation \ qualifiedLocation
Reconfigure the cluster via "join" or "disconnect" operation, when running on the canonical server. The result of the reconfiguration is a changed list of DynamicClusterPeers. The method returns a boolean value indicating success.
- Parameters:
- operation (required)
- qualifiedLocation (required)
- Testcases:
- No testcase defined.
incoming_request (scripted, public)
<instance of acs::Cluster> incoming_request
We received an incoming request from a cluster peer.
- Testcases:
- No testcase defined.
is_canonical_server (scripted, public)
<instance of acs::Cluster> is_canonical_server location
Check, if provided location belongs to the canonical server specs. The canonical server might listen on multiple protocols, IP addresses and ports.
- Parameters:
- location (required)
- Testcases:
- No testcase defined.
join_request (scripted, public)
<instance of acs::Cluster> join_request peerLocation
Server received a request to join dynamic cluster nodes from $peerLocation. ns_log notice "Server received a join request" ns_log notice "... ns_conn host <[ns_conn host]> peer <[ns_conn peeraddr]>" ns_log notice "... ns_conn port <[ns_conn port]> peerport <[ns_conn peerport]>" ns_log notice "... peerLocation <$peerLocation> qualified [:qualified_location $peerLocation]" set headers [join [lmap {key value} [ns_set array [ns_conn headers]] {set _ "$key: $value\n... "}]] ns_log notice "... headers $headers"
- Parameters:
- peerLocation (required)
- Testcases:
- No testcase defined.
last_contact (scripted, public)
<instance of acs::Cluster> last_contact location
Return the milliseconds since the last contact with the denoted server. If there is no data available, the return values is empty.
- Parameters:
- location (required)
- Testcases:
- No testcase defined.
last_request (scripted, public)
<instance of acs::Cluster> last_request location
Return the milliseconds since the last request from the denoted server. If there is no data available, the return values is empty.
- Parameters:
- location (required)
- Testcases:
- No testcase defined.
preauth (scripted, public)
<instance of acs::Cluster> preauth args [ args... ]
Process no more pre-authorization filters for this connection (avoid running of expensive filters). ns_log notice "PREAUTH returns filter_break"
- Parameters:
- args (required)
- Testcases:
- No testcase defined.
qualified_location (scripted, public)
<instance of acs::Cluster> qualified_location location
Return a canonical representation of the provided location, where the DNS name is resolved and the protocol and port is always included. When there is no protocol provided, HTTP is assumed. Provide defaults, when no port is included in the passed-in location. Note, that there is no default provided for non-HTTP* locations, so these must contain the port.
- Parameters:
- location (required)
- Testcases:
- No testcase defined.
register_nodes (scripted, public)
<instance of acs::Cluster> register_nodes [ -startup ]
Register the defined cluster nodes by creating/recreating cluster node objects.
- Switches:
- -startup (optional, defaults to
"false"
)- Testcases:
- No testcase defined.
secret_configured (scripted, public)
<instance of acs::Cluster> secret_configured
Check, whether the secret for signing messages in the intra-cluster talk is configured. More checks for different secret definition methods might be added.
- Testcases:
- No testcase defined.
send (scripted, public)
<instance of acs::Cluster> send [ -delivery delivery ] location \ args [ args... ]
Send a command by different means to the cluster node for intra-server talk. Valid delivery methods are - ns_http (for HTTP and HTTPS) - connchan (for HTTP and HTTPS) - udp (plain UDP only)
- Switches:
- -delivery (optional, defaults to
"ns_http"
)- Parameters:
- location (required)
- args (required)
- Testcases:
- No testcase defined.
send_disconnect_request_to_canonical_server (scripted, public)
<instance of acs::Cluster> send_disconnect_request_to_canonical_server
Send a disconnect request to the canonical server.
- Testcases:
- No testcase defined.
send_join_request_to_canonical_server (scripted, public)
<instance of acs::Cluster> send_join_request_to_canonical_server
Send a join request to the canonical server.
- Testcases:
- No testcase defined.
setup (scripted, public)
<instance of acs::Cluster> setup
Setup object specific variables. Make sure to call this method, when the called procs are available. Make sure the container support is initialized
- Testcases:
- No testcase defined.
update_node_info (scripted, public)
<instance of acs::Cluster> update_node_info
Update cluster configuration when the when the configuration variables changed, or when nodes become available/unavailable after some time. Typically, this method is called via scheduled procedure every couple of seconds when clustering is enabled.
- Testcases:
- No testcase defined.
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables