There are two main things you need to do:
- Create a
RecommenderEngine
containing your model, configuration, etc. This will be a global object shared between all web requests. You can also build it in a separate program, serialize it to disk, and read it back in. - In each web request, use the
createRecommender()
method to get aRecommender
for that request to use.
You'll need to handle data access; there is some documentation on that here: https://github.com/grouplens/lenskit/wiki/DataAccess
LensKit 2.0 was a bit weak on web integration; LensKit 2.1 makes it significantly easier. Look for a 2.1 milestone release very soon.