RavenDB 5.0 comes with Distributed Time Series support, Documents Compression, and enhanced indexing: you can now index Distributed Counters’ values, and your indexes can now use Compare-Exchange Keys.
You can improve the usability and ease the management of numerous processes by handling their data using Time Series - vectors of data-points whose values are ordered by time. The measurements sent by an air-quality sensor, for example, can be easily evaluated over time using Time Series and used to suggest various improvements; the accumulating oxygen saturation levels measured by a hospital monitor can help verify recovery processes and treatment efficiency; and so on for countless processes and applications.
We’ve integrated Time Series functionality into RavenDB 5.0’s document model, distributed environment, and various other features. Time Series always extend specific documents, to keep their context clear and their operation simple. Their data, however, is kept separately from that of the documents they extend, so they may be rapidly modified without invoking document changes. Distributed clients and nodes can modify Time Series concurrently and the modifications are merged by the cluster with no conflict.
Here are some additional RavenDB 5.0 Time Series features.
The schema-less nature of document databases has many benefits, but a key flaw: It requires us to manage the structure of data on a per-document basis. In some cases, the majority of the data you keep is actually the document’s structure.
RavenDB 5.0 now addresses this issue and offers a great solution in its Documents Compression feature.
Document compression uses top of the line Zstd compression algorithm to learn your data model and create dictionaries that represent repeated data across documents. This includes the repeated document structure, but also the document data itself.
RavenDB continuously inspects your documents to create the best compression model. As your data changes, RavenDB adjusts its models to reduce the amount of disk space you require. In most datasets, the space savings we see are greater than 50%.
The abundance of rarely-used documents that tend to accumulate while the database grows, is another good reason for document compression: compressing them would free storage space, while little to no resources would ever be spent on decompressing the documents for reading.
RavenDB 5.0 lets you create static indexes for Time Series and distributed counters, and use compare-exchange values in your indexes.
Distributed counters are numerical data variables that can be added to documents and provide them with high-performance counting capabilities. An added counter can count, for example, the number of downloads from a web page, or the number of cars passing a road camera. Counters can be accessed for reading or writing by multiple clients and cluster nodes, can be managed via API methods and the Studio, and are supported by a variety of RavenDB features including, to name just a few, queries, data subscriptions, backup, and many others. Now, counters can also be indexed.
RavenDB’s compare-exchange feature introduces interlocked operations to your distributed environment. You can use compare-exchange operations to reserve unique keys in the database group and guarantee cluster-wide atomicity while modifying a key’s state.Read more about compare exchange.
Starting from RavenDB 5.0, indexes can load compare-exchange keys and react to changes in their state.