News for hackers. Stuff that matters.
Re:Onboarding to Elixir by di4na on Tuesday June 22, 2021 @01:54PM (#27594848)
Any kind of long held connection is state ;) So websocket, long http one, database connection, etc.

Being able to tightly define what part of your app is impacted if one of these fail and restore it before the rest of the app is impacted is a game changer.

OTP also deeply force you to think of how you start and how you stop these, taking dependencies into account. It helps in cleaning up stuff.

Re:Onboarding to Elixir by bsaul on Tuesday June 22, 2021 @02:05PM (#27594989)
sure. By state i really meant working end-user business-level data. Those are the kinds that really set the type of guarantees you need for your system.

I guess i'll have to try OTP one time to understand why so many people rave about it. I only know one guy who had made real work with erlang / otp and he told me it was beautiful, but not quite as relevant anymore, because of k8s. But i guess i need to make my own opinion.

Re:Onboarding to Elixir by ch4s3 on Tuesday June 22, 2021 @03:26PM (#27596018)
If the value you're looking for is just 0 downtime, then k8s solves that for you. As others have pointed out, the BEAM/Elixir/Erlang give you great process isolation and resilience to small failures, timeouts, weird transient issues, big short lived spikes traffic, and stuff like that.

With respect to user data, a supervised process can crash and the supervisor can restart with the last known good state of that data. It requires some thought on the part of the developer to achieve this, but it's really powerful.

Re:Onboarding to Elixir by nivertech on Wednesday June 23, 2021 @07:17AM (#27603139)
You don't need k8s for 0 downtime, putting a monolith into an autoscaling group behind loadbalancer solves that ;)