Three Important Software Characteristics Every Software Engineer Should Know

4357
This article was submitted by Alexandre Juca . Do you want to share knowledge with the other followers of MenosFios? Follow the steps.

________________________________________________________________________

These days it's good to meet several frameworks and various programming languages ​​to solve problems. But I have noticed that more and more programmers are limited to just these things.

Sooner or later, there comes a time in a programmer's life when he must focus on concepts that allow him to create increasingly complex systems that deal with a lot of data. Especially as we live in a time when there are more people on the Internet and there is more data to be generated. Examples of local gender systems are vPOS (Angolan Payment System), Tupuca, and EMIS and the international ones I can mention are Netflix, Google, Amazon, Yoco, Stripe, PayPal, among others. These systems mentioned above need three important features:

  1. Robust and high availability
  2. Scalability
  3. Sustainability

Today we're going to talk about the first feature, Robust and high availability.

What does it mean to have a robust and highly available system?

A robust system is fault tolerant, meaning that it can function normally (showing the expected performance and expected functionality) even in unfavorable situations. A robust system is capable of anticipating and dealing with hardware, software or even human failures and has a uptime from 95% to 100%.

How to make a more robust and fault-tolerant system?

First we have to know why certain flaws arise. Here are some of the failures that can occur during the life of a system:

  1. broken hard disk
  2. Broken RAM memory
  3. server down
  4. burned CPU
  5. Unavailability of the database due to human error, software or hardware
  6. Bugs

What do some of these flaws have in common? They can affect the robustness and availability of a system. Because? Because when there is a single point of failure in a given system, it can affect the system's availability and therefore its robustness.

How to solve this?

One way to solve this is to use the redundancy. Add hard disks in RAID, hot swappable CPUs, multiple servers, multiple database servers, etc.

I had the pleasure of working at vPOS as a software engineer and help the team create a system with this characteristic, as my technical leaders realized that this is important for the business. The system needed to handle payments 24 hours a day, non-stop! That's why we use multiple servers backend, as a database in cluster to not have a single point of failure because the consequences for the business would be disastrous.

Doing so allows us to maintain and update systems without interrupting our services that are currently used by Tupuca, Soba Store and many other companies that handle thousands of transactions a day. We can also handle denial of service attacks and this is all because we understood how important the feature in question was for the problem we had and it helped us to choose the right technologies and a good architecture for our system.

With a greater understanding of this feature and the problem we are solving, we chose a technology that offers this feature, the Elixir. We chose the Elixir and the technologies around it because they are based on a robust technology known as “BEAM” (Björn's Erlang Abstract Machine or Erlang Virtual Machine). “BEAM” is part of the core of the OTP (Open Telecoms Platform) and all code written in Elixir is compiled and converted into bytecode which is executed by Erlang's Virtual Machine.

How does this technology help us create robust systems?

Any and all code executed by the virtual machine of Erlang runs within a process, a process in the context of the Erlang it is different from an operating system process in that it is trivial to start thousands to millions of processes. The process is an implementation of the runtime of the Virtual Machine of the Erlang and it is not the same as an operating system thread. We can say that these processes are like green threads but much lighter. They can start a process in less time than a thread and they tend to use a lot less memory.

These processes can be initiated and "supervised" by other special processes known as supervisors. They monitor the behavior of other processes and can restart them if there is a failure, we can even create a tree of supervisors known as supervision tree.

Processes also help us deal with “processes run-away”, which are processes or threads native (operating system) that use almost all shared resources such as CPU time, memory, disk space and bandwidth. This is because the processes run by the Virtual Machine scheduler Erlang do not allow a process to run for a long time, so it is almost impossible for a single process in BEAM to drop the entire system. With these abstractions, we can easily design fault-tolerant and highly available systems.

1 COMMENT

  1. Congratulations on the article, this is a type of topic that has piqued my interest and with more incidence in the last two years and reading your article I see a summary of everything that I have been studying. Don't stop writing articles like this one.

LEAVE AN ANSWER

Please enter your comment!
Please enter your name here