AsyncDistributedSqlEngine: constructor

This article is deprecated.

Create an instance of AsyncDistributedSqlEngine.

For an overview see page AsyncDistributedSqlEngine

This is an variant of DistributedSqlEngine that facilitates execution of several queries at the same time. It allows starting a list of queries simultaneously and waiting for all results to arrive at client processes using shards of the database.

Prototype

 
    AsyncDistributedSqlEngine(size_t nWorkers = 1, 
                    size_t txBufSize = 64 * 1024);
 

Arguments

nWorkers The number of worker processes
txBufSize Specifies the size of transmit buffer used to serialize requests to be sent to the server (default is 64k)

Description

This constructor creates an instance of AsyncDistributedSqlEngine.

Example

Typically a C++ application will instantiate an AsyncDistributedSqlEngine object in the main program as illustrated below:

     
    const size_t nWorkers = 4;
     
    int main(int argc, char** argv)
    {
        try {

            McoSql::AsyncDistributedSqlEngine engine(nWorkers);            
            ...
        }
    }