5 ms·
Just one example: With Elixir and the Phoenix Channels library[1], soft real time, bidirectional pub-sub communication is incredibly simple. Startlingly easy,
by gamache 10y ago
Just one example:
With Elixir and the Phoenix Channels library[1], soft real time, bidirectional pub-sub communication is incredibly simple. Startlingly easy, in fact. If this describes "the tricky part" of an application, Elixir is a substantially better choice than other languages right now.
Comparing Elixir to JS isn't fair. Even ES6 is still kind of a shitty language with shitty concurrency primitives. The main reason JS enjoys the popularity it has on the server-side is because lots of people are afraid of learning a new language and everyone knows it from the browser, not because JS is a particularly expressive, fast, elegant, or concurrency-ready language.
[1] http://www.phoenixframework.org/docs/channels http://www.phoenixframework.org/docs/channels
- qaq 10y agoJS enjoys popularity among other things because people don't want to write code twice. SPAs at a minimum need server side rendering for SEO and faster initial delivery for better customer experience. To be honest ES6 and TypeScript is very far from shitty. If you take a close look at people who are pushing node adoption in major projects they are anything but "people who are afraid of learning a new language".
- andrewingram 10y agoFor my personal project, my web client is written in React (with Relay), talking to an Elixir-based GraphQL server. I'm still learning the language (Elixir), but i'm much more productive than I am with my Relay-based project at work which is using the JavaScript implementation of GraphQL.
- qaq 10y agoThat very well might be true and will work well until you need to support server side rendering for SEO :)
- andrewingram 10y agoSorry, I didn't explain well. When I say client I also mean server-side rendering since it's basically the same code.
- rcaught 10y agoYou have to write code twice, otherwise you are trusting everything the client sends.
- qaq 10y agoHmm don't really follow your argument. The only extra thing I need to write are checks to exclude code that should not be executed server side. Thats a long way from effort required to implement same thing in 2 languages.
- davidw 10y ago> soft real time That's basically meaningless in the presence of the internet. I'd say "low latency".