
On Wed, Dec 21, 2011 at 9:21 PM, james@jamesbb.co.uk <james@jamesbb.co.uk> wrote:
Blocking - I've thought about this, but the MySQL C/C++ libraries unfortunately don't provide asynchronous queries.
I'm thinking of moving database reads into a seperate thread(s). It would be nice if I can integrate this with the io_service, but I'm unsure how to do so. Is it possible to pass arbitrary work items to an io_service, in the same manner as async_read/write?
Does every request involve blocking calls? If so, I'd not go with a 'shared nothing' design. Olaf

Thanks Olaf - initially connections are authenticated, which involves a database read and a couple of messages sent back and forth. After this is complete, the connections need no communication with the database (or each other) and the messages are essentially just shuffled to the next process/machine in the chain. On 21 December 2011 at 20:48 Olaf van der Spek <ml@vdspek.org> wrote:
On Wed, Dec 21, 2011 at 9:21 PM, james@jamesbb.co.uk <james@jamesbb.co.uk> wrote:
Blocking - I've thought about this, but the MySQL C/C++ libraries unfortunately don't provide asynchronous queries.
I'm thinking of moving database reads into a seperate thread(s). It would be nice if I can integrate this with the io_service, but I'm unsure how to do so. Is it possible to pass arbitrary work items to an io_service, in the same manner as async_read/write?
Does every request involve blocking calls? If so, I'd not go with a 'shared nothing' design.
Olaf
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (2)
-
james@jamesbb.co.uk
-
Olaf van der Spek