DEV Community

Cover image for 🚀 Just launched a new scalable cloud graph database! Any feedback/users/testers appreciated!

🚀 Just launched a new scalable cloud graph database! Any feedback/users/testers appreciated!

Jaime Morgan Hitchcock on August 15, 2022

My brother and I have just 🚀 launched our scalable cloud graph database SurrealDB in public open beta. We've been working on it for 7 years now, an...
Collapse
 
peteole profile image
Ole Petersen

This looks really cool!!!
Do I see correctly that the database is totally written from scratch in Rust?
The query syntax looks pretty elegant to me!
A killer feature would be a declarative schema management for me.

Collapse
 
jaimemh profile image
Jaime Morgan Hitchcock • Edited

Thank you very much @peteole! Absolutely! Written entirely in Rust from scratch. We have a schema definition language and schema migration/updating functionality on our roadmap!

Collapse
 
peteole profile image
Ole Petersen

I was looking for something exactly like this for a long time! I have a feeling there was much too little going on in the database market for the last years and a rewrite from scratch that fixes the historical issues of sql seems like the right thing we need!

Thread Thread
 
jaimemh profile image
Jaime Morgan Hitchcock

We have some really big things planned for SurrealDB and there is a lot of stuff on our roadmap. It is great to have you on the journey with us. Thank you very much for your kind words @peteole!

Thread Thread
 
peteole profile image
Ole Petersen

I imagine that. Do you also plan typesafe client libraries generated from the database schema like edgedb? Maybe it's even possible to combine a vscode extension with some typescript magic to generate response types on the fly as well as syntax highlighting (or even intellisense?) in the parameters for the query. For SQL there is sqlx doing something like that and I believe it would be really cool if you could support it natively. But I can imagine there are lots of other cool things that can be added as well :)

Thread Thread
 
jaimemh profile image
Jaime Morgan Hitchcock

Hi @peteole, absolutely! We have a GraphQL implementation with schema definition support on the roadmap. Syntax highlighting for SurrealQL is planned for Atom, Vscode, Sublime Text, and Codemirror. That’s actually a really good idea to support native compile-time parsing of SurrealQL code. This is absolutely something we can do with the SurrealDB Rust library. Are you a Rust user?

Thread Thread
 
peteole profile image
Ole Petersen

I've recently worked a bit with rust. What's a bit of an issue with the compile time parsing of SurrealQL code is that you have to somehow feed the database schema to the compiler. In sqlx it is sometimes a bit annoying that initial builds fail when opening the project since the dev database the schema is fetched from is not yet running. Maybe one could directly fetch the database schema from a declarative schema definition file? In SQL it is not that simple since you have a huge list of migrations to parse, but maybe if you define the database schema with something like graphql types it could work...

Thread Thread
 
jaimemh profile image
Jaime Morgan Hitchcock • Edited

Absolutely @peteole, and that’s where the GraphQL schema comes in. I like the idea of SQLX, but I don’t like the idea of having to connect to a remote service in order to compile the code fully. A schema declaration file should sit in your project, and enable the code to compile. This is a great idea!

Collapse
 
sp90 profile image
Simon

Honestly the coolest thing since i discovered coding, I'm actually astouned how excited it got about it.

I have one of those evil laugh powerful momemts of my career where i just felt i gain the power of a god or the like.

Im big on tooling and cant wait to make amazing tooling around SurrealDB to make it even easier to solve complex problems.

Big shoutout, well done guys!

Collapse
 
jaimemh profile image
Jaime Morgan Hitchcock

Thank you very much for the kind words Simon! We hope you enjoy SurrealDB!

Collapse
 
dodanex profile image
DODANEX

I definitely prefer GraphQL with a GUI! A single endpoint to "rull them all" and the benefits are countless... Look how far Hasura has come using GraphQL as their main service! SurrealDB can go even further.

Collapse
 
jaimemh profile image
Jaime Morgan Hitchcock

Thank you very much DODANEX!

Collapse
 
peteole profile image
Ole Petersen

As a first set of feedback running the first query from the docs using docker

DATA="INFO FOR DB;"
curl --request POST \
    --header "Content-Type: application/json" \
    --header "NS: test" \
    --header "DB: test" \
    --user "root:root" \
    --data "${DATA}" \
    http://localhost:8000/sql
Enter fullscreen mode Exit fullscreen mode

results in

{"code":403,"details":"Authentication failed","description":"Your authentication details are invalid. Reauthenticate using valid authentication parameters.","information":"There was a problem with authentication"}
Enter fullscreen mode Exit fullscreen mode

I'm pretty sure this should be fixable with a tiny bit of thinking, but it would be nice if the first example "just worked" :)

Collapse
 
tobiemh profile image
Tobie Morgan Hitchcock • Edited

Hi @peteole ! Did you start the server with --user root and --pass root arguments (to set the root username and password? Then the --user "root:root" curl argument will authenticate with this username and password.

There is also a new surreal sql command which starts a REPL, which is much easier to use than the curl command (we'll update the documentation soon using this REPL, but in the meantime you can see how to use the tool here: surrealdb.com/docs/cli/sql).

We've got many improvements coming to the docs very soon, and all feedback is extremely useful, so thank you!

Collapse
 
peteole profile image
Ole Petersen

Nope, I was just copying the command from the website:)

Thread Thread
 
tobiemh profile image
Tobie Morgan Hitchcock

Hi @peteole at the top of the page under the 'Start the server' section it should give the arguments for starting the server with a default root user.

surreal start --log debug --user root --pass root memory
Enter fullscreen mode Exit fullscreen mode

As mentioned above, we have many improvements coming to the docs soon, so thank you for the feedback ✅! Also, in the meantime, if you notice anything else, or have trouble understanding anything at all, just let us know on here or any of our other community platforms 😀!

Collapse
 
ff_wil profile image
Ulrich Scheidegger

This should do there trick:

docker run --rm -p 8000:8000 surrealdb/surrealdb:latest start --user root --pass root
Enter fullscreen mode Exit fullscreen mode
Collapse
 
greenhatman profile image
Albert Cloete

Why can't I select text on your site?

Collapse
 
tobiemh profile image
Tobie Morgan Hitchcock

Hi @greenhatman I think that's CSS that is causing that. You should be able to select the code in the code blocks though. Are there other bits of text that you want to select?