As discussed by email, please implement a way where users can execute several SQL statements concurrently.
Bellow is my last explanation.
{quote}
To fill you into this, here is how the app works.
The Node.js app handles all absolutely requests in a Chunked-Encoding way where responses are delivered in chunks. This is a great approach to reduce the number of HTTP requests and dramatically decrease the page load time. Well this is great when a page is loaded or refreshed.
But for AJAX requests, yes, the requests should be handled in full and the response should be sent at once. This is exactly how the app works.
But the key difference of my app is that everything is implemented in AMD and loaded with RequireJS. This allows to load and instantiate modules only once. Every next request for the same module will simply return already instantiated reference to the module. Super optimized, runs very fast, requires much less resources.
Considering the above AMD environment, when UserA sends an AJAX requests, the request handling controller asks the RequireJS to load CUBRID module. When it's loaded for the first time, it get's instantiated and the ConnectionA is created. The module reference is given to the controller and that controller is executing some QueryA. The result of this query is returned to the UserA.
While the above is taking place, concurrently UserB is sending an AJAX request, assume for the same controller which then receives a reference to the same ConnectionA (this considers the connection is live, if not, a new one is created and returned). Then the controller executes QueryB for UserB. This may happen while QueryA is still in process. Ideally, this should be asynchronously handled by the driver. But in the current state, the driver says: Error: Another query is already in progress! - denying current query request. This is not the way I expected asynchronous driver to work. I understand that MySQL implements this way. And actually all other language APIs have absolutely identical implementation.
The above process can be illustrated similarly with another example. Very simply one where there is only one UserA but he wants to execute two queries asynchronously: QueryA and QueryB like:
client.query('SELECT THE LATEST POST TO ME WHERE ID = 1', callbackA);
client.query('INSERT INTO ANALYTICS THAT I REQUESTED POST 1', callbackB);
The user cares about the result of only the first query. The second query will simply get executed on its own. User doesn't care about its result.
This example can be modified where two SELECT queries can actually be executed and the user cares about both of them. However, at this point you, as a driver developer, should not care about how he will handle the results of these two queries and deliver to the browser. This is the driver user's problem. There is a technique to handle exactly this scenario.
What I am trying to explain is that the above scenarios are real case scenarios which are actually widely used by LinkedIn Mobile Web app, as well as Facebook Web app. Such scenarios allows to handle concurrent requests much more efficiently with less hunger to the resources.
I'm not trying to say that your team is doing something wrong. But I want the driver to work as users would expect and provide great asynchronous query execution features among all the must-have features.
Please let me know if there is anything else I can help you with regarding this issue.
{quote}