Live data from Hacker News

Rewriting a high performance vector database in Rust

pinecone.io

21–30 of 157 posts

Re: Rewriting a high performance vector database in Rust

#21
post #13
post #5

Glanced through the article, and I see no comparisons on how performance of the DB is in Rust versus their current C++ implementation, no mention of if maintaining the Rust code is easier than their C++ codebase, no stats on how devs are ramping up and how it's tackling their "hard to find a dev who knows both C++ and Python well" issue.

Article also states that the switch from C++ to Rust improves "low level optimized instruction sets, memory layout, and running async tasks." The first two are also strengths of C++, and for the third the article says that "Rust is async, and Tokio is the one of the most popular async providers ... However, it’s not great for running CPU intensive workloads, like with Pinecone." Puzzling.

I've had more luck with async-std over Tokio for more CPU intensive workloads. But then again, I ran it on a kqueue platform so my experience is probably not representative.

Re: Rewriting a high performance vector database in Rust

#22
post #18

Rewriting in Rust is not a meme, it's a cycle. Before Rust became viable, rewrites were done in Go. From the archives: - Rewriting a large production system in Go https://news.ycombinator.com/item?id=6234736 (2013) - How We Moved Our API From Ruby to Go https://news.ycombinator.com/item?id=9693743 (2015) - Matrix and Riot Confirmed as the Basis for France’s Secure Instant Messenger App https://news.ycombinator.com/it…

Which is why old timers eventually learn to just deliver with boring technology.

Re: Rewriting a high performance vector database in Rust

#23
post #5

Glanced through the article, and I see no comparisons on how performance of the DB is in Rust versus their current C++ implementation, no mention of if maintaining the Rust code is easier than their C++ codebase, no stats on how devs are ramping up and how it's tackling their "hard to find a dev who knows both C++ and Python well" issue.

The next paragraph they state:

    We looked at and compared several languages - Go, Java, C++, and Rust. We knew that C++ was harder to scale and maintain high quality as you build a dev team; that Java doesn’t provide the flexibility and systems programming language we needed; and that Go is also a garbage collected language. This left us with Rust. With Rust, the pros around performance, memory management, and ease of use outweighed the cons of it not yet being a very established language.
In other words, they wanted to unify the programming languages and evaluated several. Rust won out of those for performance reasons.

The article is a short recap of a 40 minute video. The video has more context and explains the intentions much better than the web page.

They show a graph of performance over time as the rewrite progressed. There were some small optimisations and problems, a few big regressions, and then a huge improvement that was maintained. Looks like the rewrite process made the database perform significantly better. There's nothing on how much this was caused by the language switch itself, but that's functionally impossible: nobody is rewriting their application twice to see what rewrite is better.

Re: Rewriting a high performance vector database in Rust

#24
post #22
post #18

Rewriting in Rust is not a meme, it's a cycle. Before Rust became viable, rewrites were done in Go. From the archives: - Rewriting a large production system in Go https://news.ycombinator.com/item?id=6234736 (2013) - How We Moved Our API From Ruby to Go https://news.ycombinator.com/item?id=9693743 (2015) - Matrix and Riot Confirmed as the Basis for France’s Secure Instant Messenger App https://news.ycombinator.com/it…

Which is why old timers eventually learn to just deliver with boring technology.

> Which is why old timers eventually learn to just deliver with ~~boring~~ buggy technology.

There's a reason why folks take the time to rewrite things in Rust. No matter how good you are at C/C++ you will encounter bugs that you would not have if you had written it in Rust.

Re: Rewriting a high performance vector database in Rust

#26
post #22
post #18

Rewriting in Rust is not a meme, it's a cycle. Before Rust became viable, rewrites were done in Go. From the archives: - Rewriting a large production system in Go https://news.ycombinator.com/item?id=6234736 (2013) - How We Moved Our API From Ruby to Go https://news.ycombinator.com/item?id=9693743 (2015) - Matrix and Riot Confirmed as the Basis for France’s Secure Instant Messenger App https://news.ycombinator.com/it…

Which is why old timers eventually learn to just deliver with boring technology.

I honestly feel like rust is boring technology in most senses of the word. It “just works” more than almost any other technology that I’ve used. The ownership system is new and different, but that’s really the only thing.

Re: Rewriting a high performance vector database in Rust

#27
post #22

Earlier quoted context omitted.

Which is why old timers eventually learn to just deliver with boring technology.

> Which is why old timers eventually learn to just deliver with ~~boring~~ buggy technology. There's a reason why folks take the time to rewrite things in Rust. No matter how good you are at C/C++ you will encounter bugs that you would not have if you had written it in Rust.

Assuming there is even a Rust library replacement to start with.

People keep forgetting C++ has 30 years of being deployed in production.

Rust is 2022 is like using C++ in 1990's in terms of ecosystem.

Re: Rewriting a high performance vector database in Rust

#28

>In addition, it’s challenging to find developers with experience in both Python and C++ So you decided on a language that makes it even harder to find experienced developers?

it is arguable that C++ in the modern days is no longer "one language" due to style, libraries, language features and code-base legacy; you have to find a coder that will fit your C++ world, not just C++

Re: Rewriting a high performance vector database in Rust

#29

>In addition, it’s challenging to find developers with experience in both Python and C++ So you decided on a language that makes it even harder to find experienced developers?

Anecdotally, a lot of rust-curious people seem to know python. Projects like pyo3 help a lot as they make it much easier (= safe) to build native modules compared to C, let alone C++.

Rust is seen as more approachable by Javascript and Python devs, so they tend to learn it more often than C or C++.

It is a lot more similar to JS than C++ is.

Re: Rewriting a high performance vector database in Rust

#30
post #27

Earlier quoted context omitted.

> Which is why old timers eventually learn to just deliver with ~~boring~~ buggy technology. There's a reason why folks take the time to rewrite things in Rust. No matter how good you are at C/C++ you will encounter bugs that you would not have if you had written it in Rust.

Assuming there is even a Rust library replacement to start with. People keep forgetting C++ has 30 years of being deployed in production. Rust is 2022 is like using C++ in 1990's in terms of ecosystem.

This is just plain false. C++ in the 1990s had nothing like serde for example.
Post reply on HN