Live data from Hacker News

Adding Elixir to our Nextjs app (2022)

linen.dev

11–20 of 31 posts

Re: Adding Elixir to our Nextjs app (2022)

#11
post #9

Earlier quoted context omitted.

I've never tried it but I think I've heard of it. Regardless, it's a third-party tool, so not at the same level of support as Go.

Technically ecto, phoenix, plug, cowboy/bandit and Jason are third party tools too.

Yes, I'm aware. I've been programming in Elixir since 2014. I didn't intend to imply that being third-party means these are bad tools, they're not. They're great. But Go people often harp about how much stuff is in the standard library, so it felt relevant to mention.

Re: Adding Elixir to our Nextjs app (2022)

#12
post #2

Why not use Go? They have one of the best networking stacks among language standard libraries, excellent support for low latency soft real-time concurrent operations, and single binary deployment is trivial.

Not OP.

Very personal opinion:

Go is an ugly language and I don't enjoy working in it for that reason alone.

Outside of that, I also don't like the language design for a lot of its features.

Though, admittedly, the goroutines part is not one of those choices I dislike. But the error handling pattern, generics and a few other things are super meh to me.

And everything Go does with networking and concurrency, Elixir does better.

Elixir just doesn't have the backing of a big name like Google so it doesn't have the same popularity.

Re: Adding Elixir to our Nextjs app (2022)

#13
post #2

Why not use Go? They have one of the best networking stacks among language standard libraries, excellent support for low latency soft real-time concurrent operations, and single binary deployment is trivial.

Sometimes I want partial application and other functional paradigms... to reduce LOC by 90%

Re: Adding Elixir to our Nextjs app (2022)

#14
post #11

Earlier quoted context omitted.

Technically ecto, phoenix, plug, cowboy/bandit and Jason are third party tools too.

Yes, I'm aware. I've been programming in Elixir since 2014. I didn't intend to imply that being third-party means these are bad tools, they're not. They're great. But Go people often harp about how much stuff is in the standard library, so it felt relevant to mention.

:) just thought it was a good idea to bring it up to make clear some major differences between the two communities

Re: Adding Elixir to our Nextjs app (2022)

#15
post #2

Why not use Go? They have one of the best networking stacks among language standard libraries, excellent support for low latency soft real-time concurrent operations, and single binary deployment is trivial.

go is great at a lot of things but if you want a multi clustered websocket solution, elixir is the absolute best in this category.

go has go threads. elixir has the actors, futures, message passing, immutable data structures and the OTP platform. OTP is killer and gives you genservers with pubsub and the ability to have thousands of tiny stateful processors PER machine.

Its all battle tested too.

comparing go to elixir in this particular case is like comparing a piper cub to a jet liner

source: 5 years of experience building an elixir startup with realtime sync between devices over websockets as a killer feature.

Re: Adding Elixir to our Nextjs app (2022)

#16
> But after some more research we heard a bunch of negative feedback about Socket.io and one of our team members had a poor experience using Socket.io.

Would have loved to have seen a section devoted to what feedback you heard, what the team member's poor experience was, and how you felt confident that Elixir & Phoenix would solve those problems.

Re: Adding Elixir to our Nextjs app (2022)

#17
post #2

Why not use Go? They have one of the best networking stacks among language standard libraries, excellent support for low latency soft real-time concurrent operations, and single binary deployment is trivial.

golang is pretty rudimentary versus the BEAM and OTP. It is hard to compare erlang/elixir to a traditional language. They benefit from the fact that you can run literally hundreds of thousands of processes on a single node all doing their own independent thing and managing their own state.

Re: Adding Elixir to our Nextjs app (2022)

#18
post #2

Why not use Go? They have one of the best networking stacks among language standard libraries, excellent support for low latency soft real-time concurrent operations, and single binary deployment is trivial.

General distaste for writing `if err := nil { return err }` over and over and over

Re: Adding Elixir to our Nextjs app (2022)

#19
post #13
post #2

Why not use Go? They have one of the best networking stacks among language standard libraries, excellent support for low latency soft real-time concurrent operations, and single binary deployment is trivial.

Sometimes I want partial application and other functional paradigms... to reduce LOC by 90%

I’m currently in the process of picking up elixir. When you say partial application, are you referring to the use of the capture operator `&`?

Re: Adding Elixir to our Nextjs app (2022)

#20

Since this was written about 8 months ago. Our Elixir/Phoenix service has been incredibly stable and I can't think of a single time we had an issue with it.

Have you considered moving the logic that is in the Node backend over to phoenix, so you just have a single backend component?
Post reply on HN