Connection Pooling

2011-07-11 Thread Salil Apte
hy this is happening. I have the following resource in my webapp's context.xml file. Is there anything else I need to do enable connection pooling with a JNDI resource? Thanks in advance. -Salil

Re: Connection Pooling

2011-07-12 Thread Sean Owen
ntext.xml file. Is there anything else I > need to do enable connection pooling with a JNDI resource? > > type="javax.sql.DataSource" username="root" password="" > driverClassName="com.mysql.jdbc.Driver" > > url="jdbc:mysql://localhos

Re: Connection Pooling

2011-07-12 Thread Salil Apte
;> >> WARNING: You are not using ConnectionPoolDataSource. Make sure your >> DataSource pools connections to the database itself, or database >> performance will be severely reduced. >> >> I'm not really sure why this is happening. I have the following >>

Re: Connection Pooling

2011-07-12 Thread Salil Apte
nnectionPoolDataSource. Make sure your >>> DataSource pools connections to the database itself, or database >>> performance will be severely reduced. >>> >>> I'm not really sure why this is happening. I have the following >>> resource in my webapp'

Re: Connection Pooling

2011-07-12 Thread Lance Norskog
;>> DataSource pools connections to the database itself, or database >>>> performance will be severely reduced. >>>> >>>> I'm not really sure why this is happening. I have the following >>>> resource in my webapp's context

Re: Connection Pooling

