6

A few months ago I was playing around with RavenDb & Azure and I successfully got it running by hosting the server within a worker role by following this excellent blog post.

However, I've just created a new project and tried following the article again, but it seems much as changed with the raven files since that blog post. Notably :

  • There isn't simply a 'RavenDB' NuGet package - there are a bunch of them: RavenDB Client, RavenDB Database, RavenDB Embedded, RavenDB Server & RavenDB Asp.Net Hosted server.
  • When installing 'RavenDB Server' (this seems most appropriate for a worker role) it no longer has the same .dlls that the article says to reference, and there is no longer a .xap file. I've tried simply referencing the Raven.Database .dll, but when I try to start it, I get an InvalidOperation exception: "Different number of tables stored in the Munin file".

Can anyone provide me with the steps required to run RavenDB in a worker role?

Is running RavenDB as a worker role the best way to go, or is there a more appropriate way of running it in Azure? (It needs to be consumed by multiple web sites).

David Masters
  • 8,069
  • 2
  • 44
  • 75

1 Answers1

8

I would highly recommend using one of the concrete Virtual Machine (IaaS) offerings to run RavenDB. RavenDB isn't designed for elasticity in a way that would be meaningful for you to be able to just increase or decrease the number of running workers, so you really don't get anything from the worker role functionality.

David Pfeffer
  • 38,869
  • 30
  • 127
  • 202
  • 1
    You're suggesting I use something like RavenHQ? – David Masters Feb 18 '13 at 13:01
  • 1
    At this stage, I just want to be able run it up locally and deploy it in Azure just to experiment creating multiple databases – David Masters Feb 18 '13 at 14:01
  • 2
    No, I'm suggesting an actual Azure VM. – David Pfeffer Feb 18 '13 at 16:33
  • OK well Azure aside then, how can I simply have a VS solution with two projects... one hosting the RavenDb server, one being an ASP.NET app that connects to the server... – David Masters Feb 18 '13 at 16:44
  • Simply create an embedded database in the host: http://msdn.microsoft.com/en-us/magazine/hh547101.aspx – David Pfeffer Feb 18 '13 at 16:55
  • 3
    In a web or worker role you have to use an Azure Drive - which has much lower performance than an Azure Disk which you get with a VHD. Reference: http://blogs.msdn.com/b/windowsazurestorage/archive/2012/06/28/exploring-windows-azure-drives-disks-and-images.aspx – Matt Johnson-Pint Feb 19 '13 at 20:15