4 ms·
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 cha
by eagsalazar2 4y ago
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.
- ch4s3 4y ago> 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.
- lakomen 4y agoHow many concurrent connections can elixir handle on an average 5 year old xeon e3 with 32gb RAM?
- ch4s3 4y agoProbably 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-websocket-connections https://phoenixframework.org/blog/the-road-to-2-million-webs... [2]https://josephmate.github.io/2022-04-14-max-connections/ https://josephmate.github.io/2022-04-14-max-connections/
- Aeolun 4y agoAside 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).
- bcjordan 4y agocreate-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://create.t3.gg/ https://github.com/t3-oss/create-t3-app 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.
- zulvkr 4y agoA 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
- eagsalazar2 4y agoI 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"??