SurrealDB – Document-graph database, for the realtime web
surrealdb.com
surrealdb.com
(I noticed as I found it jarring since I'll often select text while I'm reading it.)
EDIT/NOTE: Also, I imagine it might somewhat hurt things getting spread by word of mouth. If I wanted to share this with someone I'd naturally copy some sections, paste them into a message to someone that might be interested along with a link to the site. This isn't possibly with your landing page.
You're not the first one to make this point, so we'll get this removed from our site!
In the long run, we want to implement our own key-value store so that we can offer some of the temporal/versioning aspects (which would allow you to view your data in the graph as it appeared at a particular point in time).
For the browser, SurrealDB sits on top of a key-value store which is powered by IndexedDB, so that SurrealDB can run in the browser, using WebAssembly.
Very, very interested in chatting further about this!
I don't think the implementation of the ideas in the thesis were added to the public project in the end.
We will be working on this in due course in Rust, however, and the implementation will be completely open source!
Then with the ability to connect directly form the client application or from web browsers, you don't have to build any API layer or logic layer in front of the database. Your data access permissions and authentication sit right inside the database (only if you want of course), enabling you to build applications quickly, directly against the database.
As for direct client connections - Firestore uses that approach as well. One issue with them is that your only means of security is the Firestore Rules document, which is a single script that doesn't offer much flexibility. What I've learned from using them is that if you're going to offer a direct client-to-db interface, the rules expression needs to be pretty sophisticated. Not giving advice, that's just my perspective as a potential customer. I'll take a look through your docs and will probably try it out.
Too many waitlist things going on - I can understand the need for it, but I'm more inclined to think "Scarcity marketing" in most cases.
Of course if some new products couldn't deal with an influx of new users in a timely fashion, better to have a waitlist.
But for the first N people it should be auto-accept.
We're definitely not into the 'signup to our waitlist' product, just for marketing purposes. It's only there as some users expressed an interest in registering for it, as they didn't want to run SurrealDB themselves. Just to reiterate, all of our hosted cloud functionality is and will be available in the product which anyone can download and use for free :) !
I immediately saw "join waitlist" and came to complain.
My bad - be well :)
Some things I'd like to know more about:
- Testing strategy - Point-in-time restore? - Consistency/isolation model - Performance data - Migrations
With regards to the consistency/isolation model, SurrealDB sits on top of a number of key-value stores. By using the distributed highly-available TiKV storage backend, https://tikv.org, (and we have a FoundationDB integration in the works), the database is designed to be highly-scalable and highly-available. The same guarantees (albeit just single-node, so no high-availability or scalability) will be available with the RocksDB implementation coming this week. By sitting on top of these key-value stores, SurrealDB ensures that all transactions are ACID compliant. We don't want to go for speed (for instance by writing to /dev/null) over anything, but want SurrealDB to be a reliable and performant backend for any application. Obviously we have a way to go to catch up with PostgreSQL (launched in 1996), but we will strive to get there!
Features : https://surrealdb.com/features
The other one is the "real" filesytem api, which is not supported by most browsers. [2]
[1] https://developer.mozilla.org/en-US/docs/Web/API/File_System...
I know rxdb (am a stargazer) so I'm really interested to hear suggestions or thoughts around this area!
As far as I know, accessing IndexedDB from WebAssembly only works by passing the data through the JavaScript layer (correct me if I am wrong). So from how I think WebAssembly works, it is likely not any faster then directly doing that in JavaScript. I mean, the storage layer does not have to do any heavy computations, so tunneling the data would be more expensive then what you get from plain js.
When you store the data into an IndexedDB based key-value store, how does the querying work? Do you still use IndexedDBs secondary indexes when a query only matches a range of documents, or does the K-V store has any method to support querying a subset of the data without fetching the whole database state?
So we don't use any features from IndexedDB at all really. We literally treat IndexedDB as a key-value store interface like RocksDB or something like that. So all of the indexing is done within SurrealDB, and is stored in IndexedDB as a set of binary keys->values (Uint8Array if I remember correctly).
When we want to query a whole table, or a subset of a table, SurrealDB determines what individual keys to load or what key ranges need to be loaded to perform the query.
Would love to chat further about this - it's a really interesting area of discussion for me!
You can come to the RxDB discord for a chat if you want. I am really interessted in using WebAssembly for browser side storage.
I look forward to the day where someone reimplements IndexedDB via Webassembly, with the exact same API, so that we have a faster IndexedDB which uses the old one as storage layer :)
SurrealDB is aiming to be at the intersection of relational, document, and graph databases, whilst still remaining simple to use with an SQL-like query language, for developers coming from the relational database side. We are only at the beginning of the journey, but SurrealDB is designed to be run embedded, or in the cloud, with the ability to query it directly from a client application or from a web browser (and only access the data that you're allowed to see).
With our native client libraries (coming soon), SurrealDB will be able to be embedded within Node.js, WebAssembly, Python, C, and PHP applications, in addition to running as a server.
We wanted to create a database that people didn't have to manage, so they could focus on building applications, not the infrastructure. We wanted users to be able to use schema-less and schema-full data patterns effortlessly, a database to operate like a relational database (without the JOINs), but with the same functionality as the best document and graph databases. And with security and access permissions to be handled right within the database itself. We wanted users to be able to build modern real-time applications effortlessly - right from Chrome, Edge, or Safari. No more complicated backends.
I'm not sure how all of this compares to ArangoDB, but happy to learn!
A “Database Service” is a commercial offering that
allows third parties (other than your employees and
contractors) to access the functionality of the
Licensed Work by creating tables whose schemas are
controlled by such third parties.
So, if as a service provider, I control the schemas can the customers query the data using your SQL? Can I just collect data, put them to database and proxy their SQL to DB? i.e I'm the co-founder of Resmo (https://www.resmo.com) where we let customers run SQL on their cloud/saas assets configuration, can I use yours? The current wording seems to let me because we don't let any customer to define their schema, resources schemas are defined by us, for now.I'm sure they'd love to sell you support services, but many of these database companies do that by convincing you there is additional value, instead of trying to use licenses. I think because licenses create a scary risk that the db company might increase prices or even stop offering them altogether and you have no real recourse.
After 4 years, all of our code becomes licensed with Apache 2.0 license.
In addition, all of our libraries, client SDKs, and many of our core components are completely Apache 2.0 or MIT licensed (https://surrealdb.com/opensource).
We have a whole page describing the license here: https://surrealdb.com/license!
We would definitely like to chat if you are interested in using SurrealDB!
Would be nice to see a Jepsen test
It is however hard to perform these direct comparisons, as the functionality is pretty different to a lot of the database out there, but nevertheless it definitely is something we want to get to in due course!
One thing to note is the license, which is incompatible with OSI open-source licenses : https://github.com/surrealdb/surrealdb/blob/main/LICENSE
Effectively though we didn't want to limit the database usage in anyway except for preventing people from offering a paid-for hosted SurrealDB-as-a-Service. Some database companies offer a 'core' open source database, and then put their enterprise features behind an enterprise license (or close source them completely). We wanted to build in the open, but at the same time it is our intention to offer a cloud database version so that developers can get going really easily in due course. This doesn't mean that developers have to use it though :) !
Let me know if you have any other questions or points!
I think mongo and elastic could get away with it because they already had captive users. For illustration, I didn't really look at your offering, I went to the licencing section and just summarily disqualified. I am also unlikely to use it personal pet projects, because the learnings cannot be leverage in my paying job.
I don't think anyone will want to make a business out of the database you wrote until it gets massively popular. And it won't get massively popular if it's under a proprietary license.
Would you use another software with the same licensing restrictions as SurrealDB in SurrealDB itself?
Take my class. It starts next week: https://15445.courses.cs.cmu.edu/fall2022/
We would love to hear any suggestions or ideas in this area. Let us know in whatever way you want (https://surrealdb.com/community)!
In addition we really wanted the realtime functionality to be available when connecting directly from the browser (like Firebase), and that's something that RethinkDB didn't offer.
It really looks to me like SurrealDB could become big in the future, ambitious feature set.
DBs take a lot of time to mature, so I want to congratulate you and wish you the best
In the long run we would like to build our own single-node key-value store (based on a Concurrent Adaptive Radix tree), but this is a little way off still!
This is super. Finally there's a reason to use FoundationDB on ordinary systems.
With regards to the license we wanted SurrealDB to basically be open source, but with the only limitation of not being able to provide a Database as a Service platform. So in a business or enterprise use, there is no limit at all. You can run SurrealDB with as many nodes as you want, and as many users as you want; you can provide a hosted database internally, or to employees, contractors, or subsidiary companies. The only limitation is providing a paid-for, hosted, SurrealDB database platform.
After 4 years, all of our code becomes licensed with Apache 2.0 license.
In addition, all of our libraries, client SDKs, and many of the core components used in the database are completely Apache 2.0 or MIT licensed (https://surrealdb.com/opensource).
What’s the testing story? Do I need to connect to your servers in order to do e2e testing? Any plans to offer a mock server or anything like that?
Coming soon are Nodejs native module (with embedded database functionality), Python (with embedded database functionality), WebAssembly (so you can run SurrealDB completely in your web browser), and C (with embedded database functionality).
In due course, we want to have native integrations for PHP, Java, and Swift too (and then more to come down the line).
This will mean that you could run tests without having to connect to any external service/platform/server!
Let me know if you have any other questions!
We will definitely in due course provide some documentation and comparisons with many of the other databases out there, and also we intend to do benchmarking with the other databases as soon as we have implemented a few of the performance issues that we know about (https://github.com/surrealdb/surrealdb/labels/performance)!
In particular, the scaling abilities of your product seem to be based on the capabilities of TiKV, which itself is based on RocksDB. These are both databases in and of themselves, and if any of these two had adopted the same license as you, then you wouldn't have been able to release the product you are releasing...
We've got plans for integration into all of the big IDEs down the line, so we absolutely will add IntelliJ and DataGrip to the list.
We'll definitely want to get as much feedback in this area when we get to it, so do join the community (https://surrealdb.com/community) as we love all ideas and suggestions!
DEFINE EVENT changed ON person WHEN $before.email != $after.email THEN http::post('https://my-webhook.com', $after);
It's very flexible! We're also releasing support for the fetch() function within the JavaScript functions soon, which will enable you to do the same thing from within the embedded JavaScript functions!
I love shiny new things. However, without some sense of how this compares to alternatives, it's difficult to see why I should dive down the surrealdb rabbit hole. Feature lists are ok, but what I really want is context. Why should I care about what surrealdb can do?
That aside, we wanted to create a database that people didn't have to manage, so they could focus on building applications, not the infrastructure. We wanted users to be able to use schema-less and schema-full data patterns effortlessly, a database to operate like a relational database (without the JOINs), but with the same functionality as the best document and graph databases. And with security and access permissions to be handled right within the database itself. We wanted users to be able to build modern real-time applications effortlessly - right from Chrome, Edge, or Safari. No more complicated backends.
It's only the beginning of our journey (we're just a bootstrapped team of 2 at the moment), and we welcome all feedback!
Do you mind sharing those aspects?
You can actually see the Golang version - it's on a separate branch in the main repository.
We had written our query parser from scratch (which would read character by character). This worked well, up to a point, but was hard to extend. Building in Rust we've used the nom crate for parsing, and it has enabled us to do some pretty clever and advanced stuff with the SurrealQL query language (futures, embedded JavaScript functions, while at the same time remaining performant.
Other things we wrote from scratch (at the time), were our own binary serialisation framework (similar to MsgPack, but with slight differences and performance improvements). We then had to write our own serialisation logic on top of this, so that each data type would serialise and deserialise efficiently. With Rust, using the Serde crate, this is done completely differently, and allows us to have the same performance (or better), but with no custom writing of data tags!
In addition, many other improvements, especially around generics mainly. It made building SurrealDB much quicker, but it also means that all data passed around throughout the system is able to be reasoned about easier. Instead of brute-forcing with the race checker, you really have to have a concrete idea of how and where your data will be used. This starts out harder (fighting against the borrow checker), but in the long run it makes writing safe and performant software so much more pleasant.
I'll try and go into this in detail in one of our future blog posts!
It might have actually been worse, because there was a strong penchant for naming products starting with a "J" to indicate the fact (i.e. JNotepad, JDatabase, etc).
It might actually be a good marketing technique to get other Rust aficionados to try your product. But otherwise, there isn't any real value now that "write once, run anywhere" doesn't just belong to Java anymore.
I can run javascript in a query to this DB apparently for instance, I can't do that with java.
From the point of view of a developer: when it comes to extending the database, writing an extension in Rust might be a pleasant and welcome experience. Rust interfaces with C/Python/Javascript easily and compiles to WASM, so the code written in it can be easily reused on the front end.
What's not to like?
The simplicity of what you described means that we can release a common set of libraries with similar functionality, but using a single common library.
It is worth mentioning in my opinion mostly because that you should care that it isn't written in
- C/C++, because of security concerns
- Java/Scala/<JVM family> because embedding these languages (and this is available as an embedded database) is a pain, also because of common (though not inevitable) memory bloat.
- Python/Ruby/..., because of common performance issues (DBs being performance sensitive software)
Obviously there is perfectly good software written in all those languages, and terrible software written in rust. The the odds of it being good however are substantially increased when you find out it's written in rust because for this domain, out of the common programming languages, rust really does have the best set of tradeoffs. A landing pages goal is to give you as many signals that "this software might be worthwhile" as possible, and being written in Rust (or really not being written in pretty much every other common programming language) signals that right now.
I count 7 times. Once with the cargo install, once "built entirely in Rust", once "built with Rust", three times quoted under "Loved by Developers", and once under "Database Libraries and Clients".
Also, people should care about the language something is written in, especially in OSS, as that implies a number of things. Specifically, what the ecosystem of that language is like in terms of maturity, how easy it is for you as a developer to get started with the project, what the build tool chain is and will work in your environment.
I know I disqualify projects that I will look at purely based on the language and toolchain it uses since I know it will be harder to integrate into my companies workflows.