Project

General

Profile

Feature #1799

Wt.Dbo and Boost.coroutine

Added by Boris Nagaev about 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
03/31/2013
Due date:
% Done:

0%

Estimated time:

Description

Hey,

Wt.Dbo uses synchronous IO and seems to be most time-consuming part of Wt. Because of this increasing threads number (typical approach for applications involving synchronous IO) is beneficial. I think this can be fixed by introducing coroutines in Wt.Dbo. While one instance of WApplication is talking with database, same thread can process other instance of WApplication. Synchronous part of Wt would be excluded.

This improvement needs no API changes of Wt.Dbo core. If all coroutine related code is located in Wt.Dbo core (not in connectors implementation), new methods of Dbo::SqlConnection would be added (to sleep and to wake up).

Boost.coroutine requires boost 1.53, for earlier boost versions synchronous implementation could be used.

Here is example of Boost.coroutine with Boost.Asio:

http://www.boost.org/doc/libs/1_53_0/libs/coroutine/doc/html/coroutine/intro.html

Wt uses Boost.Asio. Database client can be implemented with Boost.Asio. Nothing seems to prevent the trick.

Is it possible to implement this?

No data to display

Also available in: Atom PDF