6 ms·
Excellent! I recall someone on here (HN) saying that many of Elixir's strengths are weakened significantly because K8 does similar things (auto distribution, h
by tabeth 9y ago
Excellent!
I recall someone on here (HN) saying that many of Elixir's strengths are weakened significantly because K8 does similar things (auto distribution, hot reloading, etc.)
Any truth to this? Also, can you distribute nodes on VMs and deploy them to Google Cloud?
---
As a side note, is there a front-end equivalent to Elixir? Elm is functional but is non intuitive. Elixirscript is a thing but seems a bit too early.
- willyk 9y agoThe two options you mention are the ones I see used most often (with React & Vue being 3rd/4th), but I wouldn't say any of those are "frontend equivalents".
- jrs95 9y agoThat’s just crazy to me. The amount of effort you have to put in to achieve this with Kubernetes is way beyond what you would have to do to write you application in Elixir. If you already have multiple services in another language, it may be worth the effort, but the BEAM gives you nearly for free what is relatively expensive to get elsewhere.
- hosh 9y agoElixir is great for stateless apps. So are a bunch of other platforms. Elixir is exceptional at stateful apps. And it is true, many of those things are now handled through K8S. However, K8S doesn't handle everything and requires a lot more ceremony and infrastructure than what you can get within the Elixir/Erlang ecosystem. I think there might be a way to work with Elixir + K8S in a way specific to the domain you are working with. Not everyone needs to be able to hot-reload code without dropping live connections, but if if you do, and you want to deploy on K8S, then you can try writing a K8S operator that encapsulates that idea. However: https://gravitational.com/blog/running-postgresql-on-kubernetes/ https://gravitational.com/blog/running-postgresql-on-kuberne... (which is more about how every distributed system requires deep domain knowledge, not just specifically about PostgreSQL) I have not deployed Elixir on GCP. I have deployed other things though, and I can tell you the private networking is much better set up than AWS. As far as distributing nodes, you can do that with any of the cloud providers.
- willyk 9y agoIf you looking into OTP, you'll see there's quite a but more and to some extent it does things differently than K8 (e.g., Observer, fault tolerance, concurrency and vertical/horizontal scaling w/message passing, etc.). See: https://www.manning.com/books/the-little-elixir-and-otp-guidebook https://www.manning.com/books/the-little-elixir-and-otp-guid...
- eat_veggies 9y agoHave you tried Reason[0] and Reason-React[1]? [0] https://reasonml.github.io/ https://reasonml.github.io/ [1] https://github.com/reasonml/reason-react https://github.com/reasonml/reason-react
- dominotw 9y ago> As a side note, is there a front-end equivalent to Elixir? Elm is functional but is non intuitive. Elixirscript is a thing but seems a bit too early. Purescript?
- thinkpad20 9y agoAside from both being functional languages, they have relatively little in common. Purescript has Haskell-style purity (with synchronous impurity via monads) and doesn’t have an inherent concept of processes or message passing like Elixir/Erlang do. Purescript is statically typed with no (I think?) macro system, and elixir is dynamic and makes extensive use of macros. Etc.
- AngeloAnolin 9y agoI've looked at learning Elixir paired with a front end tool and a lot of Elixir experts are pointing to the Phoenix Framework. [1] [1] http://phoenixframework.org/ http://phoenixframework.org/
- bpicolo 9y agoPhoenix is a backend framework.
- keithnoizu 9y agoit includes some grub setup for compiling static assets though, and is a fast way to get an endpoint up and running.
- hanrelan 9y agoI've used Elixir/Phoenix on K8s and there's some truth to this. For example - kubernetes' "if the process dies, kill the whole container and restart it" model doesn't work very well with Elixir (a process within the VM can die and K8s will have no idea). To some degree, K8s is replicating some of the BEAM functionality. But there's still a lot from Kubernetes that Elixir can take advantage of. For example - service discovery, autoscaling, clustering, secret management - all made easier with a K8s deployment and Elixir. I wrote a few blog posts about it a while ago if you're interested: https://medium.com/polyscribe/a-complete-guide-to-deploying-elixir-phoenix-applications-on-kubernetes-part-1-setting-up-d88b35b64dcd https://medium.com/polyscribe/a-complete-guide-to-deploying-...
- sb8244 9y agoHmm I'm not quite sure I follow the process examine. If your started process crashes (let's say supervisor fails to start due to too many failures), k8s would restart the process (your app) to try again. If a managed process in elixir dies, you could make that bring down your whole app, but generally you would want to handle it yourself. This is similar to an app server in Ruby. A single worker might die, but it's still being managed by a central coordinator. If the coordinator dies, everything is down and the app restarts
- dguaraglia 9y agoNot trying to be flippant, but by extending your analogy: if the Kubernetes supervisor dies (which is conceivable, no technology is infallible), then you are in the same scenario as something bringing your whole Elixir VM down. You can always run your Elixir VM using something like supervisord if you need another watchdog. BTW, it's very hard to bring BEAM down. Most exceptions will bring kill the faulty process, but leave the supervisor tree untouched. Only "unmanaged" code (for example, calling a C library using a NIF) might crash the whole VM. Then again, no technology is infallible.
- sb8244 9y agoTrue true, maybe there's just a single part that I was hung up on in parent comment > (a process within the VM can die and K8s will have no idea) I suppose that I see nothing wrong with this and would say that it's not weird or unusual to be the case. They're separate things, although they both achieve visually similar goals (keep things running as much as possible). My point is less about K8s vs Elixir but rather a statement that this seems acceptable and shouldn't be a reason to rule out something like running Elixir on K8s.
- fulafel 9y agoClojureScript is good for the front-end language. Though don't dismiss Elm easily either, it's so cool.