mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike W." <liansh...@gmail.com>
Subject Database connection pooling for a recommendation engine
Date Wed, 05 Jun 2013 11:44:57 GMT
Hello,

I am considering to implement a recommendation engine for a small size
website. The website will employ LAMP stack, and for some reasons the
recommendation engine must be written in C++. It consists of an On-line
Component and Off-line Component, both need to connect to MySQL. The
difference is that On-line Component will need a connection pool, whereas
several persistent connections or even connect as required would be
sufficient for the Off-line Component, since it does not require real time
performance in a concurrent requests scenario as in On-line Component.

On-line Component is to be wrapped as a web service via Apache AXIS2. The
PHP frontend app on Apache http server retrieves recommendation data from
this web service module.

There are two DB connection options for On-line Component I can think of:
1. Use ODBC connection pool, I think unixODBC might be a candidate. 2. Use
connection pool APIs that come as a part of Apache HTTP server. mod_dbd
would be a choice.http://httpd.apache.org/docs/2.2/mod/mod_dbd.html

As for Off-line Component, a simple DB connection option is direct
connection using ODBC.

Due to lack of web app design experience, I have the following questions:

Option 1 for On-line Component is a tightly coupled design without taking
advantage of pooling APIs in Apache HTTP server. But if I choose Option 2
(3-tiered architecture), as a standalone component apart from Apache HTTP
server, how to use its connection pool APIs?

A Java application can be deployed as a WAR file and contained in a servlet
container such as tomcat(See Mahout in Action, section 5.5), or it can
use org.apache.mahout.cf.taste.impl.model.jdbc.ConnectionPoolDataSource
(
https://cwiki.apache.org/confluence/display/MAHOUT/Recommender+Documentation).
Is there any similar approach for my C++ recommendation engine?

I am not sure if I made a proper prototype. Any suggestions will be
appreciated:)

Thanks,

Mike

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message