I normally watch technical videos in 1.75x but this guy has a FAAAST brain. I had to watch on 1x. Thanks for bringing different ideas to the masses! I use a similar approach in my web applications. Server heavy logic which returns HTML. No HTMX. It's uber fast and dead simple to debug/understand.
This is incredible, thanks for setting up this amazing conversation! Delaney, ive been working on an idea that mirrors so much kuch of what youre talking about but using rust. Id love to talk to you about some of these ideas.
Would love to see examples of people using rust (I'm trying to learn it for backend) and want to use htmx/datastar with it. Anything one could follow? Sorry to interruption!
@@hypermedia-tv It should be the default when you need the server to send a message to the client. Sockets should be the niche thing for special use-cases. It blew my mind to make a "real time" chat app with so little effort while everyone around me was struggling with socket libraries.
What should you know about “complect”? It’s bad! Don’t do it! I absolutely love this Rich Hickey talk! Once I watched it my whole world of programming turned upside down and I started to notice how unnecessarily complex things become literally everywhere.
I love the interview, but missing the links to the talks. Is the snake demo / data star introduction talk available online? Data star name for the library sounds awesome until you try to search for it on youtube. I agree in a lot of points, the only thing I'm disagreeing is using a KV database on the backend instead of relational (I built a reactive relational database on top of SQLite which fits the server side push model perfectly).
I use both @ritterdam. The value of using a KV (in NATS case at least) is it has native push/watcher semantics so its very easy to share state. NATS+SQlite+DuckDB is an awesome combo! My issue is I can get a HA KV across globabl superclusters in a few lines. Would like to known more about your approach built on SQLite though!
Is there a downside of keeping one SSE connection open constantly for each client? I would imagine there would be a limit for open connections for a backend
Yeah, i wish I understood the answer to that question fully -- I think the server can usually handle a LOT at once, if i understand correctly, does that sound right @delaneygillilan ?
Hi, I have a lot of questions after listening this podcast. For me, HTMX meets my need for simplicity for certain interactions, which Datastar also seems to do. What I noticed as the main difference is the mode of exchange with the server. XHR for one, SSE for the other. I don't need a super-optimised connection. Either solution meets my needs. For example, if I'm updating a shopping card, or a table with dynamic sorting. One or other of the solutions will meet my needs. I'm not a millisecond-cruncher and I don't need the server to send live information. In short, I'm wondering about the best practice to adopt without getting into server configurations that require a specialist. I like the simplicity of my Lamp stack. Thanks Could you add datastar in your video title ?
So I'll add my two cents, but with the caveat that I haven't actually worked much with data star: if you like the LAMP setup, htmx fits into that realllllly well! But i think both can clearly accomplish what you want to do. For instance, in htmx, you might do an OOB Swap (out of band swap) to update the cart count
Great conversation. However, the data-star library has too many string based interactions for my liking. I don't know how debugging issues will look like in this
Thank you UA-cam algorithmic recommendation gods. This is EXACTLY the architecture I thought of when I encountered HTMX. I was gearing up to try writing a simple version of it for my next project. I am very, very excited to try it out...without having to write it myself! (Also, those baked-in captions are extremely distracting. I had to minimize the video and listen to just the audio because every time I tried to watch, my eye was constantly drawn to that obnoxious word highlight. And it's even worse because the transcript is clearly not edited and has tons of transcription mistakes. Please get rid of the kindergarten singalong.)
thank you for the comment and the note on the subtitles! I wish I could remove them from here, but i will need to do it for my next video instead. YT doesn't let me replace videos for any type of correction ):
thanks for the feedback! still working on the best format for these, I think the highlighted might be good for really short videos but not something this long
@@eloy4 demphasized subs in latest video -- appreciate your feedback! this is still mostly an audio podcast, so haven't been doing much screen share or live coding but i like the idea
I honestly I'm struggling to understand many of the arguments here. The architecture looks very statefull and not really suited for most web pages because it won't scale. The interviewer tries to push back on many of arguments but the arguments are always based on the examples that make no sense. The interviewee makes many arguments about how this is simple but then: - The application is stateful - You need an event bus to serve requests - Uses SQLite to cache - Uses persistent connections/SSE I'm really struggling to understand this big realization. For me hypermedia requires a stateless architecture and this is all but stateless. I'm sure this model is great build highly interactive game like application. Most webapps and web pages are not like that.
Thanks for the thoughtful response!! I am still working to understand the real-world implementation of this architecture, but I think it is a fascinating concept that I wish I had discovered earlier. I am so used to working with stateless requests that I have a hard time picturing what the setup is like when you just ... open a single constant connection and let it stream when it needs to. If I understand Delaney correctly, it sounds like it may actually scale quite well (he is serving large numbers of single connections simultaneously, rather than making thousands of requests via polling/SPA etc). Delaney makes a great case here for how enticing it is -- if I get to try it out in my native Laravel/PHP I will keep you updated, maybe do a followup video. And similarly, let me know if it sparks any ideas in your dev environment!
@@hypermedia-tv a large number is relative. It all depends on your application domain and the number of users you have to serve. At my work I deal with 100s of millions of users per month. I cannot afford to have satefull connections with millions of users. A stateless cacheable CDN distributed web app scales several orders of magnitude better than this architecture. There are so many security, performance, scalability, state management,availability concerns that are not addressed by the author.
I think I can help. I've been using a similar architecture since before jQuery/Ajax/fetch was even a thing. There are many different topics in your messages and I wont address all of them but the idea is: logic stays on the server as much as possible. And by that I mean not even hx-target on the client, so no HTMX as well, the target is for the server logic to decide (in this paradigm at least). In my implementations, I don't use CQRS or SSE. Just simple ajax calls. 1) Non-ajax requests return a full page. 2) Ajax requests originated from JavaScript on the frontend ALWAYS returns HTML fragments which can be tags with code to execute on the frontend for example. The advantage is that logic is even more centralized on the server, even more than when using HTMX. Livewire also has this advantage but Livewire is inferior in my opinion because: it's a contrived, hard to debug, fragile, disconnect prone protocol whereas "just return HTML/" from the server is as easy as it gets to debug.
To be clear, you send as much data as often as you choose. If you are doing real time its a firehose. But i have turn based games that only send down when a turn is played. In idle you are using no cpu and very little memory.
Sorry to hear it my friend and fellow hypermedia enthusiast! I added an unlisted version with easier subtitles here if that helps: ua-cam.com/video/kxl71T5XoQ0/v-deo.html
I normally watch technical videos in 1.75x but this guy has a FAAAST brain. I had to watch on 1x. Thanks for bringing different ideas to the masses! I use a similar approach in my web applications. Server heavy logic which returns HTML. No HTMX. It's uber fast and dead simple to debug/understand.
haha its true can't imagine following this on >1x
I speak at 144 sentences a minute. Sorry about that!
This is incredible, thanks for setting up this amazing conversation! Delaney, ive been working on an idea that mirrors so much kuch of what youre talking about but using rust. Id love to talk to you about some of these ideas.
Would love to see examples of people using rust (I'm trying to learn it for backend) and want to use htmx/datastar with it. Anything one could follow? Sorry to interruption!
First! Thanks for the great conversation!
thank you! this is a really fascinating thing you have built here
Thanks, gentlemen. I'm 40 minutes in and loving it.
thank you!!
SSE is overpowered. So fast, so easy, zero dependency
looking forward to trying it out, this definitely blew my mind
@@hypermedia-tv It should be the default when you need the server to send a message to the client. Sockets should be the niche thing for special use-cases.
It blew my mind to make a "real time" chat app with so little effort while everyone around me was struggling with socket libraries.
What should you know about “complect”? It’s bad! Don’t do it!
I absolutely love this Rich Hickey talk! Once I watched it my whole world of programming turned upside down and I started to notice how unnecessarily complex things become literally everywhere.
nice, i will check that out!
this one i am guessing ua-cam.com/video/SxdOUGdseq4/v-deo.html
@@hypermedia-tv yes, it is the one!
I don’t know how many times I rewatched it already)
I love the interview, but missing the links to the talks. Is the snake demo / data star introduction talk available online? Data star name for the library sounds awesome until you try to search for it on youtube. I agree in a lot of points, the only thing I'm disagreeing is using a KV database on the backend instead of relational (I built a reactive relational database on top of SQLite which fits the server side push model perfectly).
I added a few links, but Delaney's Utah JS talk has not been posted yet. I will post as soon as I can, thank you for the reminder!
I use both @ritterdam. The value of using a KV (in NATS case at least) is it has native push/watcher semantics so its very easy to share state. NATS+SQlite+DuckDB is an awesome combo! My issue is I can get a HA KV across globabl superclusters in a few lines. Would like to known more about your approach built on SQLite though!
ua-cam.com/video/0K71AyAF6E4/v-deo.htmlsi=9J_pca66Xup3VojU
Is there a downside of keeping one SSE connection open constantly for each client? I would imagine there would be a limit for open connections for a backend
Yeah, i wish I understood the answer to that question fully -- I think the server can usually handle a LOT at once, if i understand correctly, does that sound right @delaneygillilan ?
Hi,
I have a lot of questions after listening this podcast. For me, HTMX meets my need for simplicity for certain interactions, which Datastar also seems to do.
What I noticed as the main difference is the mode of exchange with the server. XHR for one, SSE for the other. I don't need a super-optimised connection.
Either solution meets my needs.
For example, if I'm updating a shopping card, or a table with dynamic sorting. One or other of the solutions will meet my needs. I'm not a millisecond-cruncher and I don't need the server to send live information. In short, I'm wondering about the best practice to adopt without getting into server configurations that require a specialist.
I like the simplicity of my Lamp stack.
Thanks
Could you add datastar in your video title ?
So I'll add my two cents, but with the caveat that I haven't actually worked much with data star: if you like the LAMP setup, htmx fits into that realllllly well! But i think both can clearly accomplish what you want to do.
For instance, in htmx, you might do an OOB Swap (out of band swap) to update the cart count
Can you please give links to the talks and demos
Thank you for the reminder -- I added a few links, but the UtahJS talk hasnt been posted yet. Will add here when it is!
ua-cam.com/video/0K71AyAF6E4/v-deo.htmlsi=9J_pca66Xup3VojU
Hey, I'm really interested in this blizzard talk about net code, can someone share a link with me?
Excellent interview btw
Great conversation. However, the data-star library has too many string based interactions for my liking. I don't know how debugging issues will look like in this
Thank you! And I still haven’t tried out a bigger project in data star, looking forward to it
Thank you UA-cam algorithmic recommendation gods.
This is EXACTLY the architecture I thought of when I encountered HTMX. I was gearing up to try writing a simple version of it for my next project. I am very, very excited to try it out...without having to write it myself!
(Also, those baked-in captions are extremely distracting. I had to minimize the video and listen to just the audio because every time I tried to watch, my eye was constantly drawn to that obnoxious word highlight. And it's even worse because the transcript is clearly not edited and has tons of transcription mistakes. Please get rid of the kindergarten singalong.)
thank you for the comment and the note on the subtitles! I wish I could remove them from here, but i will need to do it for my next video instead. YT doesn't let me replace videos for any type of correction ):
if you want it to be taken more seriously, a linter/lsp is needed for the code in strings
The talk mentioned in the description is out now.
ua-cam.com/video/0K71AyAF6E4/v-deo.htmlsi=glsJWpo8fluRXy3G
awesome, thank you! added to the video description
These subs are just too distracting. Highlighting word by word is a little too much for me.
thanks for the feedback! still working on the best format for these, I think the highlighted might be good for really short videos but not something this long
@@hypermedia-tv I would say that showing some code along the conversation would help a lot more than subs.
@@eloy4 demphasized subs in latest video -- appreciate your feedback! this is still mostly an audio podcast, so haven't been doing much screen share or live coding but i like the idea
I found the subtitles very helpful, and I also liked the word by word highlighting. Please keep them.
@@HenryLaxen ahhh damn split call! i think i'll be doing the subtitles but just a bit subtler, maybe i can even highlight in a more simple way
I honestly I'm struggling to understand many of the arguments here. The architecture looks very statefull and not really suited for most web pages because it won't scale.
The interviewer tries to push back on many of arguments but the arguments are always based on the examples that make no sense.
The interviewee makes many arguments about how this is simple but then:
- The application is stateful
- You need an event bus to serve requests
- Uses SQLite to cache
- Uses persistent connections/SSE
I'm really struggling to understand this big realization. For me hypermedia requires a stateless architecture and this is all but stateless. I'm sure this
model is great build highly interactive game like application. Most webapps and web pages are not like that.
Thanks for the thoughtful response!!
I am still working to understand the real-world implementation of this architecture, but I think it is a fascinating concept that I wish I had discovered earlier. I am so used to working with stateless requests that I have a hard time picturing what the setup is like when you just ... open a single constant connection and let it stream when it needs to. If I understand Delaney correctly, it sounds like it may actually scale quite well (he is serving large numbers of single connections simultaneously, rather than making thousands of requests via polling/SPA etc).
Delaney makes a great case here for how enticing it is -- if I get to try it out in my native Laravel/PHP I will keep you updated, maybe do a followup video. And similarly, let me know if it sparks any ideas in your dev environment!
@@hypermedia-tv a large number is relative. It all depends on your application domain and the number of users you have to serve.
At my work I deal with 100s of millions of users per month. I cannot afford to have satefull connections with millions of users.
A stateless cacheable CDN distributed web app scales several orders of magnitude better than this architecture.
There are so many security, performance, scalability, state management,availability concerns that are not addressed by the author.
If your site is static, you don't need anything like HTMX or Datastar. You need to be explicit on what you mean by "it won't scale"
I think I can help. I've been using a similar architecture since before jQuery/Ajax/fetch was even a thing. There are many different topics in your messages and I wont address all of them but the idea is: logic stays on the server as much as possible. And by that I mean not even hx-target on the client, so no HTMX as well, the target is for the server logic to decide (in this paradigm at least).
In my implementations, I don't use CQRS or SSE. Just simple ajax calls.
1) Non-ajax requests return a full page.
2) Ajax requests originated from JavaScript on the frontend ALWAYS returns HTML fragments which can be tags with code to execute on the frontend for example.
The advantage is that logic is even more centralized on the server, even more than when using HTMX. Livewire also has this advantage but Livewire is inferior in my opinion because: it's a contrived, hard to debug, fragile, disconnect prone protocol whereas "just return HTML/" from the server is as easy as it gets to debug.
To be clear, you send as much data as often as you choose. If you are doing real time its a firehose. But i have turn based games that only send down when a turn is played. In idle you are using no cpu and very little memory.
English is not my native language, subtitle van help but with red highlight is just horrible! I left.
Sorry to hear it my friend and fellow hypermedia enthusiast! I added an unlisted version with easier subtitles here if that helps:
ua-cam.com/video/kxl71T5XoQ0/v-deo.html