14

A little background: I currently make use of Memcached Providers for managing session state in my ASP.NET application. It provides facilities for using SQL Server as a fallback storage mechanism (when sessions need to be purged from the memcached cache). I'd like to look at creating a provider for RavenDB as it would be much more performant for this sort of task.

My question is, has anyone implemented such a thing? (or something similar?) - I'd hate to re-invent the wheel. Google does not yield any helpful results (other than my question about this in the RavenDB group itself), so I thought I'd take this question directly to the Stack Overflow community.

2
  • So are you looking at replacing SQL Server with RavenDB but still have the Memcached in there? Or you want to replace Memcached with RavenDB. Just wondering which one will give you better performance for session state. Thanks.
    – Tigran
    Jul 14, 2013 at 5:00
  • I actually ended up going with Couchbase and making use of their aspnet providers implementation (for session state and output cache): github.com/couchbaselabs/couchbase-aspnet
    – DanP
    Jul 15, 2013 at 13:29

3 Answers 3

18

I was also seeking a RavenDB session-state store, and my search also failed.

So I created one:

github.com/mjrichardson/RavenDbSessionStateStoreProvider

Also available via a NuGet package.

2
3

Not as far as I know. RavenDB is pretty active project and Memcached has been practically dead for 2 yr and remained 32-bit. You might be better off just running RavenDB under IIS

OK, so code-wise it doesn't get smaller than this - single file: http://sourceforge.net/projects/aspnetsessmysql/files/MySqlSessionStateStore.cs/download

2
  • Thanks for the input, but memcached isn't really the issue here...more generally, I'm asking about creating a session provider for RavenDB. The memcached provider simply offers one example implementation of how this could work.
    – DanP
    Aug 13, 2010 at 19:18
  • So you are actually looking for a reasonably small source code for an ASP.NET session provider talking to some other DB so that you can modify it for RavenDB? Unles you are totally opposed to writing some code :-)
    – ZXX
    Aug 14, 2010 at 2:43
3

RavenDb provides a Session expiration bundle which means that documents are deleted after a specified lifetime. This is ideal for use as a session and means that your entire aggregate root will be retrieved from RavenDb, meaning much cleaner code: RavenDb Expiration Bundle

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.