PostgreSQL calling Svelte in real-time via Rust + websockets

Sdílet
Vložit
  • čas přidán 26. 03. 2022
  • This video is about getting updates in real time from the database, all the way into the clients browser. I will present (and we look at the code of) a solution where we are listening for changes in PostgreSQL in Rust. These changes are then propagated to svelte based frontend clients via web sockets.
    I thought this was a fun experiment to conduct. If you have any questions about this, feel free to use the comments. I watch the comments like a hawk 🐦. All of the tech used in this video is awesome, much love for PostgreSQL💖, Rust💖 and Svelte💖.
    If you are interested in more top quality web dev content like this one (and help me out), consider subscribing to the channel. 😅🙏
    And don't forget to watch the whole video and hit the like button if you like it🤓👍
    Thanks.
    #websockets #real-time #postgresql #rust #svelte

Komentáře • 25

  • @HugoDuprez449
    @HugoDuprez449 Před 2 lety +23

    Great! Make more Svelte + Rust content :)

  • @irlshrek
    @irlshrek Před 2 lety +6

    So cool!! I'm absolutely in love with svelte and sveltekit so I'm glad you covered this

    • @lindblomdev
      @lindblomdev  Před 2 lety +2

      I haven't looked much into sveltkit since I feel these complete frameworks has ended up being more of blockers than accelerators over the lifetime of projects. But maybe sveltkit is different. Will give it a chance, thanks 🙂👍

    • @irlshrek
      @irlshrek Před 2 lety +1

      @@lindblomdev I wouldn't be surprised if that applied to sveltekit too. I imagine integrating various tools into frameworks ends up being an exercise in patience more than anything else. But it might still be worth poking around! I'm having a lot of fun with it

  • @mannycalavera121
    @mannycalavera121 Před rokem

    Thanks for making this video

  • @mitotv6376
    @mitotv6376 Před 2 lety +2

    Nice, I have to learn Rust now.

  • @snk-js
    @snk-js Před 9 měsíci

    you could increase font size of the vscode when doing that kinda of thing lol; btw very unique implementation

  • @RichReflectionz
    @RichReflectionz Před 2 lety +1

    New to rust, keep up posting more Rust content if your able to as your got a subscriber :)

    • @lindblomdev
      @lindblomdev  Před 2 lety

      Awesome, great choice of programming language 😊👍 thanks for subscribing, it's appreciated 🙏 rust is definitely on the future menu of the channel. 👌

  • @cQ2
    @cQ2 Před rokem

    Yes, big thing are the resources and how many clients will be, with just 1k clients doing counts on dB could be some tricky and if the dB has millions record we need to look on replicas an all this stuff

  • @reggiebdog
    @reggiebdog Před rokem +1

    do you have a githhub repo for this demo? I am learning svelte w/ Postgres, but I was blown away with websockets and Rust. Thanks@

    • @lindblomdev
      @lindblomdev  Před rokem +1

      No, it was just some throw away code I experimented with and recorded a video about. Do you have any questions about it?

    • @reggiebdog
      @reggiebdog Před rokem +1

      @@lindblomdev I think learning how to use websockets is my next step

  • @dev-rachid
    @dev-rachid Před 10 měsíci

    What handler means ?
    Thanks 👍

    • @lindblomdev
      @lindblomdev  Před 10 měsíci +1

      I know the context, assuming you are talking about a message handler. It's a function that executes when a message is received.

  • @mbczxaydbzrkmszj
    @mbczxaydbzrkmszj Před 8 měsíci

    This video is useless to newbies that are trying to learn if you don't provide a github repository with sample code...

  • @TANRININresulu
    @TANRININresulu Před 11 měsíci

    Bury server rust code in client side wasm rust assembly binary like this : czcams.com/video/vjGOpDb44UM/video.html IFF SUPREME ELEGANT WILLS

    • @lindblomdev
      @lindblomdev  Před 11 měsíci

      I dont know what you want to do, but talking directly to the postgres from the client isnt something i stand by. I like to have a server inbetween there for different reasons. Some database providers want to make their database more of an application platform, im not on that train :)

    • @TANRININresulu
      @TANRININresulu Před 11 měsíci +1

      Server costs eliminates that way and hence wasm is compiled binary it most probably safe and also it eliminates load balancer etc… & I am in no relation with any database providers. Because I serve “ONLY” to SACRED SUPREME KING ELEGANT!

    • @lindblomdev
      @lindblomdev  Před 11 měsíci +1

      Security through obscurity is not safe, when you have sent the bits to the client they are compromised. Either way, thanks for the video recommendation 🙏 I see two interesting areas for wasm, as an alternative for javascript in the browser and as a plugin system for saas products, where customers can upload their own wasm modules and have them run on their data (probably using metered billing, and time limited).

    • @TANRININresulu
      @TANRININresulu Před 11 měsíci

      Maybe there could be cryptographyic extension in order to remove that obscurity… hence wasm client side server is faster than waiting responses from server in network

  • @Affstuffcom
    @Affstuffcom Před rokem +1

    Any github code ?

    • @lindblomdev
      @lindblomdev  Před 11 měsíci

      No, sorry. It was just throw away code. Was there something particular that you were interested in?