Re:Elixir in Depth – Reading and personal notes
by tmat on Thursday August 17, 2017 @12:49PM
(#15038426)
Phoenix is completely unnecessary though. I have gone away from it and just use good old Plug and Elixir. Works amazing for me.
[ Parent
| on HN ]
Re:Elixir in Depth – Reading and personal notes
by brightball on Thursday August 17, 2017 @12:54PM
(#15038479)
Different strokes. One of the big Phoenix perks is that using it instead of just raw Plug has very little performance drop off. It's not a Rails vs Sinatra situation.
The Phoenix Channels implementation for websockets and the view layer for web requests are pretty phenomenal IMHO.
Re:Elixir in Depth – Reading and personal notes
by novembermike on Thursday August 17, 2017 @05:34PM
(#15041250)
Isn't Phoenix just Plug + Ecto + generators and a folder structure? I always saw it as "how to use Plugs" rather than a separate project.
Re:Elixir in Depth – Reading and personal notes
by gamache on Thursday August 17, 2017 @07:30PM
(#15042024)
There are some unique bits too. Phoenix Channels is a beautiful, shit-simple pub/sub abstraction on WebSockets and provides both JS and Elixir libraries. And then came Phoenix Presence, which can track shared state (like a user's online status) in a durable and fault-tolerant way.
Both are useful libraries, but the fact that they work in server clusters as well as single-node deployments is the real kicker. That's just how Erlang rolls.
Re:Elixir in Depth – Reading and personal notes
by tmat on Friday August 18, 2017 @08:42AM
(#15045576)
That's just genservers though right? All of this stuff is just Elixir and generally can be done in Elixir in a few lines of code.
We're experimenting with a truly OTP driven web application right now(No API) where we connect the React app directly to the Elixir backend and only persist to a database on log out. Everything else is persisted in memory and run through genservers which are self healing and self hydrating.