2011-07-12 Thread Salil Apte
AM, Salil Apte wrote: >>>> >>>>> So I keep getting this warning from either Mahout or the server (I'm >>>>> guessing the former): >>>>> >>>>> WARNING: You are not using ConnectionPoolDataSource. Make sure your >>>

Re: Connection Pooling

2011-07-12 Thread Sebastian Schelter
On 13.07.2011 08:12, Salil Apte wrote: Is an item based approached preferable when considering speed? Itembased approaches are said to scale better as there exist less items than users in most usecases and item-item-similarities can be precomputed. But before you change your setup we should

Re: Connection Pooling

2011-07-13 Thread Sean Owen
tting this warning from either Mahout or the server (I'm > >>> guessing the former): > >>> > >>> WARNING: You are not using ConnectionPoolDataSource. Make sure your > >>> DataSource pools connections to the database itself, or database > >>>

Re: Connection Pooling

2011-07-13 Thread Vitali Mogilevsky
gt;>> So I keep getting this warning from either Mahout or the server (I'm > > >>> guessing the former): > > >>> > > >>> WARNING: You are not using ConnectionPoolDataSource. Make sure your > > >>> DataSource pools connections to

Re: Connection Pooling

2011-07-13 Thread Sean Owen
That's all correct, it reads a lot. But you can avoid a lot of it by using caching wrappers. You also don't need to dump to a file. Use ReloadFromJDBCDataModel. On Wed, Jul 13, 2011 at 9:57 AM, Vitali Mogilevsky wrote: > Hey, > I got the same problem, of slowness while using MYSQL data model, aft

Re: Connection Pooling

2011-07-13 Thread Vitali Mogilevsky
Thanks, will test that On Wed, Jul 13, 2011 at 12:11 PM, Sean Owen wrote: > That's all correct, it reads a lot. But you can avoid a lot of it by using > caching wrappers. > You also don't need to dump to a file. Use ReloadFromJDBCDataModel. > > On Wed, Jul 13, 2011 at 9:57 AM, Vitali Mogilevsky

Re: Connection Pooling

2011-07-13 Thread Salil Apte
Awesome, I will give ReloadFromJDBCDataModel a try. How does this particular data model update itself on database changes? Does it just happen periodically and if so, can this rate be change easily? Lastly, will calling clear(userId) on a recommender frequently be bad for performance? I'm assuming

Re: Connection Pooling

2011-07-13 Thread aaron
-Original Message- From: Salil Apte Date: Wed, 13 Jul 2011 10:19:47 To: Reply-To: user@mahout.apache.org Subject: Re: Connection Pooling Awesome, I will give ReloadFromJDBCDataModel a try. How does this particular data model update itself on database changes? Does it just happen

Re: Connection Pooling

2011-07-13 Thread Sean Owen
Yes it reloads after a configurable interval, or on demand. Clearing the cache for a user ID only means that user's data is recomputed. It's not bad to call this frequently per se... I suppose you want to let it cache as much and for as long as is valid and acceptable to your app. Your bottleneck

Re: Connection Pooling

2011-07-13 Thread Salil Apte
Where can the interval be configured? BTW, ReloadFromJDBCDataModel works like a dream so far :) On Wed, Jul 13, 2011 at 10:58 AM, Sean Owen wrote: > Yes it reloads after a configurable interval, or on demand. > > Clearing the cache for a user ID only means that user's data is recomputed. > It's n

Re: Connection Pooling

2011-07-13 Thread Sean Owen
I was mixing this up with another class. It doesn't reload itself. You can call refresh() to do so. On Wed, Jul 13, 2011 at 7:34 PM, Salil Apte wrote: > Where can the interval be configured? BTW, ReloadFromJDBCDataModel > works like a dream so far :) > > On Wed, Jul 13, 2011 at 10:58 AM, Sean Ow

Re: Connection Pooling

2011-07-21 Thread Marko Ciric
Actually, as GenericDataModel class works very well as a super class of your desired data model. This way everything is cached into memory and boosts performance a lot. The reloading is actually easy to be implemented with the refresh mechanism (Taste objects implement Refreshable interface). You c

Database connection pooling for a recommendation engine

2013-06-05 Thread Mike W.
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 differenc

Re: Database connection pooling for a recommendation engine

2013-06-05 Thread Sean Owen
Not sure, is this really related to Mahout? I don't know of an equivalent of J2EE / Tomcat for C++, but there must be something. As a general principle, you will have to load your data into memory if you want to perform the computations on the fly in real time. So how you access the data isn't so

Re: Database connection pooling for a recommendation engine

2013-06-05 Thread Manuel Blechschmidt
Hi Mike, the following paper contains some comparisons between different database stacks. I can also give you the QtSQL code if you are interested in it. http://www.manuel-blechschmidt.de/data/MMRPG2.pdf /Manuel Am 05.06.2013 um 13:44 schrieb Mike W.: > Hello, > > I am considering to implemen

Usage of MySQL as DataSource with connection pooling

2010-11-08 Thread Karl Eigengrund
Hello, I am new to Mahout. I am using it to get recommendations out of my data stored in a MySQL database. I have started by configuring the DataSource programmatically, and followed the performace hints in the JavaDoc for MySQLJDBCDataModel. But without connection pooling the performance is

Re: Usage of MySQL as DataSource with connection pooling

2010-11-08 Thread Sean Owen
vaDoc for > MySQLJDBCDataModel. But without connection pooling the performance is with > just 3000 preferences extremely bad. I think we exchanged a message before -- the issue was perhaps you were not using connection pools or indexes? > I am using Tomcat and  I have done the configuration as descr

Re: Usage of MySQL as DataSource with connection pooling

2010-11-09 Thread Karl Eigengrund
Thank you for your answer! I am using indexes as you suggest in your book, but I have problems with the configuration for connection pooling. I have used the following code: DataSource dataSource=null; try { dataSource = (DataSource)ctx.lookup("java:/comp/env/jdbc/MySQLDB");

Re: Usage of MySQL as DataSource with connection pooling

2010-11-09 Thread Sean Owen
This really isn't a question about Mahout itself, but I believe I can still help. I don't see anywhere that you've actually configured the DataSource! You need something like this in server.xml; this is my standard "recipe":

Re: Usage of MySQL as DataSource with connection pooling

2010-11-09 Thread Karl Eigengrund
nable.run(ThreadPool.java:689) java.lang.Thread.run(Unknown Source) That is really strange to me, since I can see the JNDI Name in the admin webapplication. I am already quite frustrated :( --- Sean Owen schrieb am Di, 9.11.2010: > Von: Sean Owen > Betreff: Re: Usage of MySQ

Re: Usage of MySQL as DataSource with connection pooling

2010-11-09 Thread Sean Owen
I take it back -- I think the way you are configuring it is also valid. However the problem is that for whatever reason it is not configuring and deploying JNDI correctly. You should look in the server logs for a clue to the problem. On Tue, Nov 9, 2010 at 11:03 AM, Sean Owen wrote: > This really

Re: Usage of MySQL as DataSource with connection pooling

2010-11-09 Thread Sean Owen
It is not being configured -- class and URL are null. You might try my style of configuring it as I know it works. On Tue, Nov 9, 2010 at 2:46 PM, Karl Eigengrund wrote: > Thank you for your help!! > I have tried it as you suggested and also on a different system (Ubuntu > instead of Windows), b