Sqlite Is Getting So Good

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024
  • НаукаНаука

Комментарии • 328

  • @KevinInPhoenix
    @KevinInPhoenix Месяц назад +202

    I came here for Sqlite but the presentation just mentioned it and then took a hard turn to Rust and deadlocks.

  • @JohnLovell-FTW
    @JohnLovell-FTW Месяц назад +553

    Fun fact: I referenced a video of yours about SQLite for a NotebookLM generated podcast. The "host's" now call SQLite "Squeel Lite" now. Thanks for nothing pal! :)

    • @Shenepoy
      @Shenepoy Месяц назад +15

      that's crazily hilarious 🤣🤣

    • @reverse_meta9264
      @reverse_meta9264 Месяц назад +2

      😂

    • @afuzzybearsyoutubechannel2812
      @afuzzybearsyoutubechannel2812 Месяц назад +20

      try not to train ure models on inferior data sources

    • @VivekYadav-ds8oz
      @VivekYadav-ds8oz Месяц назад +7

      I used to say it ironically. Now I say it "squeel lite" without even thinking about it

    • @iandrake4683
      @iandrake4683 Месяц назад +4

      Once you hear squeel, you can never go back. It's just too catchy and correct.

  • @LiveType
    @LiveType Месяц назад +260

    Sqlite is godly. I started using it instead of json files for small projects. Somehow it's faster for tiny datasets. Didn't expect that.

    • @paladin9876
      @paladin9876 Месяц назад +89

      It’s faster than the file system, check their blog

    • @niks660097
      @niks660097 Месяц назад +33

      @@paladin9876 yeah cause file system works on pages, while sqlite directly uses disk.

    • @martijnb3381
      @martijnb3381 Месяц назад +63

      Both use pages. If you have 10 files and you want to use them, your app must use fopen() ten times. But if those same files are stored in a Sqlite database then we only have to use fopen() one time. Thats the difference.

    • @asl9750
      @asl9750 Месяц назад

      ​@@martijnb3381that's not all, it also depends on how one is updating the JSON file, if a program is just dumping/stringifying and writing the whole data on each update, that's also a issue, especially if said data is tens or hundreds of MB.

    • @BreetaiZentradi
      @BreetaiZentradi Месяц назад

      Exactly what the creator of SQLite said. "SQLite was not created to go up against databases like Postgresql or MySql, it was created to go up against flat file databases."

  • @stephan553
    @stephan553 Месяц назад +91

    1:07 Reinventing the wheel is a fantastic way to understand the _wheel_ more broadly.

    • @seanwoods647
      @seanwoods647 Месяц назад +9

      We should all endeavor to re-invent the wheel once. If for nothing more than to get it out of your system. But the key is to do that BEFORE people start paying you to code.

    • @PanduPoluan
      @PanduPoluan 4 дня назад

      ​@@seanwoods647 Or, do it in the downtime when no major features is being planned. When code has gone to production you get lots of use cases that _should_ be turned into Tests.

  • @JeremyKolassa
    @JeremyKolassa Месяц назад +43

    "Blame the tools."
    I literally LOL'd. Perfect delivery.

    • @PanduPoluan
      @PanduPoluan 4 дня назад

      To be fair, sometimes the tools are indeed buggy 😅

  • @uuu12343
    @uuu12343 Месяц назад +14

    I use SQLite for my beginner projects whenever I start a new programming language, typically a TODO list (yes, technically reinventing wheel, no I dont care that there's alot, its for learning, people should reinvent the wheel to learn), and its amazing

    • @punishedbarca761
      @punishedbarca761 Месяц назад +2

      Bro same. Together we can flood the market and monopolize shitty to do apps.

  • @giorgos-4515
    @giorgos-4515 Месяц назад +24

    Imagine when Prime discovers formal methods and starts writing specifications

    • @VivekYadav-ds8oz
      @VivekYadav-ds8oz Месяц назад +10

      He'll finally write Haskell..

    • @d3stinYwOw
      @d3stinYwOw Месяц назад

      Prime and writing D and Ada? No way

    • @stultuses
      @stultuses 22 дня назад +1

      He might even learn to spell TLA+

  • @_tsu_
    @_tsu_ Месяц назад +28

    Rawdogging sync rust is indeed the way the lord intended it. But i am using Embassy, which is async and i am loving it. Calling await on a physical pin that resolves when there is physically 3.3v on it is wild.

    • @marwan7614
      @marwan7614 Месяц назад +6

      hardware interrupts ?

    • @_tsu_
      @_tsu_ Месяц назад +5

      @@marwan7614 yup. that's what they are under the hood. but you don't have to write anything by hand. just throw in an await and the computer does it's thang.

  • @remrevo3944
    @remrevo3944 Месяц назад +19

    7:30 When you hold a non-async safe lock across an async boundary, the executor might suspend the task for an unknown amount of time.
    During that time another task that waits on the same mutex might be woken up and then wait until the first task lets go of the mutex, which will block the executor from continuing to execute the first task, which leads to a deadlock where all threads of the executor are all blocked by the mutex.

    • @justanothercomment416
      @justanothercomment416 Месяц назад +6

      Yep. And async mutex explicitly exist to avoid this dead lock. For whatever reason they didn't use it. Looks like an application bug and not a rust bug.

    • @remrevo3944
      @remrevo3944 Месяц назад +3

      @@justanothercomment416 I mean that it was an application bug was never in question.
      And using a non-async lock in async code, *actually* can have its advantages.
      async locks work by keeping a linked list of the task wakers that are waiting on it, which has a certain overhead.
      So if you know you *never* keep a lock over an async-await point, it might actually worth using it.
      (Especially in some low-level code, for example when implementing a future manually.)

    • @VivekYadav-ds8oz
      @VivekYadav-ds8oz Месяц назад +3

      @@justanothercomment416 It's actually officially recommended in async Rust book and I think in a Jon Gjenset video about async, to use *sync Mutexes* across small critical sections, *as long as you don't straddle an async boundary* . Of course, that turned out to be harder than it looks.

    • @justanothercomment416
      @justanothercomment416 Месяц назад

      @@VivekYadav-ds8oz Interesting. Because I looked before I even commented and found async mutexes to be the defacto recommendation. It would appear some of those with "authority" don't really understand what they are saying. Because the async implementation explicitly exists to avoid all of this nonesense.

    • @VivekYadav-ds8oz
      @VivekYadav-ds8oz Месяц назад +1

      @@justanothercomment416 I.. highly doubt that. The "official", or as you rightly called it - "authoritative" recommendations do explicitly point out these potential problems. But the thing is, async mutexes are very slow. And a lot of the times, the critical section is really small and doesn't involve an async operation, maybe like pushing into a HashMap, or updating a counter, etc. It did irk me too the first time I heard it, as it can create the problems precisely mentioned here. However, it is a risk people are willing to take, and as we saw sometimes it might not pay off.

  • @seanwoods647
    @seanwoods647 Месяц назад +13

    The expert system I maintain (IRM) is actually one of the original applications that Sqlite was developed for.

  • @ryanrobbins3846
    @ryanrobbins3846 Месяц назад +81

    🔥 love the sponsorship Acknowledgement straight out of the gate.

    • @schachmatsch4790
      @schachmatsch4790 Месяц назад +5

      you do realize it is required by law right?

    • @p0xygen
      @p0xygen Месяц назад +9

      @@schachmatsch4790 no shit, but the fact that he says it so clearly and boldly is a lot different than others that just have a small notice somewhere most people won't directly see it

    • @isenewotheophilus6485
      @isenewotheophilus6485 Месяц назад +2

      What's it with you guys and sponsorship.
      If a video is sponsored and the creator lies about the content; I stop watching the creator. simple

    • @ryanrobbins3846
      @ryanrobbins3846 Месяц назад +1

      @@schachmatsch4790 I'm not familiar with the law. Platform thing or something else?

    • @jgoemat
      @jgoemat Месяц назад

      @@p0xygen Except for the fact that he hedges. "Turso does pay me" and "This article, I guess, you would definitely be able to call this thing sponsored." What thing? Is he saying it just because Turso pays him for something else? What thing is he talking about, this youtube video? If Turso is paying him to make the video, just say so.

  • @EmilioBPedrollo
    @EmilioBPedrollo Месяц назад +53

    DST is the acronym for STD in my native language. Listening to this video was an experience.

    • @DimiterStanev
      @DimiterStanev Месяц назад +8

      I'm not sure if Daylight Saving Time is that in my timezone.

    • @RetroSmoo
      @RetroSmoo Месяц назад +2

      In the Star Wars Jedi Academy community it refers to Dark Side Tools which is a bunch of hacks like wallhack, aimbot etc which is quite notorious lol

  • @JonathanFraser-i7h
    @JonathanFraser-i7h Месяц назад +10

    Don't run aggregate jobs across the databases, run it across your event log. Give every user a mutable DB that stores the live data, but pool all the user events for aggregation.

  • @yaghiyahbrenner8902
    @yaghiyahbrenner8902 Месяц назад +117

    Sqlite is qualified for Aerospace.

    • @JohnSmith-op7ls
      @JohnSmith-op7ls Месяц назад +6

      Is that the new “military grade” meaningless label for things now. The “milspec” of tech?

    • @allesarfint
      @allesarfint Месяц назад +53

      Boeing is qualified for Aerospace

    • @martijnb3381
      @martijnb3381 Месяц назад +6

      ​​@@JohnSmith-op7lsDO-178B is the certification. I think its not a buzz word like "milspec" 😊

    • @redyau_
      @redyau_ Месяц назад +5

      ​@@allesarfintYou win this comment section

    • @gorak9000
      @gorak9000 Месяц назад +3

      So you're telling me Sqlite is missing a few bolts...

  • @interdimensionalsailboat
    @interdimensionalsailboat Месяц назад +57

    Petition to actually change it to squeel.

    • @DimiterStanev
      @DimiterStanev Месяц назад

      Imagine MySqueel or PostGresqueel

    • @martinkrauser4029
      @martinkrauser4029 Месяц назад +3

      you can't change it to what it is
      literally impossible, comrade

  • @mattymattffs
    @mattymattffs Месяц назад +9

    I work with multi-tenant databases. The issues usually come from not balancing the load correctly. In our testing we found pretty much every version of standard squeal postgres Microsoft whatever to be faster than squeal light

    • @ElSantoLuchador
      @ElSantoLuchador Месяц назад +2

      SQLite is used for embedded systems and stand alone applications. If you find yourself needing to load balance servers you’re using the wrong tool. Next try to use resident Postgres for your cell phone app. Different tools for different jobs.

    • @mattymattffs
      @mattymattffs Месяц назад +5

      @@ElSantoLuchador I don't think you understood. Turso is saying they are doing multi tenant SQL lite databases. I'm saying that's dumb

    • @hck1bloodday
      @hck1bloodday Месяц назад

      @@mattymattffs to be honest,I didn't get waht you mean in the first comment too. but I enterily agree with you

  • @JoshMillikan
    @JoshMillikan Месяц назад +5

    i love that every point in the conclusion of why spells out "borrow checker" aka thats the whole reason why.

  • @scotmcpherson
    @scotmcpherson Месяц назад +6

    I love SQLite. It’s so versatile and fast as hell.

  • @AG-ur1lj
    @AG-ur1lj Месяц назад +3

    The wheel has been re-invented probably more than any other part on your car

  • @canoozie
    @canoozie Месяц назад +3

    The way you do aggregates (or rather a way), is to use an external cache, something like a redis or whatnot, to save the per-user metrics you want to aggregate, and then work on the cache when it comes to finalizing the numbers.

  • @justanothercomment416
    @justanothercomment416 Месяц назад +7

    Not entirely clear, but for that mutex, it should be an async mutex. If using the standard mutex described bug is expected.

    • @hbobenicio
      @hbobenicio Месяц назад +2

      wth is an async mutex?

    • @justanothercomment416
      @justanothercomment416 Месяц назад +3

      @@hbobenicio It's a mutex which understands Rust's async wait and behaviors correctly for these types of use. Whereas a normal mutex blocks execution as it's becoming recursive, which isn't what you would want for an async operation and its scheduler in the first place. The "deadlock" is the block as requested by the mutex.
      While making some assumptions as the full context was not provided, it appears this was not a Rust bug but a user bug from using the incorrect mutex for purpose.

  • @MikkoRantalainen
    @MikkoRantalainen Месяц назад +3

    28:00 I guess it depends on your definition of "cold start". I assumed it would have meant that every database has all the important bits in the filesystem cache in any situation. If it actually meant "not having to boot a new VM", sure, that's much much easier thing to accomplish if you don't need VM level separation for security purposes.
    And considering the amount of hardware security bugs related to VM escape vulnerabilities, I would rather bet on well written server software instead of VM containment.

  • @seanwoods647
    @seanwoods647 Месяц назад +5

    Fun fact: I have the job I have after striking up a conversation with Richard Hipp while in line at a conference. The power of the right T-shirt

  • @RoughlyUnderstood
    @RoughlyUnderstood Месяц назад +2

    Prime you should get Joran on stream to ask for advice with your simulation testing questions! It would be a really fun conversation

  • @JohnKerbaugh
    @JohnKerbaugh Месяц назад +24

    Did they reinvent the wheel?
    Or did they make of their own wheel so that they could have the wheel that they need?
    I just feel like this saying inappropriately used sometimes.

    • @audiocorps2334
      @audiocorps2334 Месяц назад +1

      Semantics. They reinvented the wheel. The only time it isn't is when it innovates because a solves notable problems or improves existing standards.
      Reinvented for your niche is still reinventing.

    • @martinkrauser4029
      @martinkrauser4029 Месяц назад +1

      tubeless tires were a reinvention of the wheel

    • @mage3690
      @mage3690 28 дней назад

      ​@@audiocorps2334is it "reinventing the wheel" when what you did was make the wheel skinnier and taller for your specific use-case, or is it just "making the wheel I need"?

  • @hanuman9
    @hanuman9 Месяц назад +10

    In .NET, calling Wait (sync) on an async function can also result in a deadlock under certain scenarios and has to be avoided, so this isn't just a RUST thing.

    • @xybersurfer
      @xybersurfer Месяц назад +2

      yep. i was thinking the same

    • @schmidt-5099
      @schmidt-5099 Месяц назад

      Can you give a example or is it a 1 in one Million thing?

    • @hanuman9
      @hanuman9 Месяц назад

      @@schmidt-5099 I can't post links but search for article "Understanding Async, Avoiding Deadlocks in C#"

    • @hanuman9
      @hanuman9 Месяц назад

      Search for article "Understanding Async, Avoiding Deadlocks in C#"

    • @hanuman9
      @hanuman9 Месяц назад +2

      Understanding Async, Avoiding Deadlocks in C# article explains this more in-depth

  • @NihongoWakannai
    @NihongoWakannai Месяц назад +65

    Sqlite has always been good

    • @Kane0123
      @Kane0123 Месяц назад +6

      I feel like a lot of us were just sleeping on it...

    • @justinsmith3981
      @justinsmith3981 Месяц назад +4

      it's pretty much the only option for mobile

    • @ismbks
      @ismbks Месяц назад

      @@Kane0123 it is probably the most prolific piece of software of all time, you find it everywhere from your iphone to airplanes to missiles to hospitals. a major vulnerability in sqlite would shutdown a huge part of the world's economy.

    • @theairaccumulator7144
      @theairaccumulator7144 Месяц назад +5

      It's always been good for client side storage in apps, all these people trying to shoehorn it into servers and hacking it into a server-side database are misguided. That's just not it's purpose.

    • @rida_brahim
      @rida_brahim Месяц назад

      ​@@justinsmith3981in flutter i use isar, nosql local database, it's FAST

  • @muayyadalsadi
    @muayyadalsadi Месяц назад +4

    19:33 SQLite is a regular filesystem file. There is no real usable Async filesystem kernel routine. All async fs stuff is run in a thread pool under the hood and appear to be async using fake syntax sugar. In all languages.

    • @Ariccio123
      @Ariccio123 Месяц назад

      NT Native API comes looking 😉

    • @pixiedev
      @pixiedev 28 дней назад +1

      Sqlite is best for read heavy usage. but for write heavy usage, we should prefer other databases.

  • @omar_benaidy
    @omar_benaidy Месяц назад

    so funny to see an idea you thought of on the throne the day before being discussed in a youtube video, I love it

  • @hanseichel4327
    @hanseichel4327 Месяц назад +2

    I once got bamboozled doing that kind of research for myself. I wrote my crud app building my own scheduler using rusts mio non blocking event loops for any hardware io and thread pools with sync channels for work dispatch.
    It was very lightweight on ram and rather fast. But when spamming it with simulated ddos attacks, it hung up and didnt answer any more requests at some point.
    I gave up and rewrote the entire thing using tokio. And the problems went away!
    Just found out a week later that my experience was most likely caused by a bug in rustls crate that i used in the first version that was not present in the tokio-rustls crate i used for the second. This bug was so bad, it was reported as a CVE because it hung up some place in the tls handshake that could be exploited.
    Still am wondering about speed comparisons of both implementations with the bug in rustls being fixed by now.
    But didnt get around to rewriting it again yet :D

  • @konstantingeyst4568
    @konstantingeyst4568 14 дней назад +1

    I'm building a project that has a SQlite DB per tenant, it's super stable and easy to do.

    • @esdegan7176
      @esdegan7176 5 дней назад

      how many tenant? how you handle table/column change?

  • @shampoable
    @shampoable 24 дня назад

    We do single-tenant DBs at work. Orchestrating them is easy by having a single system/admin db where "pointer" records about each of the account exist. All the system-wide stuff also goes there of course

  • @everbliss7955
    @everbliss7955 Месяц назад +2

    First time see Prime reading an articles positively.

  • @reybontje2375
    @reybontje2375 Месяц назад

    1:00 I think even companies can benefit from reinventing the wheel.
    Depending on what your company or project within that company does, all the various "wheels" might only almost work for you. Libraries are rarely general enough to fit all situations, and having a bunch of corner cases where you need to use inevitable hacks to work with a library/tool builds up into tech debt over time.
    Specialized projects/libraries can also turn into debt, but that debt is generally very stable and not too painful.

  • @WileeRunner42
    @WileeRunner42 Месяц назад

    @7:51, a lot of thread synchronization and locks utilize thread local storage. These are not safe in async code since this code and the release of the locks might not run on the same thread. C# is introducing async task local storage to create async safe synchronization and locks.

  • @TheNoirKamui
    @TheNoirKamui Месяц назад

    @21:22 The issue is the "move" keyword: Everything referenced in this block will be moved in!
    I think creating a similar "clone" and "borrow" block would make sense. But you would loose the explicit `.clone` and `&` in those.
    For what it is worth, the move block semantics is not that bad and it forces you to be explicit and correct. But yeah... so many people raise this issue.

  • @apefu
    @apefu 27 дней назад

    It would be cool to implement this testing strategy on a very simple project with different branches or components for triggering different bugs just to learn/teach.

  • @LearnValkey
    @LearnValkey Месяц назад

    I am impressed by things people are creating and I am jealous. The first 10 years of my career I spent building CRUD and video streaming apps (hooking third party service). Just 3 years ago, I deep dived into more interesting topics.

  • @code8986
    @code8986 Месяц назад +1

    I totally knew you were going to say “shill-o-gen”!

  • @Th1200
    @Th1200 Месяц назад +1

    sqlite will be the db of choice for my current hobby project getting used to rust.
    If it just had a good timeseries module so I could throw influxdb out of the stack :D

    • @mw3847
      @mw3847 Месяц назад

      @@Th1200 sqlite3 has a robust extension api. Write one

  • @UwU-f2a
    @UwU-f2a Месяц назад +2

    i always use it in my small project where i willnt handle many data since last month, my reason for switching from postgres to sqlite for my personal project is because i dont have to set up postgress in the server when i deploy it to my vps. i just run the binary (i embed the sqlite in the binary + the frontend) and everything is done

    • @martijnb3381
      @martijnb3381 Месяц назад

      Sqlite just works 😊

    • @PanduPoluan
      @PanduPoluan 4 дня назад

      Yup, if you don't actually need an enterprise-grade db and/or your data set is small and/or your architecture does not need a separate database, SQLite is just perfect #Chef'sKiss

  • @shaurz
    @shaurz Месяц назад +1

    My only complaint about SQLite is i wish it would enforce column types

    • @avwie132
      @avwie132 7 дней назад

      Strict mode. It’s in the docs

  • @Muzzleflash1990
    @Muzzleflash1990 Месяц назад

    I don't think the deadlock is Rust specific, except in the matter that Rusts Mutex is non-entrant, where-as a reentrant Mutex might not have caused the deadlock (but that might cause other problems!).
    Basically thread A locks the mutex and calls some_sync_function. Then some_sync_function does async stuff that causes the thread A to yield to the executor to run another task, via thread A. Thread A then get another request and runs the initial code again which tries to lock the Mutex. But since Rust's Mutex is not re-entrant thread A is now deadlocked with itself and the Mutex is perhaps never released. All other threads handling request now also deadlocks on the perma-locked Mutex.

  • @BigBrotha3459
    @BigBrotha3459 Месяц назад

    I use it all the time for personal projects. It’s amazing

  • @muayyadalsadi
    @muayyadalsadi Месяц назад +1

    2:17 someone will hear the file based database and say aha I know my excel skills are not wasted.

  • @gund_ua
    @gund_ua Месяц назад

    Sync event loop in Rust sounds really interesting, would love to see it along with a zero cold start serverless server.

  • @_plamp_
    @_plamp_ 8 часов назад

    This just unlocked new pathways in my mind

  • @joni062443
    @joni062443 Месяц назад +1

    Antithesis = An-ti-thu-siss.
    Prime reading skill issues aside /s,
    Fantastic video and highlighted article. SQLite is great and Turso helps emphasise this here.
    Anything involving Tigerstyle with DST just vibes with me these days. My favourite way to get shit done both in professional work and personal projects especially.

  • @Jabberwockybird
    @Jabberwockybird Месяц назад +1

    Re-inventing the wheel can be seen in different ways. Dogmatic DRY people say it all the time, and they ignore the learning opportunity.
    People who love frameworking instead of just writing code re-invent the wheel in a negative way because they often make frameworks that ignore or even prevent using what built-in features a technology has. (Like J.S. frameworks that don't let you use html5 goodness)

  • @YoutubeWatcher3566
    @YoutubeWatcher3566 Месяц назад

    I don't get not reinventing the wheel argument, because we don't have cars with wooden wheels. The risk to reward ratio has to be worthwhile.

  • @resresres1
    @resresres1 26 дней назад +1

    i don't get it. They are creating a service for creating and accessing SQLite database files? why? anyone can easily create their own SQLite database files on their own computer or server.

  • @argil7192
    @argil7192 Месяц назад

    7:23 "Why can't you hold a mutex across an async function?"
    You can, but the problem is when you .await. There's a lot underlying rust's future model here, but basically the future will *always* return pending or will just straight up block the thread forever, depending on if you used a mutex that returns a future (ala, an async mutex from tokio or smol) or one that just goes and contacts the operating system for sync (std or crossbeam). The way around this comes down to just not mixing mutexes, or not doing recursive locking.

  • @mw3847
    @mw3847 Месяц назад +1

    I did a multi-tenant encrypted at rest database out of SQLite3 16 years ago.

  • @FedericoDanielAnastasi-b9w
    @FedericoDanielAnastasi-b9w Месяц назад +1

    Does anyone where you can find the presentation that prime mentions around 9:35?

  • @MrCraftOfLegend
    @MrCraftOfLegend Месяц назад

    DST in pt-br is Doença Sexualmente Transmissível (english’s STD)
    Great acronym, love it

  • @JohnLovell-FTW
    @JohnLovell-FTW Месяц назад +1

    Why do they need to create all 5000 db files in one call? MQ that thing and have "eventual" creation. Still fast but no threadaches?

  • @Skylord12345
    @Skylord12345 Месяц назад +1

    I've always been iffy about serverless. I just hate the idea of building something on serverless then the platform decides to raise rates and I am sort of stuck because switching providers is too costly in time/money. I've always preferred running on stuff that can easily be self hosted or moved to another provider without any issue and because of that self hosting serverless just seems pointless.
    Serverless definitely has it's use cases but I have yet to find a use case for my stuff that can't easily be done another way and without the fear of my bill exploding.

    • @hck1bloodday
      @hck1bloodday Месяц назад

      IMO serwverless is for projects that have no budged to expend in infrastructure, serverless is really expensive compared with cloud VMs and PaaS oferings like Azure App Service or AWS Lightsail.
      also migrating away from serverless is most of the time, rewriting the entire app

    • @colbyboucher6391
      @colbyboucher6391 Месяц назад

      It's deeply silly to me, just make people download it at that point

  • @michaelscofield2652
    @michaelscofield2652 Месяц назад

    Can you mention that if you are paid to review/read an article whether that also has impact on your opinion on it? Because I automatically assume bias when something is sponsored

  • @martijn3151
    @martijn3151 Месяц назад

    Sooo. Basically this is a 30 min ad? No thanks. Good that you point it out though.

  • @TremereTT
    @TremereTT Месяц назад

    Where could we see a stream where the CEO of Turso, the CEO of TigerBeetle and Primagen team-up in the limp-biscuit-Olympics?

  • @SethGrantham-k1x
    @SethGrantham-k1x Месяц назад +1

    This is what you call a solution in search of a problem kids.

  • @AndrewBrownK
    @AndrewBrownK Месяц назад

    we need kernel developers to use tiger beetle style. Just caught up on the rust/kernel drama from a few months ago and it is sad

  • @tagsoftware
    @tagsoftware Месяц назад

    Greetings from the Netherlands, the Primeagen. I am not sure if you noticed the acrostic in the section "Appendix: Why not Zig?" Look at the boldly printed first letter of each sentence.

    • @ThePrimeTimeagen
      @ThePrimeTimeagen  Месяц назад +1

      yes i noticed it right away

    • @tagsoftware
      @tagsoftware Месяц назад

      @@ThePrimeTimeagen Excellent, I should have known

  • @user-el3rp6nh5m
    @user-el3rp6nh5m Месяц назад

    why query directly on the database at a lightening speed with SQL, when you can spend time writing python code to connect to the same database just to join and aggregate tables with inefficient python code.

  • @DerTechNick
    @DerTechNick Месяц назад +6

    Per user DB... I do not feel that at all. Have fun managing that in some multi instance cluster environment. A normal database is 10x easier

    • @jerrygreenest
      @jerrygreenest Месяц назад

      Per user db is bullshit in 99% cases, but there might be 1% cases where it makes sense. Like some online photoshop, or other offline-like tools used in online.

  • @alexipeck4201
    @alexipeck4201 Месяц назад +2

    For the example shown at 21:47, while it would be nice to have some shorthand, you can at least not pollute naming with inner or inner_something by doing the clone within task::spawn but before the async move {}
    let a = Rc::new(something);
    handle = tokio::task::spawn({
    let a = a.to_owned();
    async move { inner_usage(a); }
    });
    other_usage(a)

  • @radicalbyte
    @radicalbyte Месяц назад

    The issue with async + mutex is that async is all about interweaving work on a thread - the thread "parks" the work and goes and does something else whilst waiting for the async task to return - do if the mutex is implemented at thread level (common) it blocks the entire thread and all async stuff happening on said thread. Easy to deadlock. Also if you understand multithreaded code in your language / environment / os etc you'll get right during analysis. I mean you do have to understand how async works under the covers before you go writing concurrent code, right? Or is that just me?

  • @gjermundification
    @gjermundification 28 дней назад

    0:00 Did he say squirrel it? Like making something become a squirrel?

  • @SoulExpension
    @SoulExpension Месяц назад +1

    Async sucks. Zig killed async for solid reasons. Google killed io_uring. You use Tokio for direct IO, rayon for bulk parallel computation. But um, all kinds of issues. Also stare at Concurrency for LLVM. If they can salvage async, would be amazing. Cancel blockage, function pointers, measuring memory, hidden control flow, coloring. Ya, I wanna see. There's no roll your own to reduce syscalls. It's a nightmare. He would be the one to fix it though.

  • @thebuster9106
    @thebuster9106 Месяц назад

    Can you make a video on how you implemented the seeded simulation testing in your go project?

  • @fennecbesixdouze1794
    @fennecbesixdouze1794 Месяц назад

    The unit tests I write are just straightforward testing practices that you'd find in any good book, and they catch all sorts of things I would not have thought about or predicted. I rely pretty much exclusively on just run-of-the mill testing practices, unit tests written in a basic unit test framework (a-la xUnit or whatever), and I haven't had ay code defects in anything I've released in literally years. I also write a lot of runtime asserts checking before/after contracts.
    Of course: I've seen other people's tests and they most certainly fit this "only catch what you predicted" criticism. In fact more often they don't even catch what you would predict; more often than not if you look at the test it's actually testing nothing at all: no asserts that could fail, or everything meaningful is mocked out. That's not because "testing is limited", that's because people limited: they are not trained or competent at testing, and the organization largely tries to indoctrinate them to be uncritical and unthinking which goes against the ability to do testing well. Do you think calling it "simulation testing" is going to change anything in the long run? If that gets popular, the majority will just do that terribly too.

    • @hck1bloodday
      @hck1bloodday Месяц назад

      "everything meaningful is mocked out" dependencies should be mocked or you will be testing multiple classes at the same time, you should have separate test for the depedency that test it in isolation.

  • @mdesmondvm2240
    @mdesmondvm2240 23 дня назад

    Yes, that is very exciting!

  • @turtlefrog369
    @turtlefrog369 Месяц назад +2

    they would not have this problem if they hired C++ engineers instead of rust kiddies.

  • @qkktech
    @qkktech Месяц назад

    I have seen such kind deadlicks because of OS changing thread. To me was solution to go shorter timeslots so that probability goes down

    • @qkktech
      @qkktech Месяц назад

      The solution was that time 20 yesrs ago use someyhing faster than os thread switch that time that was directx timers. so we had like 240 voip streams + control sent and recieved 30ms cunks while os alowed only 1ms delta. Mutex in hardware interupt callback caused trouble.

  • @thorstenhirsch
    @thorstenhirsch 27 дней назад

    It will be fun to watch all developers who migrated their projects to SQLite when the ops guys ask "And how are we supposed to do backups now?!"

  • @pdgiddie
    @pdgiddie Месяц назад

    I think Elixir might be the only language that does async right. And other BEAM languages, of course.

  • @ShimoriUta77
    @ShimoriUta77 Месяц назад +8

    SurrealDB already has multi tenancy/db per user

    • @kv4648
      @kv4648 Месяц назад +3

      Woah the word multi tenancy turned into a link

    • @jerrygreenest
      @jerrygreenest Месяц назад

      @@kv4648 for me it’s not, but i am seeing a bunch of other links. Mindblowing. RUclips showing those based uniquely per user? Interesting…

  • @denissorn
    @denissorn Месяц назад

    what's the thing with VMs. When did wasting resources for subpar performance for isolation whatever reasons become a thing. Then they have to spin up/down virtual machines, on a real hardware.

  • @justanothercomment416
    @justanothercomment416 Месяц назад +2

    No cold start can be handled the same way android handles its VMs. You basically pre-fork the initialized base VM (zygot in Android speak IIRC). This way, you're always connecting to a pre-warmed image rather than cold starting on each need.

  • @TobyGWilliams
    @TobyGWilliams Месяц назад

    "That's why I'm personally inventing kubernetes myself right now"

  • @Naruto-oc6mi
    @Naruto-oc6mi 13 дней назад

    what is the most performance open source database now?

  • @BlueCoyote007
    @BlueCoyote007 Месяц назад

    I haven't used multi tenancy in production yet because too much overhead maybe I haven't implemented the correct pattern but I would appreciate really super simple multi tenancy I think I came across the same issues as these dudes

  • @digiryde
    @digiryde Месяц назад

    "Microseconds did not matter..." My Z80 would like to have a chat with you.

  • @trueberryless
    @trueberryless Месяц назад +2

    W editor ❤️

  • @SMorales851
    @SMorales851 Месяц назад +1

    1:31 the r-word is "rust"

  • @lelilimon
    @lelilimon Месяц назад

    KimStyle method implies keyboard, mouse and handgun

  • @aldric
    @aldric Месяц назад +42

    The SQLite project does not accept patches from people who have not submitted an affidavit dedicating their contribution into the public domain. This means that Turso does not want to submit an affidavit dedicating their contributions into the public domain.

    • @rasibn
      @rasibn Месяц назад +6

      isn't it easier to contribute to their fork because you can just open a PR?

    • @olazawho
      @olazawho Месяц назад +3

      Or it means that Turso might want to implement features that are specific to their use case and are unlikely to be accepted for merge into SQLite. Also, fyi, Turso devs have actually up streamed changes back to SQLite.

    • @TurtleKwitty
      @TurtleKwitty Месяц назад +2

      The requirements to submit to sqlite are WAY deeper than just a "this is public domain code"

  • @danwroy
    @danwroy Месяц назад

    The Shillagean with this weeks Shillogism

  • @blenderpanzi
    @blenderpanzi Месяц назад

    OT: If the Primagen would be reacting to the new biggest found prime number, how would he sign off that video? "The name is the Mersenne Primagen!"

  • @UwU-f2a
    @UwU-f2a Месяц назад

    prime svelte 5 just officially released in stable release, please review ittt

  • @CottonInDerTube
    @CottonInDerTube Месяц назад

    7:13 "ready or not, here i come, socket write" :D
    _sorry, had too_

  • @nexovec
    @nexovec Месяц назад

    I quite literally have the tigerstyle video in the next tab. Didn't realize that was that.

  • @dasten123
    @dasten123 Месяц назад

    Didn't understand anything.. what the hell is a Turso. I thought the video was about Sqlite :(

  • @fennecbesixdouze1794
    @fennecbesixdouze1794 Месяц назад

    "the time we spend fixing those bugs is time we are not spending moving our product toward its goal"
    What? How is that the case? Unless the goal is "to have buggy software", then fixing bugs must but part of moving toward the goal.

  • @dominikvonlavante6113
    @dominikvonlavante6113 Месяц назад

    Sqlite is amazing, pitty that it is a pain to get working in a cloud environment.

  •  Месяц назад

    Frontendless frontend… wouldn’t that be the headless thing?

  • @bigMax1337
    @bigMax1337 Месяц назад

    talking about event loop I remember a video about how the js event loop schedules diffrent things like promises and async await but I can't find it anymore does some have something good on that topic?

    • @bigMax1337
      @bigMax1337 Месяц назад

      Nvm just found the video "The Hidden Cost Of GraphQL And NodeJS"

  • @Tobarja
    @Tobarja Месяц назад

    Can someone point me to the name of the series(?) where he was writing the simulation testing code? (not the original tiger beetle interview)

  • @privatesocialhandle
    @privatesocialhandle Месяц назад

    "This post is going hard" right after he read the line about the "r-word" nice 😅

  • @AtRiskMedia
    @AtRiskMedia 27 дней назад

    Glauber's a boss