Skysoft13
Is Elixir good for microservices?
I am fun of elixir and I want to move with elixir, but someone recommend go and python for microservices, I am not sure, I have to use all them for microservices, or which one is best for me?
Most Liked
gregvaughn
Please define “microservices”. Do you mean them as a physical deployment model? If so, I think that is a pox on the software industry, pushing complexity into the network and interfaces and devops. If you mean it as a logical model, then, yes, each BEAM process is a microservice. It is isolated from its peers from crashes due to supervision trees. They communicate via memory-copied messages (however binary vs. json).
I am hugely in favor of logical microservices in an Elixir release, but I have issues with the more conventional meaning of the term.
dimitarvp
That’s the wrong question to ask. Much better question is: “Why have microservices?”
The classic microservices are basically self-contained apps that still have to work together and each has a separate database. That’s a nightmare to maintain because what can be a simple function call is now a networked exchange of messages – needlessly complex (and 1000x times slower, too)! Even something like 2 separate microservices is going to be a huge drain of your time and energy.
Advice: do NOT fall for hyped up videos or “tutorials”, do NOT listen to some 22 year olds that barely have one production project behind them but are now excited because they themselves saw some hyped up video.
IT work (programming included) is about ruthlessly managing and reducing complexity. Do NOT introduce complexity in your paid work. Oh, and don’t mix languages unless you are forced to. Stick to one language.
If you are so hyped up about something, try it on your own time and on a hobby project. If you do that in your paid work I promise you that you’ll dearly regret it and will curse your life.
derek-zhou
I’ll echo what @gregvaughn and @dimitarvp have said. However, if it was decreed from above that you have to use a microservice approach, then the answer is yes, Elixir can do microservices, and monolithic, and everything in between.
I’ve never seen anyone voluntarily build a bunch of microservices in their personal hobby project. If I were a masochist, there are easier ways to torture myself.
Last Post!
dimitarvp
Yeah, the problem in these discussions is everyone’s definitions of various terms are slightly (or severely) different.
While the BEAM is great for microservices-in-a-single-VM, it’s quite terrible at “a microservice is a single isolated program that must be able to cold-start in less than 50ms”.
So I agree, right tool for the job. For my definition of microservices (that I just mentioned) I see no other choice except Rust, Golang, OCaml and other languages that generate very fast binaries.
Though for at least 80% of everything I have in mind I’d still go with Elixir because the BEAM is that good; however, you can’t have good security isolation if you have several programs living in the same VM. And that is very important in a number of business scenarios where there is regulation and security licensing and compliance.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









