- Publicity: Public Only All
cluster-procs.tcl
This file defines the following Objects and Classes: ::acs::Cluster, ::acs::cluster
- Location:
- packages/acs-tcl/tcl/cluster-procs.tcl
Procedures in this file
- Class ::acs::Cluster (public)
- Object ::acs::cluster (public)
- acs::Cluster instproc broadcast (public)
- acs::Cluster instproc check_state (public)
- acs::Cluster instproc current_server_is_canonical_server (public)
- acs::Cluster instproc current_server_is_dynamic_cluster_peer (public)
- acs::Cluster instproc disconnect_request (public)
- acs::Cluster instproc dynamic_cluster_nodes (public)
- acs::Cluster instproc dynamic_cluster_reconfigure (public)
- acs::Cluster instproc incoming_request (public)
- acs::Cluster instproc is_canonical_server (public)
- acs::Cluster instproc join_request (public)
- acs::Cluster instproc last_contact (public)
- acs::Cluster instproc last_request (public)
- acs::Cluster instproc preauth (public)
- acs::Cluster instproc qualified_location (public)
- acs::Cluster instproc register_nodes (public)
- acs::Cluster instproc secret_configured (public)
- acs::Cluster instproc send (public)
- acs::Cluster instproc send_disconnect_request_to_canonical_server (public)
- acs::Cluster instproc send_join_request_to_canonical_server (public)
- acs::Cluster instproc setup (public)
- acs::Cluster instproc update_node_info (public)
Detailed information
Class ::acs::Cluster (public)
::nx::Class ::acs::Cluster
Class for managing a cluster of OpenACS nodes
- Testcases:
- No testcase defined.
Object ::acs::cluster (public)
::acs::Cluster ::acs::cluster
Configured cluster object, keeping the state of the cluster configuration. The interaction with the cluster is performed over this object.
- See Also:
- Class ::acs:Cluster
- ::acs::cluster send_join_request_to_canonical_server
- ::acs::cluster join_request /peerLocation/
- ::acs::cluster setup
- ::acs::cluster preauth ?/arg .../?
- ::acs::cluster is_canonical_server /location/
- ::acs::cluster current_server_is_canonical_server
- ::acs::cluster send ?-delivery /value/? /location/ ?/arg .../?
- ::acs::cluster secret_configured
- ::acs::cluster last_request /location/
- ::acs::cluster incoming_request
- ::acs::cluster dynamic_cluster_nodes
- ::acs::cluster send_disconnect_request_to_canonical_server
- ::acs::cluster disconnect_request /peerLocation/
- ::acs::cluster update_node_info
- ::acs::cluster broadcast ?/arg .../?
- ::acs::cluster qualified_location /location/
- ::acs::cluster current_server_is_dynamic_cluster_peer
- ::acs::cluster register_nodes ?-startup?
- messageC
- ::acs::cluster check_state
- ::acs::cluster dynamic_cluster_reconfigure /operation/ /qualifiedLocation/
- ::acs::cluster last_contact /location/
- Testcases:
- No testcase defined.
acs::Cluster method broadcast (public)
<instance of acs::Cluster> broadcast args [ args... ]
Send requests to all cluster peers.
- Parameters:
- args (required)
- Testcases:
- No testcase defined.
acs::Cluster method check_state (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.
acs::Cluster method current_server_is_canonical_server (public)
<instance of acs::Cluster> current_server_is_canonical_server
Check, if the current server is the canonical_server.
- Testcases:
- No testcase defined.
acs::Cluster method current_server_is_dynamic_cluster_peer (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.
acs::Cluster method disconnect_request (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.
acs::Cluster method dynamic_cluster_nodes (public)
<instance of acs::Cluster> dynamic_cluster_nodes
Convenience function returning the list of dynamic cluster nodes.
- Testcases:
- No testcase defined.
acs::Cluster method dynamic_cluster_reconfigure (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.
acs::Cluster method incoming_request (public)
<instance of acs::Cluster> incoming_request
We received an incoming request from a cluster peer.
- Testcases:
- No testcase defined.
acs::Cluster method is_canonical_server (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.
acs::Cluster method join_request (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.
acs::Cluster method last_contact (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.
acs::Cluster method last_request (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.
acs::Cluster method preauth (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.
acs::Cluster method qualified_location (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.
acs::Cluster method register_nodes (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.
acs::Cluster method secret_configured (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.
acs::Cluster method send (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.
acs::Cluster method send_disconnect_request_to_canonical_server (public)
<instance of acs::Cluster> send_disconnect_request_to_canonical_server
Send a disconnect request to the canonical server.
- Testcases:
- No testcase defined.
acs::Cluster method send_join_request_to_canonical_server (public)
<instance of acs::Cluster> send_join_request_to_canonical_server
Send a join request to the canonical server.
- Testcases:
- No testcase defined.
acs::Cluster method setup (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.
acs::Cluster method update_node_info (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.