Live data from Hacker News

Datastar: Web Framework for the Future?

chrismalek.me

131–140 of 161 posts

Re: Datastar: Web Framework for the Future?

#131

Earlier quoted context omitted.

You can have microsecond updated, once the connection is established you can stream. Regardless of your latency. Say your ping is 100 (units are irrelevant here). It will take you 100 before you see your first byte but if the server is sending updates down that connection you will have data at whatever rate the server can send data. Say the server sends every 10. Then you will have updates on the client at 100 110 12…

That's still 100 irrelevant units later than the server sent the update. This is like saying the first byte of the packet takes 100ms to arrive but the subsequent bytes in the packet are instant! It's not quite right. You'll never have updates in microseconds even if your ping is, say, 7ms. At best you can be ~2-4x as fast as long polling on HTTP/1 -- an order of magnitude is a ridiculous statement.

You're right! 200-400% faster is so useless.

Re: Datastar: Web Framework for the Future?

#132

Also worth checking out is the recent release of RedwoodSDK: https://news.ycombinator.com/item?id=43657215

Haha, didn't realize redwood was already deprecated and forked into redwoodsdk under new management.

Looks good though, like remix except without those pesky route handlers. Then again I didn't get around to using the RR version. I wish the doc had a "differences with RR" section

Re: Datastar: Web Framework for the Future?

#133

This matches 100% my experience and thoughts. I really enjoy HTMX and it's a blessing for my small-scale reactivity web interfaces, but I can immediately tell: "Well, this is hard to organize in a way that will scale with complexity well. It works great now, but I can tell where are the limits". And when I had to add alpine.js to do client-side reactivity, it immediately was obvious that I'd love to have both sides (…

> And when I had to add alpine.js to do client-side reactivity, it immediately was obvious that I'd love to have both sides (backend and frontent) unified.

https://alpine-ajax.js.org/

Re: Datastar: Web Framework for the Future?

#134

If you want a solid demo of what you can do with datastar. You can checkout this naive multiplayer game of life I wrote earlier in the week. Sends down 2500 divs every 200ms to all connected cliends via compressed SSE. https://example.andersmurphy.com/

your server logs are going to be an intelligible mess. This framework will be a yuge money maker for AWS CloudWatch.

Re: Datastar: Web Framework for the Future?

#135

Earlier quoted context omitted.

So how are your server bills? Does Datastar supports caching/prerendering?

So being on the front page of hacker news twice in 24 hours. The multiplayer game of life game is running on a 15.59$/month 4 core AMD 8GB ram shared VPS (hetzner) and only at about 30% load. That's with a Clojure backend running very naive code.

I believe it. Part of the issue I suspect is that generation JS truly does not understand how fast the old school GC’d runtimes (e.g. JVM/CLR) are at this point.

Re: Datastar: Web Framework for the Future?

#136

Earlier quoted context omitted.

So being on the front page of hacker news twice in 24 hours. The multiplayer game of life game is running on a 15.59$/month 4 core AMD 8GB ram shared VPS (hetzner) and only at about 30% load. That's with a Clojure backend running very naive code.

I believe it. Part of the issue I suspect is that generation JS truly does not understand how fast the old school GC’d runtimes (e.g. JVM/CLR) are at this point.

It reminds me of the articles you see from time to time about how someone successfully moved millions of rows of data in the cloud for less than a hundred dollars or some such absurdity.

It'd be hilarious if it weren't so deeply discouraging and tragic.

You might have heard of Eroom's Law, which is Moore's Law backwards. It states that software bloat will soak up all gains from Moore's Law.

Well, with cloud we now have a whole industry with an economic incentive to put Eroom's Law into practice, since cloud makes more money the more inefficient things can become. So to do what a simple local app could do in a minute must now be done across five different services with microservice backends, etc.

Re: Datastar: Web Framework for the Future?

#137

Earlier quoted context omitted.

Everyone knows no one can beat physics. That doesn't excuse claiming you can beat physics.

Latency doesn't affect server update rate it affects time to first data. I can have a ping of 500ms and still get an update from a stock ticker every 5 milliseconds. They will arrive at 500 505 510 etc.

I think most people would have a different understanding of what's entailed in an "update".

Re: Datastar: Web Framework for the Future?

#138

Earlier quoted context omitted.

So being on the front page of hacker news twice in 24 hours. The multiplayer game of life game is running on a 15.59$/month 4 core AMD 8GB ram shared VPS (hetzner) and only at about 30% load. That's with a Clojure backend running very naive code.

I believe it. Part of the issue I suspect is that generation JS truly does not understand how fast the old school GC’d runtimes (e.g. JVM/CLR) are at this point.

It's not just the performance, it's that there is a lot less ecosystem churn. I can run Clojure/Java code I wrote 10 years ago and it will still work.

Re: Datastar: Web Framework for the Future?

#139

Earlier quoted context omitted.

With additional swipes at ecosystems and ‘must be written in go’ with no real justification as to _why_ more than the developers preference

Robust performance, error handling that's not stuck in 1982, and cross platform would be my guesses, but agree the OP could be more spicific as there are more benefits.

By "error handling" in Go you mean "if err == nil" repeating every five lines throughout the codebase?

Re: Datastar: Web Framework for the Future?

#140

Earlier quoted context omitted.

Latency doesn't affect server update rate it affects time to first data. I can have a ping of 500ms and still get an update from a stock ticker every 5 milliseconds. They will arrive at 500 505 510 etc.

I think most people would have a different understanding of what's entailed in an "update".

The original bit from the datastar website that was quoted was talking about polling.
Post reply on HN