Rust Powered Database SurrealDB (It's Pretty Ambitious)

Поділитися
Вставка
  • Опубліковано 3 січ 2025

КОМЕНТАРІ •

  • @jaimemorganhitchcock6195
    @jaimemorganhitchcock6195 2 роки тому +587

    Wow! Thank you very much for this video Code to the Moon! Just the two of us at the moment, but my brother and I have huge plans for SurrealDB. We are working on lots of performance improvements, GraphQL integration, and our own key-value storage engine coming in due course. Thank you once again for this video!

    • @alandto3996
      @alandto3996 2 роки тому +50

      Hey just wanted to say thank you for this amazing DB keep up the good work.

    • @jaimemorganhitchcock6195
      @jaimemorganhitchcock6195 2 роки тому +29

      @@alandto3996 Thank you very much for the kind words. We certainly will!

    • @SurrealDB
      @SurrealDB 2 роки тому +23

      Thank you very much! ❤️

    • @fire17102
      @fire17102 2 роки тому +11

      Looks like a brilliant project. Would love to see key-values and websocket auth pubsub soon! 💛

    • @jaimemorganhitchcock6195
      @jaimemorganhitchcock6195 2 роки тому +11

      @@fire17102 WebSocket auth already here Tami. Live queries and pub-sub coming very soon!

  • @WolvericCatkin
    @WolvericCatkin 2 роки тому +235

    _Came for Rust, stayed because the unique abstractions in the design actually managed to make the idea of database structure actually appealing to me..._ 😹

    • @SurrealDB
      @SurrealDB 2 роки тому +15

    • @RasmusSchultz
      @RasmusSchultz 2 роки тому +4

      Is it unique? Looks like OrientDB, which has been around for a decade.

    • @codetothemoon
      @codetothemoon  2 роки тому +3

      Thanks Wolveric, glad it piqued your interest!

    • @codetothemoon
      @codetothemoon  2 роки тому +10

      OrientDB is written in Java - I'm sure it's fast, but there's kind of an upper bound to how fast it can be...

    • @AshutoshMahala
      @AshutoshMahala 2 роки тому

      Me too

  • @theherk
    @theherk 2 роки тому +132

    This looks extremely interesting. I suspect this will grow very quickly.

  • @d3j4v00
    @d3j4v00 2 роки тому +87

    A directional edge connection is the first time I've seen an arrow operator feel appropriate

    • @SurrealDB
      @SurrealDB 2 роки тому +20

    • @mkwpaul
      @mkwpaul 2 роки тому +10

      In F# you use this operator

    • @ismailmaj894
      @ismailmaj894 2 роки тому +10

      It's similar to the syntax of Cypher, the query language of Neo4j

    • @tissuepaper9962
      @tissuepaper9962 2 роки тому +5

      Arrows for marking function output types and for dereferencing a pointer to a compound object both seem appropriate to me. Just my 0.002¢

    • @codetothemoon
      @codetothemoon  2 роки тому +3

      I agree! Really the perfect operator for working with graphs

  • @DavidRutten
    @DavidRutten 2 роки тому +9

    DEFINE, CREATE, RELATE, SELECT ... all six letter commands. I *love* it.

  • @wackytheshaggy
    @wackytheshaggy 2 роки тому +15

    Ok, this is insane. I was dreaming of a DB that would do graph connections in trust to move away from neo4j , but this is amazing. An absolute killer.

    • @codetothemoon
      @codetothemoon  2 роки тому

      I agree! It definitely has massive potential.

  • @MikePeiman
    @MikePeiman 2 роки тому +16

    Thanks for posting this! I've surveyed the DB landscape wayyy too much and still, this is my first time seeing this database! VERY impressed and intrigued. Also, great job on the overview! Really concise and thorough introduction.

    • @codetothemoon
      @codetothemoon  2 роки тому

      Thanks for the kind words Mike, glad you found it valuable!!

  • @kissu_io
    @kissu_io 2 роки тому +3

    The content of your channel is real: great video + audio quality + thumbnails + transitions + rhythm and so much more.
    Really inspiring!
    Thanks for that super fast and amazing tutorial! 🙏🏻

  • @keatonhatch6213
    @keatonhatch6213 2 роки тому +2

    Holy crap. If this pans out to what it’s teaching for this could single handedly solve a lot of the database headaches.

    • @codetothemoon
      @codetothemoon  2 роки тому

      I agree! Choosing a database paradigm is really challenging, the prospect of not having to make that choice upfront will be so liberating...

  • @benext1611
    @benext1611 2 роки тому +16

    This looks really interesting. Having worked for many years with traditional SQL, and having migrated a few years back completely to NoSQL databases for speed and scalability reasons, I'm really curious to see how SurrealDB scales. If it combines the scalability of NoSQL databases with the ease and familiarity of SQL then could be a very exciting!

    • @codetothemoon
      @codetothemoon  2 роки тому +3

      Agree, it seems like the team is aiming to do just that!

  • @0xccd
    @0xccd 2 роки тому +7

    Time to start playing with the new boy in the block. Thanks for sharing.

  • @flyingsquirrel3271
    @flyingsquirrel3271 2 роки тому +11

    I'm sure this will become very popular quickly. It seems to be very well thought out and a great fit for a ton of use cases, it's written in Rust which is always a plus and it has super consistent and slick looking branding and all that. The logo looks so cool, I'm tempted to use surreal just so I have a reason for putting that sticker on my laptop :-P

    • @codetothemoon
      @codetothemoon  2 роки тому +5

      I agree Flying Squirrel! To your point - In addition to being feature packed, it has incredible branding which I feel like matters more than most technical people would like to admit

  • @dabbopabblo
    @dabbopabblo 2 роки тому +14

    at 9:15 you could of simplified the statement to be *SELECT armor:dragon

  • @ambuj.k
    @ambuj.k 2 роки тому +15

    These awesome projects like SurrealDB are a result of developers using a language in which they don't have to care about memory and bang their heads when their application segfaults. Awesome work by SurrealDB devs!!

  • @UliTroyo
    @UliTroyo 2 роки тому +4

    What a cool demo! It really showcases SurrealDB's simplicity and usability. Thanks!

  • @smdalapo2447
    @smdalapo2447 2 роки тому +2

    I am brand new to DAW and soft soft - these tutorials are excellent an very helpful to get soone like up and running. Appreciate

    • @codetothemoon
      @codetothemoon  2 роки тому +1

      Glad you found it valuable, thanks for watching!

  • @peterferguson6996
    @peterferguson6996 2 роки тому +2

    The devs fpr this project should feel proud. Its not easy to create a whole new database architecture, let alone one that leverages the benefits of it predecessors. This will catch on

    • @codetothemoon
      @codetothemoon  2 роки тому

      I agree that what they've done is really impressive! Seems like they have a ton of momentum already, hopefully it continues

  • @chamber3593
    @chamber3593 2 роки тому +35

    You guys are great and SurrealDB genuinely feels interesting. Can't wait to play with it.

  • @TommiTuura
    @TommiTuura 2 роки тому +5

    Those multi-cluster stuffs that are in "future" on surrealdb's roadmap are even more ambitious. If they can deliver on those and survive Jepsen, I'll tip off every hat to them!

    • @codetothemoon
      @codetothemoon  2 роки тому +1

      100% agree, can't wait to see how things pan out. I actually hadn't heard of Jepsen, I'm glad you put this on my radar!

  • @andythedishwasher1117
    @andythedishwasher1117 2 роки тому +3

    Thanks so much! I'm actually just beginning to get my feet wet in the backend development world, and I have to say it's a very exciting time to be doing so. I've got just enough experience with a couple other relational and graph databases to see the massive advantage of some of these features, but I've yet to really dive into Rust. I'm getting the impression that its time is coming soon, but according to the forum murmurings that's an impression that Rust has been pretty good at creating for quite some time without a lot of real progress. However, looking at the hard facts with this framework, it seems like they might finally have a real game changer on their hands. I hope it works as smoothly as it appears to.

    • @codetothemoon
      @codetothemoon  2 роки тому

      Thanks for watching! Fwiw you don't need to have any Rust knowledge to use SurrealDB! I agree it does seem like a game changer - the current version does have some of the quirks that you'd expect in any beta software, but overall it seems to work really well in its current state!

    • @andythedishwasher1117
      @andythedishwasher1117 2 роки тому

      @@codetothemoon I managed to get an instance served up locally and it worked great, but I'm wondering if it's possible to create a cloud-hosted instance through something like Google Cloud Functions or if that is something I will have to wait for until they release their cloud hosting features?

  • @sadkebab
    @sadkebab 2 роки тому +1

    This is the most interesting thing I have seen in a while in the tech world

    • @codetothemoon
      @codetothemoon  2 роки тому +1

      Same, it seems pretty disruptive if the vision fully materializes!

    • @sadkebab
      @sadkebab 2 роки тому

      @@codetothemoon yes, especially for small projects it's like having a firebase in a box, at least for me having something like this, if the security layers and event emission works properly, completely removes the need for a server between the client and the DB. And the fact that you can embed js functions into fields makes it even possible to have some business logic too (with limitations I guess)
      Definitively not the way I would use for a well structured long-term project, but for everything else I don't know... on paper it kinda fits perfectly

  • @CharlesChacon
    @CharlesChacon 2 роки тому +6

    I couldn’t believe you got that event to work just like that 👏

    • @codetothemoon
      @codetothemoon  2 роки тому +1

      Thanks, I practiced a bit before recording the video 🙃

  • @ismailmaj894
    @ismailmaj894 2 роки тому +23

    Nice video and nice product!
    For the curious, this db uses TIKV under the hood which uses RockdDB, an LSM tree based database. Cassandra uses the same technology.

    • @0xccd
      @0xccd 2 роки тому +2

      Good to know, thanks

    • @SurrealDB
      @SurrealDB 2 роки тому +15

      Thank you Ismaj. We are working on our own key-value store which will bring some additional benefits to SurrealDB in due course.

    • @CharlesChacon
      @CharlesChacon 2 роки тому +4

      @@SurrealDB ​Do you think it’s more effective to build your own storage engine right now or have a pluggable architecture?
      I ask because there’s several features that I think would be great if users had a choice and they seem complex to implement in that way out of the box, so if users can choose the right storage engine for their use-case, it would probably be better.
      Some of the feature choices I’d like to see are LSM vs. b-trees, enabling/disabling record versioning for time-series data, enabling/disabling zero-copy for websockets (I really want something to dethrone Kafka that will integrate natively with a primary data store (Sorry, Redis. Keep dreaming)), and compression algorithm choices. Some of those aren’t even really in current storage engines, so I’d be really interested to see how they can be implemented.
      I’ll certainly be keeping an eye on this project. Wish you the best of luck!

    • @SurrealDB
      @SurrealDB 2 роки тому +8

      @@CharlesChacon We always intend to support lots of pluggable storage engines to give developers the choice. Our own key-value store will enable us to offer additional functionality down the line that we can't currently do with the current architectures out there.

    • @codetothemoon
      @codetothemoon  2 роки тому +1

      Thanks, and thanks for the info - I wasn't aware of TiKV's relationship with RockDB!

  • @AK-vx4dy
    @AK-vx4dy Рік тому +1

    Really strong stuff you serving today!
    Authors really taked their code to the moon 😄

  • @BryanChance
    @BryanChance 2 роки тому +2

    There’s a JVM based multi-storage mode database called OrientDb. They have the same concepts/similar concepts. Distributed fault tolerant. Document store, relational, and graph, schema is optional, integration with kafka, and more. Uses SQL variant for query. The documentation is a bit lacking though.

    • @codetothemoon
      @codetothemoon  2 роки тому +1

      Nice, this actually wasn't on my radar. How does it stack up performance-wise?

    • @BryanChance
      @BryanChance 2 роки тому +1

      @@codetothemoon I haven't done any performance testing. The backend storage engine is very robust and a lot of integration with other systems like Kafka, MQTT, etc. It's a pretty "featureful" database.

  • @vervedonk
    @vervedonk 3 місяці тому +1

    This is an amazing video on introduction to it's concept, beautiful.

  • @CypElf
    @CypElf 2 роки тому +11

    This looks very promising!

  • @StarOnCheek
    @StarOnCheek 2 роки тому +7

    Looks like I found a new go-to databse for prototype projects (and non-prototype ones once it matures a bit)

  • @apidas
    @apidas 2 роки тому +6

    tbh I can't wait what sorts of projects the community will come up with now that we have rust

    • @codetothemoon
      @codetothemoon  2 роки тому +1

      agree, there are so many interesting Rust-powered projects popping up, even CLI tools to replace ones that have been around for decades...

  • @howdyhowdyhowdyhowdyhowdy
    @howdyhowdyhowdyhowdyhowdy 2 роки тому +14

    It's pretty SURREAL that a database engine like this exists... Too bad I work as a front end dev and never have to deal with databases

    • @avidrucker
      @avidrucker 2 роки тому +1

      Perhaps this tech could have some side-project potential for you?

    • @codetothemoon
      @codetothemoon  2 роки тому +1

      It's ok, given that there seems to be a new JS framework every day, there's bound to be a SurrealJS at some point... 🙃

    • @etcode
      @etcode 2 роки тому

      You can start creating your side projects with Nodejs just for fun :D and connecting with SurrealDB

  • @gioac96
    @gioac96 2 роки тому +3

    I'd like to know more about row-based permissions and end-user authentication features. They are both mentioned on their website as features of the DB, but I can't find any documentation about these features.

    • @codetothemoon
      @codetothemoon  2 роки тому +2

      There are definitely some gaps in the documentation. But the SurrealDB team is really responsive and helpful on their Discord server, maybe try getting help there!

    • @gioac96
      @gioac96 2 роки тому +1

      @@codetothemoon that’s a good idea! I’ll definitely check it out. I really hope they transition to a documentation first approach, good documentation is fundamental for stuff like frameworks and databases. Thank you for the tip though!

  • @wedding_photography
    @wedding_photography 2 роки тому +13

    If they manage to do the websocket part, it will immediately become much more useful.

  • @thomascorbin5371
    @thomascorbin5371 2 роки тому +1

    Fantastic video, loved it. I will be playing with it this afternoon.

    • @codetothemoon
      @codetothemoon  2 роки тому

      Thanks Thomas, let us know how it goes!

  • @TobiasFrei
    @TobiasFrei 2 роки тому +1

    First vid I watched *exploring* SurrealDB.
    Looks like something I gotta know, being a big PostgreSQL fan.
    Thanks :)

  • @justineroanpacia7436
    @justineroanpacia7436 2 роки тому +2

    looking forward to learning from the rest of your videos. Subscribed!

    • @codetothemoon
      @codetothemoon  2 роки тому +1

      Thanks Justine, very happy to have you onboard!

  • @BarakaAndrew
    @BarakaAndrew 2 роки тому +3

    I love it. Gotta test this

  • @popplestones886
    @popplestones886 Рік тому +1

    The event thing was crazy, amazing

  • @HotRatsAndTheStooges
    @HotRatsAndTheStooges 2 роки тому +3

    Absolutely revolutionary. Got a question about the performance of the edge queries - while most were in the 100 microsecond range, the edge queries were in the 500 microsecond range. Does that give anyone pause? I have no idea how this stacks up with other graph database tech so it could be a nitpick.

    • @codetothemoon
      @codetothemoon  2 роки тому +3

      Great question - I hadn't delved too deeply into performance benchmarks. In the docs they openly state that the performance currently doesn't yet quite stack up to the more established databases, so I'm wondering if we should wait for a more stable release before reading too deeply into them. Definitely something to keep tabs on though, and it's not unreasonable to be cautious about types of queries that seem to be slow in the beta.

  • @VixieTSQ
    @VixieTSQ 2 роки тому +6

    I'd really like a nice way to represent rust style enums in my database. I've never seen a database do that before. I would use Surreal for everything if I could do that

  • @OldKing11100
    @OldKing11100 2 роки тому +7

    I like the idea behind this. I'm just not sure if it'll fit any of my projects. I have things split into three distinct layers SvelteKit (Cloud Edge Deploy) -> FastAPI (Local Python Microservices) -> PostgreSQL (Local DB). Mostly I prefer the DB to be as plain as possible which is just storing the data and the Local Microservice layer handles Auth, Data validation, some caching, etc, etc. This means what I'd really be looking for if I was switching to a new GraphDB is a Rust or Python equivalent of FastAPI to connect to SurrealDB. It'll be interesting to watch this project grow and see what other utilities pop up from this.

    • @jaimemorganhitchcock6195
      @jaimemorganhitchcock6195 2 роки тому +11

      Hey Matt! I understand your tech stack position. We have some awesome things planned for SurrealDB so hopefully we can sway your mind in due course 😀

    • @elephant_888
      @elephant_888 2 роки тому +4

      @@jaimemorganhitchcock6195 If you get full-text search in there, I’ll bite!! 😄👍🏽

    • @elephant_888
      @elephant_888 2 роки тому +4

      Just checked the Docs and I'm blown away by the full-text support. I'm blown away by everything actually. They actually have a bunch of drivers and great extensibility points. Wow!!

    • @codetothemoon
      @codetothemoon  2 роки тому +2

      It's probably not a good fit for every use case, especially when one db paradigm can handle all of your access patterns and you don't need the built-in auth and REST APIs that Surreal has. But yeah I agree it'll be cool to see how the project develops!

  • @Ratstail91
    @Ratstail91 2 роки тому +5

    Wow that looks bonkers good!

  • @richsadowsky8580
    @richsadowsky8580 2 роки тому +1

    This is very interesting to me. The features are indeed ambitious but quite compelling. Would require a lot of testing before using it in a production product I suspect but I want to try it in my normal research and experiments code. As usual, well explained and informative.

    • @codetothemoon
      @codetothemoon  2 роки тому +2

      I think SurrealDB is really interesting too, but yeah I wouldn't use it in production quite yet. I'm definitely looking forward to watching how the project develops!

  • @singhsaubhik
    @singhsaubhik 2 роки тому +2

    This is such an informative video. Thanks for creating. I am going to try myself.

    • @codetothemoon
      @codetothemoon  2 роки тому +1

      Thanks Singh! Fantastic that you are going to start creating! Please let me know if there's anything I can do to help.

    • @singhsaubhik
      @singhsaubhik 2 роки тому

      @@codetothemoon Thanks for replying. Will definitely do 😊.

  • @theemeepeek2947
    @theemeepeek2947 2 роки тому +1

    This feels surreal. The web UI seems not ready yet but the project is interesting.

    • @codetothemoon
      @codetothemoon  2 роки тому

      Surreal indeed! Yeah my understanding is that the UI will be available relatively soon.

  • @Flackon
    @Flackon 2 роки тому +3

    Reminds me a bit of datomic but in rust...
    How long until it’s production ready?

    • @jaimemorganhitchcock6195
      @jaimemorganhitchcock6195 2 роки тому +4

      Hi I! We’ve already been building production applications on it for a few years now. However we are looking to release the stable Version 1.0.0 really soon!

    • @codetothemoon
      @codetothemoon  2 роки тому

      hadn't heard of datomic, thanks for putting it on my radar!

  • @philippefutureboy7348
    @philippefutureboy7348 2 роки тому +3

    Looks amazing!
    As a data analyst/engineer the one thing I really want to know is: Does this support complex joins, subqueries & cte?

    • @codetothemoon
      @codetothemoon  2 роки тому +3

      My understanding is that it aims to support all of the complex types of queries you'd expect to be able to perform on a traditional relational database. JOINS specifically are eliminated as you are expected to use record links, graph edges and FETCH instead, but you can achieve basically the same thing. I believe subqueries are currently supported (but maybe ask on the SurrealDB discord server to be sure). Not sure to what level CTE-like patterns are currently supported or what is planned there, again maybe check with Tiobe and Jaime.

  • @nataliaavella7185
    @nataliaavella7185 2 роки тому +3

    It’s totally worth learning new skills cause then you get excited and confident to create

  • @thanupoptiphueng7225
    @thanupoptiphueng7225 2 роки тому +4

    After web framework galore we now have database galore

    • @elephant_888
      @elephant_888 2 роки тому +2

      For reals!! This is getting ridiculous!! 😂

    • @codetothemoon
      @codetothemoon  2 роки тому

      Hah yeah, I'm skeptical of all new projects - JS, Database, or otherwise - but this one really seemed to stand out from the crowd.

  • @stojadinovicp
    @stojadinovicp Рік тому +1

    As soon as LIVE queries are implemented, I am switching for sure :)

  • @CrapE_DM
    @CrapE_DM 2 роки тому +1

    I'll definitely be trying this out on my personal app later!

  • @Nathan00at78Uuiu
    @Nathan00at78Uuiu 2 роки тому +5

    Super cool. I just need to figure out how to use this at work.

    • @jaimemorganhitchcock6195
      @jaimemorganhitchcock6195 2 роки тому +4

      Hi Nathan. Thank you very much. Join the Discord or GitHub if you have any questions - surrealdb.com/community

    • @codetothemoon
      @codetothemoon  2 роки тому

      Convincing others to buy in is the hardest part! Even for game changing technologies.

  • @davidhsv2
    @davidhsv2 2 роки тому +3

    That's super cool; thanks for bringing this!

  • @isheanesunigelmisi8400
    @isheanesunigelmisi8400 2 роки тому +9

    Could we say that this is SURREAL

  • @LewisCowles
    @LewisCowles 2 роки тому +2

    This is cool and interesting. I might try it out, but I’ll be keeping work with single databases for their specified purpose.

    • @codetothemoon
      @codetothemoon  2 роки тому +1

      Nice, yeah definitely something to explore but probably not ready for production yet. Also, I see you are a fellow Babylon 5 fan!

  • @simian3455
    @simian3455 2 роки тому +5

    I'm starting to see more Obsidian in rust dev videos... I'm inclined to think you guys have super meaty brains... 🧠
    side note let me know if someone is making Obsidian in Rust... so I can meme about it.

    • @simian3455
      @simian3455 2 роки тому +1

      @@leeroyjenkins0 Obsidian MD is not open source, so I don't know what it's written in and note-taking being called a fad is funny can't tell if you're trolling or legit.

    • @codetothemoon
      @codetothemoon  2 роки тому +2

      Funny story about why I used Obsidian for this - there isn't any readily available SurrealDB SQL syntax highlighting, so I had to hack Obsidian to use the same custom JavaScript syntax highlighting that the SurrealDB website uses 👍

  • @zahawolfe
    @zahawolfe 2 роки тому +5

    This is super cool, would love to check it out

    • @jaimemorganhitchcock6195
      @jaimemorganhitchcock6195 2 роки тому +3

      Thank you Zaha! Join the Discord or GitHub if you have any questions - surrealdb.com/community

    • @codetothemoon
      @codetothemoon  2 роки тому

      Yeah I think it's worth a look!

  • @orlevi530
    @orlevi530 2 роки тому +1

    This is absolutely the level up!

    • @codetothemoon
      @codetothemoon  2 роки тому

      I agree, the SurrealDB team is moving mountains!

  • @mistariel6227
    @mistariel6227 2 роки тому +3

    This is really cool and all, but when evaluating new things to work with, "version control" is the first thing that comes to mind... if this can be easily integrated into Git-like repos, it'd be a gamechanger for me. Also... localization... and transaction support across tables.

    • @codetothemoon
      @codetothemoon  2 роки тому +1

      Agree, version control is huge, and I'm not sure if Surreal plans to support it. At one company we had implemented our own homegrown version control inside Postgres, and the number of bugs and general pain it caused over many years was hard to fully quantify. It'd be nice to have something like that built in to the database.

  • @Jamiered18
    @Jamiered18 2 роки тому +3

    I love it, except for one thing: is there a simplified schema definition syntax? I support defining strong schemas, but the code for doing it looked really verbose, too wordy vs normal SQL

    • @codetothemoon
      @codetothemoon  2 роки тому +2

      yeah afaik this is currently the only way to do it, at least the only way that exists in the documentation. The team seems really receptive to feedback, maybe hop on their discord and shoot them a message!

  • @informationpost
    @informationpost 2 роки тому +2

    Looks like a great product. Thanks. How to we do a full text search on a field? Is it efficient (unlike oracle search where % wildcard or any text partial search will kill the efficiency while search?)

    • @codetothemoon
      @codetothemoon  2 роки тому +1

      The docs mention support for full-text indexing, but I'm not sure exactly the steps required to enable that for a field (maybe just create a specific type of index on it?). The docs do appear to have some holes in them at the moment, but the team is extremely responsive and helpful on their discord server, maybe drop in and ask them!

    • @informationpost
      @informationpost 2 роки тому +1

      @@codetothemoon Thank you!!

  • @gorudonu
    @gorudonu 2 роки тому +5

    I really like what I'm seeing, I just hope it won't end up like rethink db

  • @animedreamz2009
    @animedreamz2009 2 роки тому +1

    This looks pretty interesting. I’ll have to play with it some

  • @faucillon
    @faucillon 2 роки тому +1

    SurrealDB seems very interesting. If I ever am granted the luxury of time I'll gladly experiment a bit.

  • @Rundik
    @Rundik 2 роки тому +2

    How scalable is this? What read/write performance does it have comparing to postgres? Did they pay for a security audit?

    • @codetothemoon
      @codetothemoon  2 роки тому +1

      The current scalability story seems to be pretty good. They've stated in their docs that performance isn't up to par with the more established databases yet (I believe they specifically use Postgres as an example). I'm not sure how much security auditing they've done, but I'd imagine they'd wait to do that until a more stable release (as opposed to beta).

  • @titiloxx
    @titiloxx 2 роки тому +2

    Summary:
    Surreal DB is a new database that aims to take the best aspects of each major database Paradigm and combine them all into one database. It is schema-less by default, has a sql-like query language, and supports record links to establish relationships between records in different tables. It also has a graphql-like query language for fetching data from multiple tables at once, and supports websockets for real-time updates.

  • @BrianMelancon
    @BrianMelancon 2 роки тому +2

    I'd love to see a video showing how to use it with Rust. The documentation doesn't seem to exist yet.

    • @codetothemoon
      @codetothemoon  2 роки тому +1

      Good idea, I've added it to the video ideas list! There are definitely some gaps currently in the documentation. But the SurrealDB team is really responsive on their Discord server, you might try getting help there!

  • @lahtinenk
    @lahtinenk 2 роки тому +2

    I have a soft spot for databases and SurrealDB sounds very interesting. I must say that I have often problems with joins, so not needing it sound great. I am not proficient with rustlang yet, so I wonder if I cound use some other language with SurrealDB?

    • @codetothemoon
      @codetothemoon  2 роки тому +2

      Kimmo - absolutely, I believe they have client libraries in several other mainstream languages. No Rust knowledge necessary.

  • @seannewell397
    @seannewell397 2 роки тому +2

    When doing an UPDATE what happens? Are migrations with an up/down still advised? Any gotchyas or considerations about what are 'safe' migrations?

    • @seannewell397
      @seannewell397 2 роки тому +3

      Any defining a schemafull table locks us in!? Oh yikes.

    • @jaimemorganhitchcock6195
      @jaimemorganhitchcock6195 2 роки тому +4

      @@seannewell397 Hi Sean. Please could you clarify what you mean by 'migrations with an up/down'.

    • @codetothemoon
      @codetothemoon  2 роки тому

      Jaime I think he is referring to automatic schema migrations like what FlywayDB does in the traditional SQL world. Sean - correct me if I'm wrong about this 😎

  • @scottspitlerII
    @scottspitlerII 2 роки тому +5

    Thank you for this video,
    You rock!

  • @codeecubix
    @codeecubix 2 роки тому +1

    concept is cool. Is that micro second in units or millisecond?

  • @seannewell397
    @seannewell397 2 роки тому +2

    You mention Events being used for real time updates to users via websockets, is that use case one with an example in the SurrealDB docs? Is it something we can build out in Rust? Is it better to directly interface with SurrealDB's API?

    • @jaimemorganhitchcock6195
      @jaimemorganhitchcock6195 2 роки тому +4

      Hi Sean. As mentioned on my other comment, we are working on the Rust client to connect Rust with a SurrealDB server. However you can already use the database library itself embedded in Rust. Not sure if that answered your question or not, but let me know!

    • @codetothemoon
      @codetothemoon  2 роки тому

      Might be making a Rust integration tut for SurrealDB at some point...

  • @horaciomlhh
    @horaciomlhh 2 роки тому +4

    looks amazing!

  • @RootsterAnon
    @RootsterAnon 10 місяців тому +1

    Can we get update on it since whole year passed. Maybe to cover updates and upgrades? Very nice video.

    • @codetothemoon
      @codetothemoon  10 місяців тому +1

      thank you! actually currently working on a new video that will feature SurrealDB (but won't focus specifically on it). I'd love to do another full video including all of the new stuff since this one, we'll see if it bubbles to the top of the video idea list 😎

  • @alystair
    @alystair 2 роки тому +2

    Looks incredible but would love to see a perf / scaling follow up to really get a better feel of how SurrealDB stands up in real life scenarios

    • @codetothemoon
      @codetothemoon  2 роки тому

      I'd love to do such a follow up, but I might wait until it goes 1.0 to do so!

    • @nobytes2
      @nobytes2 2 роки тому

      Most production dbs are written in c, and tested throughout decades. It will be extremely difficult to beat performance but you never know.

    • @eliottveyrier6253
      @eliottveyrier6253 2 роки тому

      @@nobytes2 well-written rust is potentially faster than C due to the rust compiler having more information to make agressive optimisations

    • @nobytes2
      @nobytes2 2 роки тому

      @@eliottveyrier6253 show data or else stop making guesses, "potentially" lmao 😂

    • @eliottveyrier6253
      @eliottveyrier6253 2 роки тому

      @@nobytes2 "potentially" because it's not automatically faster, it depends on what you write, but for the same code in c and in rust you will either have rust and C roughly equal (same llvm backend) or rust faster because the compiler has more information to prove more things about the program and use more agressive optimisation. If you want data you can look for it yourself you have Google too.

  • @Khari99
    @Khari99 2 роки тому +8

    It’s pretty cool for a multi-model approach. Right now I’ve switched to graphs exclusively because moving away from SQL and tables has been easier for me. I haven’t seen the need to keep them.

    • @jaimemorganhitchcock6195
      @jaimemorganhitchcock6195 2 роки тому +2

      Graph is definitely the future @Khari99! That is exactly why we wanted to merge Graph with traditional database concepts.

    • @Khari99
      @Khari99 2 роки тому +1

      @@jaimemorganhitchcock6195 I understand the desire to combine different DB models. A better metaphor for how I see this is sticking with a hybrid vehicle instead of going full electric because it’s assumed that having both gas and electric together is more convenient. Convenient sure but is it a better design? I don’t believe so. Currently the database I mainly use is Dgraph. I’ll see how Surreal compares but I haven’t found anything that’s close that simplifies my architecture as much as Dgraph.

    • @jaimemorganhitchcock6195
      @jaimemorganhitchcock6195 2 роки тому +3

      Dgraph is definitely a cool database @Khari99. With regards to multi-model, we wanted to ensure that SurrealDB was easy-to-use coming from all different database backgrounds. In addition, the design is such that the performance isn’t affected regardless of what data model you use in SurrealDB - obviously there are no JOINS, so SurrealDB is definitely closer to MongoDB/Dgraph as a concept. We have some really great things planned on our roadmap, so hopefully we’ll sway your mind in the not-too-distant future 😊!

    • @Khari99
      @Khari99 2 роки тому +2

      @@jaimemorganhitchcock6195 While I like Dgraph a lot, I don't think it's perfect. Outside of the GraphQL API, I feel like there are a lot of ideas that you can pick up on to make SurrealDB better.
      1. Automatically generated CRUD queries from a schema definition. I've only seen this implemented with GraphQL so I don't know if this is possible for your architecture. But this significantly reduces how much code needs to be written and maintained in the server.
      2. Implement lambda functionality. Dgraph has a philosophy of moving the DB to the middle layer and allowing queries to trigger lambdas that either run custom computations or can reach out to a server externally for some request if needed. I really like this approach as it helps further reduce architectural complexity. But right now I'm limited to JavaScript lambdas. Rust lambdas would be amazing.
      3. Auth & Access Control patterns. I looked through the documentation for Surreal and haven't seen anything around this topic. I understand the philosophy of leaving this up to server logic but if these features are baked into the database, it's one less thing for me to worry about. Even though I moved away from Fauna, they have this integrated into their DB, which is why I tried them out in the first place.
      4. Logical Inference Rules. I've only seen these implemented in TypeDB. one of the things that Dgraph is missing that almost makes me want to develop a DB in Rust myself is the ability to create a knowledge graph intuitively. If you could look into how TypeDB accomplishes this and think of a similar implementation, this would be awesome.
      5. Indexes. I also didn't see this in the documentation. Dgraph has indexes that enable full-text search (along with many other index types) out of the box. I would rather not have to implement elasitcsearch separately.

    • @codetothemoon
      @codetothemoon  2 роки тому

      This is really cool, I haven't heard of many folks switching from pure relational to pure graph!

  • @azdy68
    @azdy68 2 роки тому +3

    can i migrate stuff out of surreal db to a typical sql database or not ?

    • @jaimemorganhitchcock6195
      @jaimemorganhitchcock6195 2 роки тому +5

      Hi Rea. There are close similarities with traditional SQL, but the way that record IDS and foreign keys are stored are different. We plan to work on a realtime sync-connector/importer so that you can import data easily into SurrealDB from Postgres/MySQL/MongoDB/RethinkDB in due course.

    • @avidrucker
      @avidrucker 2 роки тому

      ​@@jaimemorganhitchcock6195 [EDIT] Thank you for clarifying! 👍🤓

    • @jaimemorganhitchcock6195
      @jaimemorganhitchcock6195 2 роки тому +3

      This isn't possible at the moment Rea!

    • @codetothemoon
      @codetothemoon  2 роки тому

      Sounds like it's not available now but I imagine there are droves of folks with the same need, I'd be surprised if this isn't one of the higher priorities of the team.

  • @elephant_888
    @elephant_888 2 роки тому +2

    *Woah!!* Any plans to support full-text search?

    • @elephant_888
      @elephant_888 2 роки тому +2

      Just checked the Docs and I'm blown away by the full-text support. I'm blown away by everything actually. They actually have a bunch of drivers and great extensibility points. Wow!!

    • @codetothemoon
      @codetothemoon  2 роки тому +1

      I believe it is already supported!

  • @learning_rust
    @learning_rust 10 місяців тому

    @5:47 It works for me with SELECT math::sum(strength) FROM player GROUP ALL; (I'm using version 1.2) - so use GROUP ALL, rather than GROUP BY ALL

  • @ENBYSS
    @ENBYSS 2 роки тому +2

    Personally I think I'm waiting tor the interface to be implemented. Currently using PocketBase and it's great to use - but I'm always keeping an eye out for alternative to broaden my horizons. SurrealDB looks great - but the lack of a UI right now is keeping me away still. Hopefully soon!

    • @codetothemoon
      @codetothemoon  2 роки тому +1

      I haven't yet tried any of the "*bases", keep hearing good things about them. I agree the UI will be a game changer - the screenshots look really nice

  • @hayderabbas6162
    @hayderabbas6162 2 роки тому +1

    Mylosp just a legend really aren’t ya

  • @gsilva877
    @gsilva877 Рік тому +1

    Good to know, looks very interesting, I will still use the rock solid postgres but this kind of project can have they use cases

  • @lindblomdev
    @lindblomdev Рік тому +1

    I'm curious about the what kind of backup solution they have. Over the years many databases and come and gone, all promising to be easy turn key solution to all problems. But when you start to look at them more in detail, as you do when you use them for real project, you always find that the old databases have these "complexities" for reasons not apparent initially.

    • @codetothemoon
      @codetothemoon  Рік тому

      I think this healthy skepticism is a great way to approach new databases like this, and one that I had going in as well. During the time I immersed myself in it, I tried to uncover any gaps between its promises and what it delivers, and I couldn't find any. That's not to say there aren't any, just not any that I could find. The biggest issue I ran into was missing / incomplete documentation, which I'm confident will be addressed. YMMV

    • @monlewi1976
      @monlewi1976 Рік тому

      it's still full of bugs

  • @juangiordana
    @juangiordana Рік тому

    What kind of font are you using? It looks so nice!

  • @usmanridwanadekola3532
    @usmanridwanadekola3532 2 роки тому +1

    Very helpful, and surprisingly therapeutic

    • @codetothemoon
      @codetothemoon  2 роки тому

      Nice, glad you liked it! "Therapeutic" is something I'm very happy to have achieved!

  • @PrakharMishra150290
    @PrakharMishra150290 2 роки тому +1

    Can you please also tell us for what purpose it can be used. For example, RedShift can be used for data warehouses, MySQL can be used as you traditional DB, as well as your reporting DB, Dynamo DB can provide you fast partition based access, so it can be used where the application would like to get / set single partition data. In which category would you like to put Surreal DB in?

    • @FireFish5000
      @FireFish5000 Рік тому +1

      The category that wants more PR bc they have no real users or sane use cases. The one where something as important as a database is supposedly written and maintained by 2 brothers. The category you'd be insane to use for anything be it production or hobby or even just looking more into it than this. Choose a well established, tested, stable db like a sane person. Not one showcasing random coder's praise of them and every 3 star project using them on their site. Databases are not the place to try experimental software, look for tested and reviewed software instead.
      Take CM with a grain of salt, small channel and recommending a lot of new projects with no user base or sane use case bc they were paid to do so. In fairness to CM, they have kept these sponsored videos separate from their more general fast tutorials and made it clear they are sponsored from the getgo.
      In fairness to me and my criticism. CM did outright recommend it to their entire audience without explicitly pointing out its obvious week points like lack of a community or any large company production use and likely lack of testing due to such. They only covered competitors like PostgreSQL's weaknesses. Very obviously bias and thus inherently dishonest (as in not telling the truth they know) review which is very disrespectful to their audience

    • @monlewi1976
      @monlewi1976 Рік тому +1

      i looked for this comment, after all thus hype i decided to replace sqlite db in my backend...and omg... this surreal db has so many bugs and issues i recon it will not be ready to any serious prod deployment in next 1-2 years, seriously...

  • @jessenutt7891
    @jessenutt7891 Рік тому +1

    Keep up the good work!

  • @xadrec
    @xadrec 2 роки тому +1

    Interesting new DB, love Rust too.

  • @sufidukan1643
    @sufidukan1643 2 роки тому +1

    ti (the instrunt into the channel rack) and then it crashes the soft soft... Can soone help please?

  • @BrazilMentionedHueHue
    @BrazilMentionedHueHue 2 роки тому +6

    Does it have some kind of migration tool to help migrations versioning?

    • @jaimemorganhitchcock6195
      @jaimemorganhitchcock6195 2 роки тому +6

      Not just yet, but we are working on migration and sync connectors from Postgres, MySQL, MongoDB and RethinkDB.

    • @CharlesChacon
      @CharlesChacon 2 роки тому +4

      @@jaimemorganhitchcock6195 I think this refers more so to schema migrations/versioning. Aside from the under-the-hood capabilities, I think this would be one of the top feature requests

    • @codetothemoon
      @codetothemoon  2 роки тому

      Good question, for many people using Surreal will surely be dependent on this!

  • @ahmadumar6210
    @ahmadumar6210 2 роки тому +1

    thanks for your stuff, do you have any recommendable rust course?

    • @codetothemoon
      @codetothemoon  2 роки тому

      I haven't heard of any courses for SurrealDB yet - it's still very new, but I'm sure there will be one before too long.

  • @Caigga900
    @Caigga900 2 роки тому +2

    Great video, thanks for sharing. SQL novice here, would you mind sharing the SQL/SurrealDB queries? Would love to look them over to better understand.

    • @codetothemoon
      @codetothemoon  2 роки тому

      Thanks - unfortunately I don't have the queries posted anywhere, but you can check out README.md on the SurrealDB GitHub repository for some good examples!

  • @catholic_zoomer_bro
    @catholic_zoomer_bro 2 роки тому +4

    I'm ready to marry this db

  • @zzej
    @zzej 2 роки тому +2

    how would I host this and not have to worry about scalability? thanks for the video!

    • @jaimemorganhitchcock6195
      @jaimemorganhitchcock6195 2 роки тому +5

      Hey Osej! Currently you can run SurrealDB on top of TiKV (tikv.org) which would enable you to scale your data to 100+TB if you need. We're going to be improving our documentation on our site soon so that it makes this easier to get started with, but for the moment head to the bottom of this page: surrealdb.com/docs/start/starting-surrealdb

    • @codetothemoon
      @codetothemoon  2 роки тому

      Looks like you got an answer directly from Jaime 😎

  • @DevTheo1
    @DevTheo1 2 роки тому +1

    Super interesting.. thanks for sharing!

  • @alystair
    @alystair 2 роки тому +1

    Is there a way to change the schema without going schema-less?

    • @codetothemoon
      @codetothemoon  2 роки тому

      I believe you can do this, but I can't remember if I actually tried it.

  • @pandalqmb4408
    @pandalqmb4408 2 роки тому +1

    onto the software. I'd like to make soft from my ukulele, keyboard, etc., but don't know how to transfer. Do I need a microphone or

    • @codetothemoon
      @codetothemoon  2 роки тому +1

      SurrealDB thankfully doesn't require a ukelele, keyboard or microphone. Unless you're using it to store your band's music

  • @santiagodonoso
    @santiagodonoso 2 роки тому +1

    Do you know how to get the attributes that can be SET in a RELATE?

    • @codetothemoon
      @codetothemoon  2 роки тому

      not sure off the top of my head, maybe drop into the SurrealDB discord server and ask! They are really responsive.

  • @WorstDeveloper
    @WorstDeveloper 2 роки тому +2

    This DB looks really interesting. I would love to try it for a future Rust project.
    Does it cost anything to use? Is it available at any existing cloud hosting provider?

    • @codetothemoon
      @codetothemoon  2 роки тому +2

      Nice! It's completely free to download and host however you like. But SurrealDB is aiming to also provide a managed cloud version of it that comes at a cost, which I imagine will be a pretty compelling value prospect.

    • @yegorzakharov8514
      @yegorzakharov8514 2 роки тому

      You can run it yourself in a docker container on a VPS. Should be pretty simple.

  • @gordonsau2989
    @gordonsau2989 2 роки тому +1

    Is it just the special query language and the websocket real time updates that makes it different from normal SQL databases? Everything it can do in this video can also be done in normal SQL databases. Also, is it ACID?

    • @codetothemoon
      @codetothemoon  2 роки тому

      I think the main differences from traditional SQL databases are
      * Under the hood it is a key-value store, which allows for basically infinite horizontal scalability because it lends itself well to sharding. Traditional SQL databases need something like Vitess to do this
      * It supports graph operations
      * Strict schemas are supported but not required
      * Supports REST endpoints and end user auth out of the box
      I'm probably missing something else but those are the first ones that come to mind. More broadly though, choosing a database paradigm is currently one of the most impactful decisions in any software project, and making the wrong choice can lead to immense amounts of pain. The main value of SurrealDB is that it is aiming to be aiming to be a jack of all trades, such that it can support any unforseen use cases that might arise after a database has already been chosen. For example - if initially a project just requires a KV store but a few years later a new feature requires a relational database. SurrealDB gotchu.
      And I believe it is ACID, but check the docs and/or ask on the Discord server to keep me honest.

  • @jeffg4686
    @jeffg4686 Рік тому

    Can this access the file system from functions? Thinking in terms of writing files to other storage.
    Would love a tutorial on the graph queries if you have them down. They can twist your mind when not familiar with the syntax.