Rustenstore Getting Stream Back

Posted on Aug 29, 2021

Today, I had time to work on Rustenstore.

I managed to refactor my code and put the different concerns into several files. This is not clean at all and a lot of work is still necessary to have a clean project. However, it is a good start and now that I have understood the “rust way” of managing a project, everything will become easier.

Next I worked on getting a stream back from its disk serialization. It would be quite simple as the content of the file should directly be sent to the TCP connection. However, as Tokio Writer doesn’t seem to accept an iterator, I had to write a buffered sending by myself. It is not very complicated but it is very important for the memory to be correcty managed. I am quite proud of the result.

The next steps is to be able to receive a stream of new events and save them to the stream. After that, I will just have to be able the make the distinction between read and write requests and I should have the building blocks for a first usable version !