Sqlite Is Getting So Good

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 พ.ย. 2024

ความคิดเห็น • 327

  • @KevinInPhoenix
    @KevinInPhoenix 29 วันที่ผ่านมา +199

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

  • @LiveType
    @LiveType 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา +88

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

    • @niks660097
      @niks660097 29 วันที่ผ่านมา +32

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

    • @martijnb3381
      @martijnb3381 29 วันที่ผ่านมา +62

      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 29 วันที่ผ่านมา

      ​@@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 29 วันที่ผ่านมา

      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."

  • @JohnLovell-FTW
    @JohnLovell-FTW หลายเดือนก่อน +550

    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 29 วันที่ผ่านมา +14

      that's crazily hilarious 🤣🤣

    • @reverse_meta9264
      @reverse_meta9264 29 วันที่ผ่านมา +2

      😂

    • @afuzzybearsyoutubechannel2812
      @afuzzybearsyoutubechannel2812 29 วันที่ผ่านมา +19

      try not to train ure models on inferior data sources

    • @VivekYadav-ds8oz
      @VivekYadav-ds8oz 29 วันที่ผ่านมา +7

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

    • @iandrake4683
      @iandrake4683 29 วันที่ผ่านมา +4

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

  • @stephan553
    @stephan553 29 วันที่ผ่านมา +91

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

    • @seanwoods647
      @seanwoods647 29 วันที่ผ่านมา +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 2 วันที่ผ่านมา

      ​@@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 2 วันที่ผ่านมา

      To be fair, sometimes the tools are indeed buggy 😅

  • @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 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา +1

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

    • @jgoemat
      @jgoemat 29 วันที่ผ่านมา

      @@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.

  • @giorgos-4515
    @giorgos-4515 29 วันที่ผ่านมา +24

    Imagine when Prime discovers formal methods and starts writing specifications

    • @VivekYadav-ds8oz
      @VivekYadav-ds8oz 29 วันที่ผ่านมา +10

      He'll finally write Haskell..

    • @d3stinYwOw
      @d3stinYwOw 29 วันที่ผ่านมา

      Prime and writing D and Ada? No way

    • @stultuses
      @stultuses 19 วันที่ผ่านมา +1

      He might even learn to spell TLA+

  • @EmilioBPedrollo
    @EmilioBPedrollo 29 วันที่ผ่านมา +53

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

    • @DimiterStanev
      @DimiterStanev 29 วันที่ผ่านมา +8

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

    • @RetroSmoo
      @RetroSmoo 29 วันที่ผ่านมา +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

  • @uuu12343
    @uuu12343 29 วันที่ผ่านมา +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 28 วันที่ผ่านมา +2

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

  • @seanwoods647
    @seanwoods647 29 วันที่ผ่านมา +13

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

  • @_tsu_
    @_tsu_ 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา +6

      hardware interrupts ?

    • @_tsu_
      @_tsu_ 29 วันที่ผ่านมา +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.

  • @yaghiyahbrenner8902
    @yaghiyahbrenner8902 หลายเดือนก่อน +116

    Sqlite is qualified for Aerospace.

    • @JohnSmith-op7ls
      @JohnSmith-op7ls 29 วันที่ผ่านมา +6

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

    • @allesarfint
      @allesarfint 29 วันที่ผ่านมา +53

      Boeing is qualified for Aerospace

    • @martijnb3381
      @martijnb3381 29 วันที่ผ่านมา +6

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

    • @redyau_
      @redyau_ 29 วันที่ผ่านมา +5

      ​@@allesarfintYou win this comment section

    • @gorak9000
      @gorak9000 29 วันที่ผ่านมา +3

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

  • @remrevo3944
    @remrevo3944 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา +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 28 วันที่ผ่านมา

      @@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 28 วันที่ผ่านมา +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.

  • @interdimensionalsailboat
    @interdimensionalsailboat หลายเดือนก่อน +57

    Petition to actually change it to squeel.

    • @DimiterStanev
      @DimiterStanev 29 วันที่ผ่านมา

      Imagine MySqueel or PostGresqueel

    • @martinkrauser4029
      @martinkrauser4029 29 วันที่ผ่านมา +3

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

  • @seanwoods647
    @seanwoods647 29 วันที่ผ่านมา +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

  • @JoshMillikan
    @JoshMillikan 29 วันที่ผ่านมา +5

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

  • @JonathanFraser-i7h
    @JonathanFraser-i7h 29 วันที่ผ่านมา +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.

  • @AG-ur1lj
    @AG-ur1lj 29 วันที่ผ่านมา +3

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

  • @mattymattffs
    @mattymattffs 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา

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

  • @canoozie
    @canoozie 29 วันที่ผ่านมา +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.

  • @scotmcpherson
    @scotmcpherson 29 วันที่ผ่านมา +6

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

  • @konstantingeyst4568
    @konstantingeyst4568 11 วันที่ผ่านมา +1

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

    • @esdegan7176
      @esdegan7176 3 วันที่ผ่านมา

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

  • @hanuman9
    @hanuman9 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา +2

      yep. i was thinking the same

    • @schmidt-5099
      @schmidt-5099 29 วันที่ผ่านมา

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

    • @hanuman9
      @hanuman9 29 วันที่ผ่านมา

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

    • @hanuman9
      @hanuman9 29 วันที่ผ่านมา

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

    • @hanuman9
      @hanuman9 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา +4

      it's pretty much the only option for mobile

    • @ismbks
      @ismbks 29 วันที่ผ่านมา

      @@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 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา

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

  • @RoughlyUnderstood
    @RoughlyUnderstood 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา +1

      tubeless tires were a reinvention of the wheel

    • @mage3690
      @mage3690 25 วันที่ผ่านมา

      ​@@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"?

  • @justanothercomment416
    @justanothercomment416 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา +2

      wth is an async mutex?

    • @justanothercomment416
      @justanothercomment416 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา +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.

  • @omar_benaidy
    @omar_benaidy 29 วันที่ผ่านมา

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

  • @everbliss7955
    @everbliss7955 29 วันที่ผ่านมา +2

    First time see Prime reading an articles positively.

  • @code8986
    @code8986 29 วันที่ผ่านมา +1

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

  • @shampoable
    @shampoable 21 วันที่ผ่านมา

    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

  • @joni062443
    @joni062443 29 วันที่ผ่านมา +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.

  • @LearnValkey
    @LearnValkey 28 วันที่ผ่านมา

    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.

  • @reybontje2375
    @reybontje2375 29 วันที่ผ่านมา

    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.

  • @apefu
    @apefu 25 วันที่ผ่านมา

    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.

  • @TheNoirKamui
    @TheNoirKamui 29 วันที่ผ่านมา

    @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.

  • @Th1200
    @Th1200 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา

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

  • @muayyadalsadi
    @muayyadalsadi 29 วันที่ผ่านมา +1

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

  • @WileeRunner42
    @WileeRunner42 29 วันที่ผ่านมา

    @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.

  • @SethGrantham-k1x
    @SethGrantham-k1x 29 วันที่ผ่านมา +1

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

  • @thorstenhirsch
    @thorstenhirsch 25 วันที่ผ่านมา

    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?!"

  • @muayyadalsadi
    @muayyadalsadi 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา

      NT Native API comes looking 😉

    • @pixiedev
      @pixiedev 25 วันที่ผ่านมา +1

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

  • @hanseichel4327
    @hanseichel4327 29 วันที่ผ่านมา +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

  • @UwU-f2a
    @UwU-f2a 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา

      Sqlite just works 😊

    • @PanduPoluan
      @PanduPoluan 2 วันที่ผ่านมา

      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

  • @mw3847
    @mw3847 29 วันที่ผ่านมา +1

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

  • @MrCraftOfLegend
    @MrCraftOfLegend 27 วันที่ผ่านมา

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

  • @shaurz
    @shaurz 29 วันที่ผ่านมา +1

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

    • @avwie132
      @avwie132 5 วันที่ผ่านมา

      Strict mode. It’s in the docs

  • @TobyGWilliams
    @TobyGWilliams 29 วันที่ผ่านมา

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

  • @BigBrotha3459
    @BigBrotha3459 29 วันที่ผ่านมา

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

  • @gund_ua
    @gund_ua 28 วันที่ผ่านมา

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

  • @digiryde
    @digiryde 29 วันที่ผ่านมา

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

  • @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.

  • @blenderpanzi
    @blenderpanzi 29 วันที่ผ่านมา

    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!"

  • @Jabberwockybird
    @Jabberwockybird 29 วันที่ผ่านมา +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)

  • @TremereTT
    @TremereTT 29 วันที่ผ่านมา

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

  • @tagsoftware
    @tagsoftware 29 วันที่ผ่านมา

    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  29 วันที่ผ่านมา +1

      yes i noticed it right away

    • @tagsoftware
      @tagsoftware 29 วันที่ผ่านมา

      @@ThePrimeTimeagen Excellent, I should have known

  • @pvaqueiroz
    @pvaqueiroz 29 วันที่ผ่านมา

    Prime consistently highlighting paragraphs without two or three characters on each end is triggering me so much 😭

  • @danwroy
    @danwroy 29 วันที่ผ่านมา

    The Shillagean with this weeks Shillogism

  • @AndrewBrownK
    @AndrewBrownK 29 วันที่ผ่านมา

    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

  • @turtlefrog369
    @turtlefrog369 28 วันที่ผ่านมา +2

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

  • @trueberryless
    @trueberryless หลายเดือนก่อน +2

    W editor ❤️

  • @privatesocialhandle
    @privatesocialhandle 29 วันที่ผ่านมา

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

  • @mdesmondvm2240
    @mdesmondvm2240 20 วันที่ผ่านมา

    Yes, that is very exciting!

  • @CottonInDerTube
    @CottonInDerTube 29 วันที่ผ่านมา

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

  • @michaelscofield2652
    @michaelscofield2652 28 วันที่ผ่านมา

    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

  • @argil7192
    @argil7192 29 วันที่ผ่านมา

    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.

  • @fennecbesixdouze1794
    @fennecbesixdouze1794 29 วันที่ผ่านมา

    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 29 วันที่ผ่านมา

      "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.

  • @SMorales851
    @SMorales851 29 วันที่ผ่านมา +1

    1:31 the r-word is "rust"

  • @resresres1
    @resresres1 24 วันที่ผ่านมา +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.

  • @YoutubeWatcher3566
    @YoutubeWatcher3566 29 วันที่ผ่านมา

    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.

  • @radicalbyte
    @radicalbyte 29 วันที่ผ่านมา

    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?

  • @SoulExpension
    @SoulExpension 29 วันที่ผ่านมา +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.

  • @Skylord12345
    @Skylord12345 29 วันที่ผ่านมา +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 29 วันที่ผ่านมา

      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 28 วันที่ผ่านมา

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

  • @Emperor-Inker
    @Emperor-Inker 29 วันที่ผ่านมา

    Interesting as I need to use SQLite for an upcoming assignment 😎

  • @alexipeck4201
    @alexipeck4201 29 วันที่ผ่านมา +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)

  • @nexovec
    @nexovec 29 วันที่ผ่านมา

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

  • @martijn3151
    @martijn3151 29 วันที่ผ่านมา

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

  • @thebuster9106
    @thebuster9106 29 วันที่ผ่านมา

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

  • @JohnLovell-FTW
    @JohnLovell-FTW 29 วันที่ผ่านมา +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?

  • @LutherDePapier
    @LutherDePapier 25 วันที่ผ่านมา

    I would used the word focus over terrified. If as a software engineer you are chosen to be overseen by the leader of DPRK, trust me, it's because you're the best there is in the country and you know exactly what you need to do.
    Now if Joe Biden were to look over your shoulder, that would be terrifying. Because you'd know you weren't chosen because you were the best, but rather because you had the more compatible politics. You know you're likely to fail, and you have no idea what's gonna happen to you when you do.

  • @eltreum1
    @eltreum1 29 วันที่ผ่านมา

    Hey that's Clickbait Prime lol. SQLite is freaking awesome for some things you would not expect.

  • @ShimoriUta77
    @ShimoriUta77 หลายเดือนก่อน +8

    SurrealDB already has multi tenancy/db per user

    • @kv4648
      @kv4648 29 วันที่ผ่านมา +3

      Woah the word multi tenancy turned into a link

    • @jerrygreenest
      @jerrygreenest 29 วันที่ผ่านมา

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

  • @adamrushford
    @adamrushford 29 วันที่ผ่านมา

    Nice! I love Sequel Lite!

  • @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 29 วันที่ผ่านมา

      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.

  • @Akirabone
    @Akirabone หลายเดือนก่อน

    1 sec ago? I am super early. Love you and your videos, primeee!

  • @qkktech
    @qkktech 28 วันที่ผ่านมา

    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 28 วันที่ผ่านมา

      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.

  • @lelilimon
    @lelilimon 28 วันที่ผ่านมา

    KimStyle method implies keyboard, mouse and handgun

  • @Naruto-oc6mi
    @Naruto-oc6mi 10 วันที่ผ่านมา

    what is the most performance open source database now?

  • @ov1kenobi663
    @ov1kenobi663 28 วันที่ผ่านมา

    3:20; Couchbase enters the chat

  • @gjermundification
    @gjermundification 25 วันที่ผ่านมา

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

  • @user-el3rp6nh5m
    @user-el3rp6nh5m 29 วันที่ผ่านมา

    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.

  • @FedericoDanielAnastasi-b9w
    @FedericoDanielAnastasi-b9w 29 วันที่ผ่านมา +1

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

  • @pdgiddie
    @pdgiddie 29 วันที่ผ่านมา

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

  • @dominikvonlavante6113
    @dominikvonlavante6113 29 วันที่ผ่านมา

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

  • @AtRiskMedia
    @AtRiskMedia 25 วันที่ผ่านมา

    Glauber's a boss

  • @justanothercomment416
    @justanothercomment416 29 วันที่ผ่านมา +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.

  • @denissorn
    @denissorn 29 วันที่ผ่านมา

    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.

  • @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

  • @DAB009
    @DAB009 12 วันที่ผ่านมา

    wake me up when they say GIZO, a rewrite of this database in zig 😅😂