RavenDB And Shared Hosting

Michael OssouNoSQL databases have gotten a lot of attention recently. This is primarily due to them being seen as scalable, great for working with documents, and generally a good option for people that have a huge amount of non-relational data. Think Twitter. Twitter is a great example of a service where a NoSQL solution can really shine. They have an enormous amount of data that isn’t very relational.

In the ASP.NET world, RavenDB is a popular option. For those of you brave enough to take the NoSQL plunge, I wanted to guide you through getting started and mention a few things. RavenDB can run in many modes.

The one we are concerned with when it comes to running it on a shared hosting account is Embedded Mode. This essentially embeds the RavenDB goodness into your application and will work on a shared hosting account. In fact, there is even a nuget package that you can use to drop it into your project.

Embedded mode even contains an HTTP server. However, this option will not work in a shared hosting account. So do not set:

UseEmbeddedHttpServer = true

Your best option would probably be to add something like this to your code:

#if DEBUG
UseEmbeddedHttpServer = true;
#endif

That way you could change your build type for either working locally or for production when you publish. For those looking for a fantastic tutorial and sample application, look no further than here.

Leave a Reply

Your email address will not be published. Required fields are marked *