Nope, I tried that before and in my opinion the problem is the CachingRecommender. I need a caching one because of the performance and runtime. In fact, I must update or even clear the cache for the user who updates his preferences. Information: I use a new CachingRecommender(new SlopeOneRecommender(...), ...) Additionally (I don't know if this matters), I use a MySQLDataModel but no MySQLDiffStorage because it takes too long to build the diffs (after 3 hours it even hadn't finished!). So, all in all, if you say the SlopeOneRecommender does it itself, my problem is the CachingRecommender that caches all diffs if they are called once until the cache gets cleared.

Am 24.02.2011 17:42, schrieb Sean Owen:
I see well if you are using SlopeOneRecommender, it already updates the diffs correctly for you, when you call setPreference() for example. If you do it that way it all works. There should be no need to expose and update the diffs separately.

2011/2/24 Daniel Mühlbachler <[email protected] <mailto:[email protected]>>

    Ok but if I want to call removeItemPref I must know my preference
    but to get that preference I need runtime. However, what happens
    if I remove a preference and want to get the preference after that
    again (so it should recalculate the user's preferences).
    Another thing: if I want to call updateItemPref there is no way to
    specify an user. Only itemID and a prefDelta. I understand why
    there is no userID but what's prefDelta? And the biggest issue in
    that case is the runtime because we have many queries at the same
    time that must be processed as quickly as possible. In fact, if I
    update all preferences is there a timeout for all other queries?
    Ok, let's specify again what I have/need:
    A website that interacts with my recommender and there will be
    many many queries at the same time (huge site). In fact, a user
    can rate movies and if a user does this we need a method that
    rebuilds at least the user's recommendations. (All other
    recommendations from other users that get affected by that change
    are not important - only the user's ones because we are doing a
    complete refesh every day.) For that, we can't have a high timeout
    (e.g. refresh needs about 20-25 seconds). So the perfect way would
    be only to update an user's preferences or the use of the
    updateItemPref method (if this method can provide that things).

    btw... thanks again for your help with my MySQL Connector and
    Tomcat! :-)



    Am 24.02.2011 17:15, schrieb Sean Owen:

        It's just a count maintained across calls to the method which
        tracks how
        many entries have been stored in the data structures. This is
        so it can stop
        growing the data size once a limit has been reached.

        It would not work to expose this method directly, as-is, no.
        Instead I think you want to reflect your updates by calling
        updateItemPref()
        and/or removeItemPref() for all the changes that your user makes.

        2011/2/24 Daniel Mühlbachler<[email protected]
        <mailto:[email protected]>>

            Hello,

            I have a problem with the memory caching recommender. Due
            to performance
            issues I must choose a memory caching recommender but we
            need to reload the
            cache only for one user (I don't explain why).
            After investigating the MemoryDiffStorage for the SlopeOne
            recommender, I
            found the method "private long processOneUser(long
            averageCount, long
            userID)" that processes only one user - right? In fact, my
            idea is that I am
            making this method public and add this method to the
            WebService class but
            what is this averageCount variable? Does it matter if I
            choose a random
            number or must that be a special one?
            Moreover, where can I find the WebService class files and
            how can I compile
            them again to get a *.jws file so that I can add this
            method to the
            WebService?

            Thanks in advance!
            Best regards,
            Daniel Mühlbachler


Reply via email to