News for hackers. Stuff that matters.
Re:ToyDB: Distributed SQL Database in Rust by netsec_burn on Sunday July 18, 2021 @02:39PM (#27875319)
As a Rust developer (that's up to their neck in Rust projects) I'm really looking forward to a functioning sqlite clone. To the best of my knowledge, Sqlrite (https://github.com/joaoh82/rust_sqlite) was supposed to be that but it ended up diverging from sqlite. It'll make cross platform Rust builds easier.
Re:ToyDB: Distributed SQL Database in Rust by fsloth on Sunday July 18, 2021 @03:23PM (#27875786)
Sqlite has been battletested for years.

I utterly fail to see the point in reimplementing it in some other language.

Innovate in databases - yes please - but "rewrite" - why?

Not being able to use battletested libraries written in plain C (e.g. sqlite) sounds like a hugh mark against rust as a systems programming language.

Is using C libraries an actual issue or just an aesthetic grumble?

Re:ToyDB: Distributed SQL Database in Rust by mamcx on Sunday July 18, 2021 @04:18PM (#27876298)
Sqlite is probably the one C project I totally trust.

But, yeah, "cloning" projects is losing proposition (even more if open source). I wish a sqlite-like on rust? yeah, but not a clone, but in spirit (exist so much we can improve with rdbms!)

Re:ToyDB: Distributed SQL Database in Rust by pas on Sunday July 18, 2021 @03:59PM (#27876124)
Maintainability? Performance? Tighter integration into Rust projects?

Also, with using SQLite's amazing test harness, it might even make sense to claim that the Rust re-implementation is of similar quality in terms of (lack of) bugs.

Re:ToyDB: Distributed SQL Database in Rust by zie on Sunday July 18, 2021 @05:10PM (#27876712)
only some of the test harness is open source, see: https://sqlite.org/testing.html
Re:ToyDB: Distributed SQL Database in Rust by erik_seaberg on Monday July 19, 2021 @04:30AM (#27880378)
If the rewrite is distributed over a quorum and columns are strongly-typed, I’m happy to see it.
Re:ToyDB: Distributed SQL Database in Rust by simlevesque on Sunday July 18, 2021 @03:48PM (#27876027)
> battletested

Is software that is always evolving battletested ? A new version could break something.

I'm aware that sqlite has one of the best test suite in all of open source, I just wonder if something that was "battletested" is still battletested after a new release.

Re:ToyDB: Distributed SQL Database in Rust by lukevp on Sunday July 18, 2021 @03:59PM (#27876120)
I guess we can’t speak about battle testing in a new release from a “running in production with real user workloads” but if the test suite is properly implemented and has good coverage and exercises many cases and failure modes, it’s possible that a SQLite release is more battle tested on day zero than other software is when it’s been running for months or years. What do you think? A new version presumably still runs through validation before release.
Re:ToyDB: Distributed SQL Database in Rust by ithkuil on Sunday July 18, 2021 @04:00PM (#27876128)
Here's where the asymmetry of security bugs and feature bugs comes into play.

Introducing a buffer overflow in a small unused corner / edge case of the feature set allows an attacker to fully compromise the process, and it's thus a problem affecting a 100% of the users.

Introducing a behavioral bug in the same unused corner / edge case, will affect only a very small number if people (possibly none)

Re:ToyDB: Distributed SQL Database in Rust by jasonwatkinspdx on Sunday July 18, 2021 @04:06PM (#27876190)
Freezing the software is no assurance of security either. I'll take ongoing maintenance of the quality of sqlite every time personally.
Re:ToyDB: Distributed SQL Database in Rust by mirekrusin on Monday July 19, 2021 @04:19AM (#27880342)
sqlite is known for its massive test coverage with 600x+ test to source ratio [0].

[0] https://www.sqlite.org/testing.html

Re:ToyDB: Distributed SQL Database in Rust by pm90 on Sunday July 18, 2021 @02:50PM (#27875400)
I’m curious to understand what you’re looking to benefit from with a SQLite rust clone vs SQLite itself? Would it make writing apps easier? Or would it open up the internals of dB engines to rust developers? Or something else..? Honest question.
Re:ToyDB: Distributed SQL Database in Rust by netsec_burn on Sunday July 18, 2021 @03:01PM (#27875515)
I think I answered your question in my comment, no? It'll make cross platform builds easier instead of the current steps needed for FFI libraries. My experience with cross platform FFI builds are slim but last time I tried it, it was painful (versus Rust handling it all with the right toolchain).
Re:ToyDB: Distributed SQL Database in Rust by ofrzeta on Sunday July 18, 2021 @03:07PM (#27875590)
Can't be as hard as reimplementing SQLite, can it?
Re:ToyDB: Distributed SQL Database in Rust by wizzwizz4 on Sunday July 18, 2021 @03:14PM (#27875670)
But reimplementing SQLite can be done by somebody else, whereas dealing with FFI must be done by me.
Re:ToyDB: Distributed SQL Database in Rust by azornathogron on Sunday July 18, 2021 @04:26PM (#27876378)
I feel like I must be misunderstanding you... why would the FFI be done by you? The rusqlite crate provides wrappers you can use, and there are probably other wrapper crates that I haven't looked at.
Re:ToyDB: Distributed SQL Database in Rust by wizzwizz4 on Sunday July 18, 2021 @05:34PM (#27876904)
But I have to configure how it finds SQLite. Sure, SQLite specifically is fairly easy – I only need to enable the "bundled" crate feature and make sure my Clang version matches the Rust version so LTO works – but it's a little arcane to use Cargo with any non-Rust package in the dependency chain. Cargo Just Works™. Cargo with C FFI doesn't.
Re:ToyDB: Distributed SQL Database in Rust by azornathogron on Sunday July 18, 2021 @05:46PM (#27876990)
Thanks for the explanation!
Re:ToyDB: Distributed SQL Database in Rust by netsec_burn on Sunday July 18, 2021 @05:25PM (#27876820)
Not the parent comment, but I believe they're referring to the cross compilation aspects which wouldn't be resolved by just using the rusqlite crate (I use rusqlite and have this issue).
Re:ToyDB: Distributed SQL Database in Rust by hxzhao on Sunday July 18, 2021 @05:28PM (#27876845)
the RIIR fallacy, again
Re:ToyDB: Distributed SQL Database in Rust by xpe on Sunday July 18, 2021 @06:58PM (#27877447)
> the RIIR fallacy, again

AYATAINWK?

Are You Aware That Acronym Is Not Widely Known?

Re:ToyDB: Distributed SQL Database in Rust by NoahKAndrews on Sunday July 18, 2021 @07:29PM (#27877668)
I believe it's Rewrite it in Rust
Re:ToyDB: Distributed SQL Database in Rust by xpe on Friday July 23, 2021 @08:29PM (#27937326)
Ah, there is nothing like perjorative acronyms ... they seem to be designed to shut down thinking rather than invite more of it.

Let's not forget that:

1. new programming languages bring excitement, creative destruction, and yes, lots of hobby projects that don't turn into battle-tested products. I'm ok with that.

2. rewriting is not the same as re-envisioning. See the comment above. SQLite was a starting point for inspiration, not the destination.

Also, we should not conflate an underlying technology with the hype around that technology:

a. Just because there is a lot of hype around Rust does not mean the advantages of Rust should be overlooked

b. Some highly-praised technologies deserve the praise. Yes, sometimes even the cynics are wrong.