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
nodesAn array with the node names and ports ("NAME:PORT").nNodesThe number of nodes.localDomainA flag indicating that a Unix domain socket is used instead of a networked TCP socket for RSQL communication, which is possible only when the server and client are on the same host.nReplicasThe number of replicas; this number should be a divisor ofnNodes, meaning that the remainder ofnNodes / nReplicasis0. For example, the values ofnNodesandnReplicascould be (4 and 2) or (12 and 3), but not (6 and 4) because6 % 4 = 2.replTypeThe replication method.maxConnectAttemptsThe maximum number of attempts to connect to the server.connectTimeoutThe timeout for each connection attempt in milliseconds; the total connection time can be up toconnectTimeout * maxConnectAttemptsmilliseconds.readTimeoutThe timeout for read operations in milliseconds.nWorkersThe number of worker processes.