Realtime data with WebSockets on SolidStart

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

КОМЕНТАРІ • 11

  • @AtilaDotIO
    @AtilaDotIO  3 місяці тому +2

    Code from the video is on GitHub: github.com/atilafassina/solidstart-websockets

  • @TheAlexLichter
    @TheAlexLichter 3 місяці тому +7

    How much of the WebSocket server code comes from Vinxi and how much comes from Nitro/h3/crossws? 👀

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

      in the `ws.ts` all helpers are re-exported from SolidStart. So I'd say 100% comes from h3/crossws
      what Vinxi does is setup the adjacent router for the WS stuff (in the app.config.ts), I don't think that's a requirement for Nitro, it's just how Vinxi operates the multiple routers (CDN, Client, and Server) - where server is now divided into Server/RPC and WebSocket

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

    awesome! Could it stream updates data as user inputting? Besides, how it performances? Compare to using signal to keep sync between server and client?
    thanks for your share

    • @AtilaDotIO
      @AtilaDotIO  3 місяці тому

      SolidStart has streaming support for server to client , so that’s possible. I’ll prep a video about that and I’ll see how to plug it to the websockets!! The sync wouldn’t be a signal per se, but a streaming http connection, in practice it feels more like an observer (RxJS style) than a signal because the streaming request is Push only while I signal is two-way (Push-Pull).
      So,
      client-server would be multiple submissions
      server-client would be http streaming
      Thanks for the idea! 👍

    • @haonus
      @haonus 2 місяці тому

      ​@@AtilaDotIO Cool, I am looking forward to diving into it.

  • @ScottSpencePlease
    @ScottSpencePlease 3 місяці тому +2

    OMG! You pronounce it Achla! You've never corrected me! Sorry man!

    • @AtilaDotIO
      @AtilaDotIO  3 місяці тому

      Hahaha… I just normally say it with a Brazilian accent because it rolls out for naturally sometimes. But the “a-TTI-la” is closer to the original Hungarian pronunciation and I like it just as much!
      Thanks for caring, Scott!! You’re awesome!

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

    Wait.
    Are you Brazilian, too? Do you live in Germany, too?🤯🤯
    Get out hahah. No way😂.
    [Regarding your reply on the other comment and your channel location]

    • @AtilaDotIO
      @AtilaDotIO  3 місяці тому

      Yeah!! Gaucho in Berlin 🧉

    • @theintjengineer
      @theintjengineer 3 місяці тому

      @@AtilaDotIO, caraca, que dahora, man.
      Lemme know when you get down here [Munich haha].
      Cheers.