What is new in RavenDB 3.0Simplicity

time to read 5 min | 940 words

I’m not sure that there is a better word to describe it. We have a sign in the office, 3 feet by 6 feet that says: Reduce Friction. And that is something that we tried very hard to do.

Under simplicity we aggregate everything that might aggravate you, and what we did to reduce that.

That include things like reducing the number of files and assemblies we ship. Compare the 2.5 output:

image

To the 3.0 output:

image

We did that by removing a lot of dependencies that we could do without, and internalizing a lot of the other stuff.

We went over the command line interface of the tooling we use and upgraded that. For example, restoring via the command line is now split into a restoring a system database (offline operation for the entire server) or restoring a regular database (the server is fully online, and other databases can run during this time).

In secret and without telling anyone, we have also doubled the amount of parallel work that RavenDB can do. Previously, if you purchased a standard license, you were limited to 6 concurrent index tasks, for example. In RavenDB 3.0, the standard license still has 6 cores capacity, but it will allow up to 12 concurrent index tasks. If you have a 32 cores Enterprise license, that would mean 64 concurrent indexing tasks, and you can follow the logic from there, I asuume.

We have also dropped the Raven.Client.Embedded assembly. It isn’t necessary. The full functionality is still available, of course, it was just moved to Raven.Database assembly. That reduce the amount of dlls that you have to work with and manage.

You probably don’t care much, but we have done a lot of refactoring on the internals of RavenDB. The DocumentDatabase class (the core functionality in RavenDB) was broken up into many separate classes, and on the client side, we have done much the same to the DocumentStore class. We have also combined several listeners together, so now you don’t have to deal with Extended Conversion Listeners.

In terms of storage, obviously Voron gives us a huge boost, and it is designed to be a zero admin system that self optimize. But we changed things on top of that as well. Previously, we were storing the data as BSON on disk. That decision had a lot to do with serialization costs and the size on disk. However, that created issues when we had to deal with the storage at a low level. So now RavenDB stores the data in text JSON format all the way through. And yes, it will seamlessly convert from BSON to JSON when you update documents, you don’t have to do anything to get it working. We run extensive performance testing here, and it turned out that we were able to reduce the cost of writing by moving to a textual format.

Another small annoyance with RavenDB was the use of in memory databases. Those are usually used for testing, but we also have a number of clients that use those for production data, usually as a high throughput first responder, with replication to / from backend systems to ensure durability. Previously, you had to manually tell RavenDB that it shouldn’t tear down those database when they went idle. Now we won’t tear down an in memory database even if it didn’t do anything for a long while.

Another common issues was people adding / removing bundles on the fly. This isn’t supported, and it can cause issues because it usually works, but not always. We made it so the process for doing that is a bit more involved, and require an actual acknowledgment that you are doing something that might be unsafe.

Users sometimes have proxies / man in the middle service that manipulate the HTTP headers. A common example of that is New Relic. That can cause problems sometimes, since RavenDB use HTTP headers to pass the document metadata, that caused issues. By now, we have pretty much filtered out all the common stuff, but since that always required us to make a new release, that had a prohibitive cost of the users. Instead, we now allow you to customize the list of headers that the server will ignore on the fly.

We did a lot for indexes in 3.0, but one of the changes is both simple and meaningful. We gave you the ability to ask if my current index definition matches the one on the server? That is important during deployments, because you can check if an index is up to date or not, and then decide if you need to do an online index rebuild, or schedule this for a later time, with less load, or just move on because everything is the same.

In RavenDB 3.0, we have deprecated the attachments, they still work (but will be removed in the next major release), but you are expected to use RavenFS for binary storage. RavenDB now comes with a migration tool to move all attachments from a RavenDB database to a RavenFS file system.

As I said, those are small things, none of them would rise to the level of major feature on its own. In aggregate (and I mentioned just the top from a very big list) they represent a significant reduction in the amount of friction that you have to deal with when using RavenDB.

More posts in "What is new in RavenDB 3.0" series:

  1. (24 Sep 2014) Meta discussion
  2. (23 Sep 2014) Operations–Optimizations
  3. (22 Sep 2014) Operations–the nitty gritty details
  4. (22 Sep 2014) Operations–production view
  5. (19 Sep 2014) Operations–the pretty pictures tour
  6. (19 Sep 2014) SQL Replication
  7. (18 Sep 2014) Queries improvements
  8. (17 Sep 2014) Query diagnostics
  9. (17 Sep 2014) Indexing enhancements
  10. (16 Sep 2014) Indexing backend
  11. (15 Sep 2014) Simplicity
  12. (15 Sep 2014) JVM Client API
  13. (12 Sep 2014) Client side
  14. (11 Sep 2014) The studio
  15. (11 Sep 2014) RavenFS
  16. (10 Sep 2014) Voron