This is the final part of the 7 part series. Please read the previous articles to catch up on the topic.
Till the previous article, we have completed everything in our list to make our key-value store application robust, scalable and fault-tolerant. Now the only thing that is remaining is to expose the app to the world of the web by using a webserver.
Writing a webserver in Elixir is so easy that you would only have to add one file to your system and since every module is decoupled you would not need to do anything differently.
This is part 6 of the 7 part series. Please read the previous articles to catch up on the topic.
In the previous article, we achieved fault tolerance by using supervisors in our process of storing values. Now further we need to isolate our error effects because currently no matter what process in our system crashes our Manager will be restarted which will restart our database and its workers again no matter if the error were not relating to them.
This problem can result in too many restarts and after some time the supervisor will stop restarting the server since…
This is part 5 of the 7 part series. Please read the previous articles to catch up on the topic.
Till now we have discussed GenServers and how it handles tasks in an async manner in an isolation. But now we are going to discuss something which is very crucial in Elixir programming language and most of the time when developing any Elixir application you would be making use of it. The topic which we are going to discuss in this post is FAULT TOLERANCE.
Fault tolerance is one of the things for which people vouch for Elixir. Now suppose…
This is part 4 of the 7 part series. Please read the previous articles to catch up on the topic.
The save request may not seem problematic from the client-side perspective, because it’s an asynchronous cast. A client issues a store request and then goes about its business. But if requests to the database come in faster than they can be handled, the process mailbox will grow and increasingly consume memory. Ultimately, the entire system may experience significant problems, resulting in the possible termination of the BEAM OS process.
The get request can cause additional problems. It’s a synchronous call…
This is part 3 of the 7 part series. Please read the previous articles to catch up on the topic.
So the problem with the previous implementation is that whenever you restart your server the data stored in the server state is lost because we have not implemented a way to persist the values in a file.
In this article, we are going to learn how are we gonna incorporate a strategy to persist the store values and fetch them when we restart the server. …
Hey, have you stumbled upon this post directly without reading the previous article because you searched for something and Google decided to teleport you here? Well, then I would suggest you read the previous article which is the first part of the 7 part series that I am writing.
Now, if you have read the previous article then let’s begin directly with this article.
So previously we created a server process that stores some values in a key-value store. …
With the beginning of 2020 Elixir has been gaining a lot of popularity in the field of functional programming language. Being a software engineer who always looks out to try something new I instantly bought the idea of learning the language when it was introduced at my workplace by a fellow game developer.
As I started learning the language I found it a little difficult as I never wrote a single line in a functional way using Elixir. It promotes a coding style that helps developers write code that is short, concise, and maintainable which was pretty new to me.
var data = fetchData();console.log(data);
At first, he is bogged down by the fact that why does the console gave undefined as the output if my request resolved with the data because in other languages like PHP, java you are sure to get the data or something if you have fetched it somewhere above where you are outputting it.
To get this straight first let’s clear out a few things on how we are going to tackle this problem, understand how async works…
Fullstack developer. React ● Node ● Go ● Elixir. I make awesome stuff with my bare hands 👐🏻