Hello #devElixir!!! Welcome to #FullStackElxpro
Here we discuss strategies and tips for your Elixir learning journey. This is from scratch until your first wave as an elixir developer
I am Gustavo and today's theme is: Understand why LibCluster is essential for your Phoenix Liveview applications
Do you want to learn Elixir in three months? https://elxpro.com/sell
_ps: You can follow the article with VIDEO
Want to learn more about elixir on a Telegram channel?
LibCluster is a library that proves a simple way of connecting between ERLANG NODES that facilitates cluster communication.
It becomes important from the moment you have distributed systems and you create communication in a simple way between them, where there is a huge difficulty in creating listeners when a need is running.
If you read the article/video about Nodes you probably know how to connect two applications in Elixir in a simple way, however, how do you get this environment in production? how are you going to detect these nodes in a Kubernetes cluster?, like this communication between different IPs in a simple way? create code for it?
The best way to create it is through LibCluster (the article about nodes teaches you what's under the hood)
One of the first libraries I learned about has more than 4 years of journey as an Elixir developer, there was always talk about the benefits of Elixir, it was the agent that had the advantage of distributed systems that were little or not used. But in a project using LiveView the LibCluster becomes more than mandatory and it was the case of a project that I can work on.
The main advantage is to create connections between applications quickly, without having to connect nodes, generators, and OTP. LibCluster will abstract all these rules into a simple configuration.
At the beginning of my career, I noticed essential things like implementation in Elixir, and I believe that today LibCluster is one of them. especially if you use live preview
You can start implementing LibCluster in Dev using the strategy of Gossip as it is one of the simplest and easiest to understand LibCluster, and when for production will depend on whether you are going to use Kubernetes, ECS, or any other environment. I work with clusters in Kubernetes and implement DNS.
I hope the article helped you understand the need and urgency of how to use LibCluster in your applications. :D
- Gustavo Oliveira - https://www.linkedin.com/in/gustavo-oliveira-642b23aa/
- Elxpro Linkedin - https://www.linkedin.com/company/36977430
- Twitter - https://twitter.com/elx_pro
- ElxproBr - https://www.youtube.com/channel/UCl_BBK2sXZzQy_3ziNU7-XA
- Elxpro - https://www.youtube.com/channel/UCLzHBFuE6oxPdP6t9iqpGpQ