-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Node with Bun #81
Comments
This seems like the way to go, there's a couple of issues that could be possibly closed by this. Anyone feel free to pick it up or create a separate package like https://github.com/revelrylabs/elixir-nodejs |
There are a few ideas I have for fixing SSR, but all would require experimentation. One idea is creating a general purpose cnode addon for Node.js. That way, Node.js does work and replies to the erlang messages it receives with the rendered components. This would also offload some of the cost of converting JavaScript types to erlang terms since the communication and conversion is done natively. The other idea is to use something like zmq and create a communication protocol with Node.js. Even going with Bun and implementing a cnode there might speed things up. Of course doing this communication over TCP could actually end up slowing things down. There are also other things to try with the existing Port - like avoiding converting data received from the Port to a binary and just using the charlist it passes instead and not trying to encode it using Jason. Opinions on making an SSR behaviour and allowing configuration to define what SSR module gets used? This would make experimentation and testing with various implementations easier. |
Great idea to create an SSR behaviour. I can imagine some people would still want to use As for the implementation I'm not familiar with I'm mainly looking at speed and reliability. Whichever is fastest and renders without issues would be ideal. |
Sounds good. I will try to put something together to get an SSR behaviour. |
https://github.com/crbelaus/elixir_bun It seems there is already a Bun package for Elixir. I'll leave it here for reference |
Have you considered Deno and specifically deno_ex instead of Node or Bun? Svelte seems to be available too https://deno.land/x/[email protected] |
Yes although I'm not sure if deno would fix the performance issues. In any case, I want the SSR 'runtime' to be configurable, so you'd have the option to choose between Node, Bun or Deno (and maybe others later). |
Bun 1.0 was released last week. There are many issues with SSR - it's slow and at times erratic. Perhaps Bun is the answer.
https://bun.sh/guides/ecosystem/sveltekit
The text was updated successfully, but these errors were encountered: