|
|
|
|
|
by cultofmetatron
528 days ago
|
|
well for one, in elixir, you can get away with having a monolith architecture. elixir has the concept of a "genserver" which is a dedicated thread. the beam has a message passing system baked in. So lets say I want to create a service to which I want to send jobs, I can create a genserver which is just a file taht inherits genserver behavior and mount it at the top level's application.ex in the supervision tree. phoenix will take care of keeping it up and monitoring it in place of crashes. You can also have your api nodes connect to each other and maintain persistent data across them. this means a thread in one machine can send data to a thread on a completely different machine. If I were to do this in nodejs, I would need to setup a supervisor. I'd need a message passing broker like rediis or rabbitmq and I'd need an orchestrator to manage the various services. in elixir, we get all this baked in. I can add a microservice as easily as you can add a controller in rails. Also, the websocket system in elixir is so good makes nodejs look like a toy. |
|