News for hackers. Stuff that matters.
Re:Ask HN: Hunting for a Framework by eagsalazar2 on Sunday December 04, 2022 @10:04AM (#33854291)
Remix, zod, tRPC(if/when API endpoints are needed), Typescript, Prisma. This stack is gorgeous. Same language and type definitions front to back is a game changer.

The realtime aspect of what you are looking for is the hard part. The only options I know of are the remix stack above (you still have to do some extra plumbing), elixir/Phoenix (or other turbo links like options but most aren't fast enough). To do realtime updates natively you need to move to evented data front to back and that is a very big move away from models the way we normally think of them. Check out eventide or resolv.js.

Re:Ask HN: Hunting for a Framework by ch4s3 on Sunday December 04, 2022 @10:30AM (#33854517)
> elixir/Phoenix (or other turbo links like options but most aren't fast enough

Phoenix specifically doesn't work like turbolinks. LiveVIew in Phoenix uses a websocket to transport data, morphdom to patch the dom, and a light process on the server to manage state. It's as fast as the internet connection for insertions into a list. In fact it is quite capable of parallel data loading just like remix, and the server can work share in parallel across as many cores as you have available on the server.

Re:Ask HN: Hunting for a Framework by lakomen on Monday December 05, 2022 @07:20AM (#33864632)
How many concurrent connections can elixir handle on an average 5 year old xeon e3 with 32gb RAM?
Re:Ask HN: Hunting for a Framework by ch4s3 on Monday December 05, 2022 @02:05PM (#33870251)
Probably a lot depending on your workload. Here's a 2015 article about getting to 2 million concurrent connections[1] with Phoenix channels. They used a bigger rack space box, but it was 7 years ago and Phoenix and Elixir have both improved a lot here. Here's another example of someone hitting a laptop with 840,000 connections[2] on an intel mac with the following specs:

> 2.5 GHz Quad-Core Intel Core i7 16 GB 1600 MHz DDR3

Obviously memory starts to be a constraint for doing anything meaningful, but you can squeeze a lot out of 32gb of ram.

[1]https://phoenixframework.org/blog/the-road-to-2-million-webs...

[2]https://josephmate.github.io/2022-04-14-max-connections/

Re:Ask HN: Hunting for a Framework by Aeolun on Sunday December 04, 2022 @11:44AM (#33855208)
Aside from replacing Remix with Next.js, this is also what I would recommend.

Remix makes things that were simple hard (apparently with the goal of doing _everything_ on the server again).

Re:Ask HN: Hunting for a Framework by bcjordan on Sunday December 04, 2022 @11:51AM (#33855272)
create-t3-app is a great starting point for folks going this path. Has optional checkboxes for db/ORM/migrations (prisma.js), auth/sessions (next-auth.js), tailwind CSS, typed client/server communication (trpc).

https://create.t3.gg/

https://github.com/t3-oss/create-t3-app

I hadn't touched much webdev for a few years, the ecosystem / build tooling has gotten a LOT better. It's back to being fun and painless to spin up a new webapp.

Re:Ask HN: Hunting for a Framework by zulvkr on Sunday December 04, 2022 @02:15PM (#33856691)
A few hours ago, I tried to setup trpc using recommended boilerplate, I also tried fresh default T3 after that.

Both got error, which seems to be due to next/next auth dependency breaking. So it's not that painless I guess.. I found this situation quite often with nextjs example template

T3 author is very responsive though, so my issue resolved quickly

Re:Ask HN: Hunting for a Framework by eagsalazar2 on Sunday December 04, 2022 @07:03PM (#33859541)
I can speak to a handful of things Remix needs to improve, but "makes things that were simple hard" is a very big generalization. Remix nets out for me big time. I've never been as productive with another framework. Also, remix does SSR but so do a lot of frameworks, is that what you mean when you say "__everything__ on the server again"??