Skysoft13

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

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

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

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.

BartOtten

BartOtten

Why not? Because the upside it has is largely overrated for most projects but it brings tons of complexity. The kind of costs you only should be willing to pay if your app is so complex/large that is is a problem.

Real microservices don’t share a database. Figure how you do joins, how you ensure all services have the same definition of a ‘user’, how you version interfaces, etc etc.

Ohhh…and stay away from NoSQL. As cool as they make it sound; it super fun for prototyping but once apps grow it soon becomes a burden only to become valuable again once you have enormous amounts of data (but then your schema is probably less fluid so that’s okey)

hauleth

hauleth

Why you want microservices in the first place?

Where Next?

Popular in Questions Top

sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
LegitStack
I’m hoping you guys can give me some general advice and perhaps code examples if you’re feeling up to it. I’m very interested in Elixir,...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New

Other popular topics Top

pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 45766 226
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 42633 214
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New

We're in Beta

About us Mission Statement