Skip to main content
Share

ReductStore v1.4.0 in Rust has been released

· 3 min read
Alexey Timin
Software Engineer - Database, Rust, C++

I am happy to announce that we have completed the migration from C++ to Rust, and have released a stable version (v1.4.0) that is entirely written in Rust. 🤩

It was not an easy journey. After six weeks of coding, we encountered numerous regressions and changes in behavior. I needed to release two alpha and two beta versions with production testing to clean up the database. Now, it is finally ready!

Share

Subscribe to new records with C++ SDK

· 5 min read
Alexey Timin
Software Engineer - Database, Rust, C++

This article provides an introduction to ReductStore and explains how to use the Reduct C++ SDK to subscribe to data from the database.

Prerequisites

To subscribe to new records, we should use a continuous query, which has been supported by ReductStore since version v1.4. We can use the following Docker command to run it:

docker pull reduct/store:latest
docker run -p 8383:8383 reduct/store:latest

Now, we need to install the Reduct Client SDK for C++. Please refer to these instructions.

Share

The Bottom Line After 6 Weeks With Rust

· 5 min read
Alexey Timin
Software Engineer - Database, Rust, C++

I previously wrote about my plan to rewrite ReductStore in Rust. I am happy to announce that the migration is now complete. It was a very interesting 6 weeks for me, and I would like to share my experience with you.

Project Design before Migration

I wrote ReductStore in C++20, utilizing coroutines and ranges.

For the HTTP frontend, I used uWebSockets as an HTTP server and its event loop for coroutines.

The storage engine was implemented from scratch.

I used Protobuf as a JSON and binary serializer in both the HTTP frontend and the storage engine. Many of the structures were shared between the two.

I managed dependencies with Conan and used CMake as a build system.

Codebase about 20k lines with unit tests.

About Me

I have been developing in C++ and Python for about five years. Mostly, I write services for data acquisition, processing, and storage. I like OOP, design patterns, and my C++ smells Java. However, I avoid using exceptions and follow the RAII approach.

In Rust, I have only written the "Hello, World" example.

I work on the project in my spare time 10-20 hours a week.

Migration

Initially, I planned to use the cxx.rs library and rewrite the project in small steps by wrapping Rust code and integrating it into C++.

[SPOILER] I wasn't able to handle this...