Replies: 5 comments 4 replies
-
For performance, I feel like it should not be a great concern right now. I'm not sure what is it with other people, but for me, I reach out to SQLite when I need a... good enough SQL database that is simple to use and to set up, not for performance. For development direction, I think The long-term goal of having one HTTP layer above Postgres/MySQL is cool, too. Even though something like PostgREST exists, the REST to SQL translation is not something I enjoy. I would rather have a tool like |
Beta Was this translation helpful? Give feedback.
-
I feel that quickly getting a http layer on top of sqlite/duckdb/postgres/mysql databases w optional JWT auth provides a very useful uncomplicated component that can be easily combined with various other tools. Recently the latest version of duckdb (v 0.10) provides "multi-database" support, see this announcement. The tests I have done so far getting to sqlite databases via duckdb seems to work well. The duckdb binaries used to include a REST server, but it was removed some time ago. At that point my interest in ws4sqlite/sqliterg/duckrg and friends grew stronger. I think there are go bindings available that are up-to-date... Since duckdb is great for reading but not really designed to support massive concurrent writing, this new multi-database-support allows a client to write to a database that is geared towards heavy write scenarios while at the same time reading via an optimized fast columnar database engine. A REST layer in front can expose a smaller surface for both fast write and read operations. At least I hope for it offering a way to "get the best of two worlds". Simplicity, with being able to quickly define that kind of read/write operations and then getting some auth easily, like JWT, and running this as a container provides a lightweight nimble and uncomplicated way of exposing data to other components. Since we are talking about "proxying" database engines - what are your thoughts about sometime in the future supporting the "Arrow Flight SQL" protocol? |
Beta Was this translation helpful? Give feedback.
-
Gee thanks! I also feel that there's a lot of value in simplicity - SQLite is an amazing piece of software, I don't think I need to reinvent the semantics... especially because other people already adopted a more complex approach, the mentioned So:
...with a good pinch of attention to security. I quite like this. Thanks!!
To tell the truth I am not very familiar with it. I'll look into it! |
Beta Was this translation helpful? Give feedback.
-
Regarding just adding an REST API on top of the various databases mentioned, there is already project written in go dbrest that does that. |
Beta Was this translation helpful? Give feedback.
-
This project is fantastic. Excellent work. Have you made a decision on where to focus ( For what it's worth, I'm hoping to use this with gren, which is still new and doesn't have a good story for database support yet (no TCP, can't pull in node dependencies), so ws4sqlite opens up the door for people to use a database with gren very simply, the way they are used to, with minimal dependencies. |
Beta Was this translation helpful? Give feedback.
-
After some recent developments, I've started to think about the mid-term strategy for
ws4sqlite
and its "young brother"sqliterg
.I forked
sqliterg
as a rewrite in rust, mainly to explore the benefits rust gives. They are there, for sure! And can be summed up in:Plus, I was able to break the compatibility and implement some new ideas.
On the other hand, the complexity of development is much higher. It was fun, to tell the truth, felt like solving a riddle at times, and in a good way. But when @thanhnguyen2187 asked some changes, it was a lot less fun. Rust,
rusqlite
andserde
are much more rigid to develop in, it's much more difficult to use them for things they weren't meant for.Implementing them in go(lang), on the other hand, proved very easy. Felt like a playground vs a bad day at the office.
So, I'm thinking (just thinking, I'd like to know your idea) to switch the focus back to
ws4sqlite
.About the points above:
Then, in time, the API improvements done on the
rusqlite
side would get ported back tows4sqlite
. I feel that as a tool it's still in its adolescence, so a well-documented breaking change may be acceptable.The long-term goal would then be to include support not just to sqlite but to other rdbms too, in the spirit of what @CallumDowling did for
sqliterg
and MariaDB, and @mskyttner suggested for DuckDB. Also, implement a less-basic authentication (JWT) could be useful; and - without doubts - many other things.One specific thing I'm pondering is to allow only one db to be managed for each instance of
ws4sqlite
. While the "multiple dbs" mode is cool, in practice it may not be used that much (a project is usually one db), and it makes code and - above all - configurations way more complex than they should be.So, what do you think? Is something missing? I'd really appreciate your thoughts.
Thanks for reading,
PS: Thanks a lot to @thanhnguyen2187, @CallumDowling and @mskyttner for all the ideas!
Beta Was this translation helpful? Give feedback.
All reactions