[Cppcms-users] DB connection pooling
Brought to you by:
artyom-beilis
|
From: Shiv S. D. <shi...@gm...> - 2012-10-22 12:22:31
|
Hi,
Consider the following piece of documentation
If the application that handles it is a synchronous application, its
execution is passed to the *thread pool*. The user application prepares the
response and sends it synchronously to the client and the context is
destroyed, completing the "requst/response" cycle.
If the application is asynchronous, the HTTP Context remains inside the
event loop's thread and it is handled by the asynchronous application. This
application may decide to complete the response immediately or postpone it
by implementing, for example, long polling.
and following code
1. int main(int argc,char ** argv)
2. {
3. try {
4. cppcms::service srv(argc,argv);
5. srv.applications_pool().mount(
6. cppcms::applications_factory<hello>()
7. );
now as it is also written that applications are asynchronous what is the
need of more that one database connection. Is it the case that one
persistent connection will suffice?
--
Best regards,
Shiv Shankar Dayal
|