This article is deprecated.
The AsyncDistributedSqlEngine method open() allows arguments to be specified in the following OpenParameters structure:
struct OpenParameters { struct NodeParams { const char *address; void *sslParameters; NodeParams() : address(0), sslParameters(0) {} }; NodeParams *nodes; int nNodes; bool localDomain; int nReplicas; DistributedSqlEngine::ReplicationType replType; int maxConnectAttempts; timer_unit connectTimeout; timer_unit readTimeout; size_t nWorkers; OpenParameters(int nNodes) : nodes(new NodeParams[nNodes]), nNodes(nNodes), localDomain(false), nReplicas(1), replType(DistributedSqlEngine::SQL_REPLICATION), maxConnectAttempts(10), connectTimeout(2*1000), readTimeout(1200*1000), nWorkers(2) {} ~OpenParameters() { delete [] nodes; } };Parameter Descriptions
nodes An array with the node names and ports ("NAME:PORT") nNodes The number of nodes localDomain Indicates that Unix Domain Socket instead of networked TCP socket is used for RSQL communication which is possible only when server and client are on the same host nReplicas The number of replicas; this number should be a divider of nNodesmeaning that the remainder ofnNodes / nReplicasis0. For example, the values ofnNodesandnReplicascould be (4 and 2) or (12 and 3) but not (6 and 4) because 6 % 4 = 2replType The replication method maxConnectAttempts The maximum number of attempts to connect to the server connectTimeout The timeout for each connect attempt in milliseconds; so the total connection time can be up to connectTimeout * maxConnectionAttemptsmillisecondsreadTimeout The timeout for read operations in milliseconds nWorkers The number of worker processes