Announcement

Collapse
No announcement yet.

Limbo Is An SQLite-Compatible OLTP DBMS Leveraging IO_uring & Rust

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by patrick1946 View Post

    I would say Sqlite is a Database but it is not a DBMS. The application is managing its data with Sqlite. So it does something DBMS cannot do well.
    Probably a better description, yes.

    Comment


    • #32
      Originally posted by patrick1946 View Post

      Sqlite is a library for accessing databases. In that sense your application is the DBMS. It is more like libjpeg in that sense than GIMP. It is not an image but it is not an image editor either.
      I don't think it's helpful to tie a piece of code's identity to whether it runs in-process or out-of-process. It's not intuitive to say that libmysqld isn't a DBMS and that SQLite becomes a DBMS if you wrap a bare minimum TCP server around its APIs and run it out-of-process.

      We have a word for what you're talking about​: daemon.

      Comment


      • #33
        Originally posted by V1tol View Post
        Also io_uring is quite tricky to correctly describe in Rust lifetimes. There are multiple articles about that. You can easily face a situation when one side (user code or kernel) could accidentally reuse or clear buffer which is currently being used by code.
        That came to bite Rust's async design. The way to deal with it in Rust is for the API function to take ownership of the buffer pointers. It can be somewhat of a pain, but it's quite a complex interface to begin with.

        Comment


        • #34
          Originally posted by timofonic View Post

          Let's rewrite Phoronix in Rust!
          I use Rust quite a lot and am getting great benefits from it but but honestly the fact that many people want to write web apps and web services in Rust makes me wonder. Maybe they see things that I don't, which is entirely possible, but to me Go looks like a far better language for those projects. It has a GC which is well suited for cases when you need to pass buffers around easily, it has built-in lightweight M:N multithreading which is ideal for server-type apps, and its runtime performance is more than enough for IO-bound tasks.

          Comment


          • #35
            Originally posted by jacob View Post

            I use Rust quite a lot and am getting great benefits from it but but honestly the fact that many people want to write web apps and web services in Rust makes me wonder. Maybe they see things that I don't, which is entirely possible, but to me Go looks like a far better language for those projects. It has a GC which is well suited for cases when you need to pass buffers around easily, it has built-in lightweight M:N multithreading which is ideal for server-type apps, and its runtime performance is more than enough for IO-bound tasks.
            I write little actix-web servers in Rust and my reasons for preferring it over something like Go are the more powerful type system (i.e. greater support for compile-time correctness enforcement and proper sum types), APIs that didn't have to be designed before the language gained support for generics, and a memory model that makes it easier for me to pay for a VPS with less RAM to meet the same demand.

            ...oh, and it's also well-suited to writing libraries once and then using things like like PyO3 to share a single implementation between all my projects regardless of whether I consider something like PyQt/PySide mandatory. (The only way to get memory-safe bindings to the QWidget APIs.)

            Comment


            • #36
              Originally posted by jacob View Post

              I use Rust quite a lot and am getting great benefits from it but but honestly the fact that many people want to write web apps and web services in Rust makes me wonder. Maybe they see things that I don't, which is entirely possible, but to me Go looks like a far better language for those projects. It has a GC which is well suited for cases when you need to pass buffers around easily, it has built-in lightweight M:N multithreading which is ideal for server-type apps, and its runtime performance is more than enough for IO-bound tasks.
              I thought that is the main reason for Rus? Maybe not small scale websites but something like Google, Facebook etc.. I mean not everything but the parts which use C++ today.

              And browser engines.

              Comment


              • #37
                Originally posted by patrick1946 View Post

                I thought that is the main reason for Rus? Maybe not small scale websites but something like Google, Facebook etc.. I mean not everything but the parts which use C++ today.

                And browser engines.
                Not really. The main reason for Rust is to be a system language: kernels, drivers, JIT engines etc. Legend has it that Hoare's first motivation for Rust came when the elevator in his building was out of service because of a software crash. For stuff like Google or Facebook that manipulates enormous quantities of data, GC languages scale very well and there is honestly very little reason not to use them (but Rust can have other advantages there, particularly its type system).

                Comment


                • #38
                  Originally posted by jacob View Post

                  Not really. The main reason for Rust is to be a system language: kernels, drivers, JIT engines etc. Legend has it that Hoare's first motivation for Rust came when the elevator in his building was out of service because of a software crash. For stuff like Google or Facebook that manipulates enormous quantities of data, GC languages scale very well and there is honestly very little reason not to use them (but Rust can have other advantages there, particularly its type system).
                  Bear in mind that Discord ported at least one of their services from Go to Rust because GC languages don't necessarily scale very well in "stuff like Google or Facebook that manipulates enormous quantities of data".

                  This post explains why Rust made sense for Discord to reimplement: how it was done, and the resulting performance improvements.

                  Comment


                  • #39
                    Originally posted by jacob View Post

                    Not really. The main reason for Rust is to be a system language: kernels, drivers, JIT engines etc. Legend has it that Hoare's first motivation for Rust came when the elevator in his building was out of service because of a software crash. For stuff like Google or Facebook that manipulates enormous quantities of data, GC languages scale very well and there is honestly very little reason not to use them (but Rust can have other advantages there, particularly its type system).
                    Actually I am not sure that Rust with it's error handling is fitting areas were you need code which is not panicking. Think about machine control like airplanes. You don't want your medical equipment to crash.

                    I had always the impression that rust is about security where it is better to crash then to let people in your system.

                    But for environments where you need safety you need systems which handle every error and never panic.

                    Rust is using the type system for security but I don't see how can encode every corner case a type system in a reasonable way.

                    Comment


                    • #40
                      Originally posted by patrick1946 View Post

                      Actually I am not sure that Rust with it's error handling is fitting areas were you need code which is not panicking. Think about machine control like airplanes. You don't want your medical equipment to crash.

                      I had always the impression that rust is about security where it is better to crash then to let people in your system.

                      But for environments where you need safety you need systems which handle every error and never panic.

                      Rust is using the type system for security but I don't see how can encode every corner case a type system in a reasonable way.
                      Better not use C, C++, or anything else that has ASSERT then... because that's what panic! is. An ASSERT that supports (and defaults to) being built in "unwind for graceful cleanup rather than abort" mode.

                      Also, better not use C++. It has both checked and unchecked getters for its STL types, just like Rust does.

                      (Seriously, though. From what I've seen, avionics take a panic!-style (i.e. crash early) "Have redundant hardware and, if one unit falls out of consensus, reset it so it can't spew garbage" approach to things... at least, that's the impression I get from watching accident investigation videos which go into detail on how technical malfunctions bad enough to overwhelm the protections unfolded.
                      Last edited by ssokolow; 11 May 2024, 04:05 PM.

                      Comment

                      Working...
                      X