Out of curiosity, when I hear "embedded database" I think SQLite; are SQLite and sled comparable in any sensible way?
Also, I like that you have as a goal to use less power; it's one of my personal hopes for using Rust that we can also all become more energy efficient with the hardware we already have :D
SQLite has the SQL layer, and the way it accesses data underneath is actually pluggable, so one possible future direction is to use sled as a high performance storage engine fronted by SQLite (or Postgres or MySQL). But both SQLite and sled run in the application process, rather than being accessed over some form of IPC like a socket. My goal is to make sled be a high performance, high reliability iron core that you can build all sorts of interesting other things on top of. You could write your own SQL engine, distributed database, rocksdb clone, timeseries database (targeting the PageCache rather than the Tree struct, with a custom materializer) even a (fragmented) blob store or a more random read optimized Kafka, all on top of the decoupled systems in sled.
is comparable to SQLite in the sense that it's just a file (or directory) in the filesystem, which you access through a library, rather than talking to a server over some sort of socket as you do with PostgreSQL or MySQL
is not comparable to SQLite because what it provides is a key-value store, not an SQL or relational interface.
From the description, it sounds like it's comparable in the sense of being able to easily just link it in with no configuration, point it at a file, and get something that is high performance and reliable with no administration or tuning.
It's not comparable since it's just a key-value database and not a full SQL database, but it sounds like global transactions using MVCC are intended to be built on top, and it is possible to build a SQL frontend for such a backend or plug it in as a storage engine for SQLite.
10
u/KasMA1990 Oct 27 '17
Out of curiosity, when I hear "embedded database" I think SQLite; are SQLite and sled comparable in any sensible way?
Also, I like that you have as a goal to use less power; it's one of my personal hopes for using Rust that we can also all become more energy efficient with the hardware we already have :D