Book review RavenDB High Performance

RavenDB High Perdormance I was excited when I got the chance to review the book RavenDB High Performance from Packtpub. Because we are using RavenDB in production. The title itself High Performance gave me the impression that this book is all about micro optimizing RavenDB by tweaking internals of RavenDB. I was quite surprised when I detected that this book takes another approach.

The first chapter starts with introducing what a document database is and explains in a few words the RavenDB architecture. In my point of view this chapters is useless. Let me explain why. I think you only buy this book after you have already decided to use RavenDB or you have at least read another introductory book about RavenDB. Therefore, you already know what a document database is and what its pros and cons are.

The second chapter although speaks about how to optimize that data model. In my opinion, this is one of the most important chapters of this book. You learn how to store relationships and efficiently fetching data by leveraging the RESTfulness of RavenDB.

The third chapter introduced an important concept, which is often forgotten. RavenDB only fetches 128 or maximum 1024 data models at a time. When you need to get more data out of RavenDB you have to either use paging or better leverage the capabilities of the new streaming API introduced in RavenDB 2.5. This chapter also introduces the Lazy API. The lazy API allows you to batch several calls to RavenDB in one single HTTP operation. This is extremely powerful and allows you to reduce unnecessary roundtrips to the server. One more little gem I want to mention from this chapter. It is the javascript scripting API. This API is especially useful when you need to migrate a large number of documents in RavenDB. It allows you to send a javascript to the server, which is executed on the server and can modify documents. But wait there is more.

The book talks about the most important aspect to build scalable systems: Reduce the number of times you actually hit the real server. Remember, doing nothing is always scalable :D. One way to achieve this is to heavily use RavenDB’s aggressive caching support. Further chapters introduce you briefly to how to monitor RavenDB with Glimpse, Performance Counters and statistics. More topics like Sharding, FailOver clustering and how to deploy RavenDB to the cloud are also covered in this book. Although in my personal opinion the sharding and failover part should be extended because it can be a complex process in real live scenarios.

Overall, the book was a quick and decent introduction into performance relevant topics for RavenDB.

About the author

Daniel Marbach

Add comment

By Daniel Marbach

Recent Posts