• Publicity: Public Only All

cluster-procs.tcl

This file defines the following Objects and Classes: ::acs::Cluster[i], ::acs::cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i], ::acs::Cluster[i]

Location:
packages/acs-tcl/tcl/cluster-procs.tcl

Procedures in this file

Detailed information

Class ::acs::Cluster (public)

 ::nx::Class ::acs::Cluster[i]

Class for managing a cluster of OpenACS nodes

Testcases:
No testcase defined.

acs::Cluster method broadcast (public)

 <instance of acs::Cluster[i]> 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[i]> 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[i]> 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[i]> 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[i]> 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[i]> 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[i]> 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[i]> 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[i]> 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[i]> 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[i]> 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[i]> 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[i]> 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[i]> 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[i]> 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[i]> 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[i]> 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[i]> 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[i]> 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[i]> 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[i]> 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.
[ show source ]