Why use OTP with erlang?

As the question said: what are the benefits of using OTP design principles when developing with erlang?

(I am developing a server that will simply receive commands and send responses)

+8
erlang otp erl
source share
2 answers

OTP is a hardened set of design elements and idioms used to create fault-tolerant systems, like Jonas said (for example, flexibility, live updates, etc.). In short, you want to use it for these environments or environments that can grow in them because most of the blood, sweat, and tears from building reliable, stable systems in Erlang are baked in the behavior and architecture of OTP. If you do not use them, you either will not have a fault-tolerant, flexible system, or you recreate all the solutions, one error and one error at a time, to create, in the end, what constitutes the OTP clone.

So the question is when do you want to use OTP? You do not need OTP if you are not involved in software that is designed to work for a long time with minimal interruption. You do not need OTP if you already have a framework that does its job that you are more familiar with. You do not need OTP if you want to find out (which can be difficult) what solutions are behind OTP projects. You do not need OTP if the cost of training (and there is a cost!) Exceeds the cost of system downtime for your software.

The best way to get to know whys and wherefores OTP is to use the OTP Design Guidelines User Guide . If the argument is not explicitly stated, you can often read between the lines to find the rationale for each component.

+15
source share

OTP contains some good design patterns for fault tolerant systems, for example. gen_server and control what might be interesting. It depends on what you want to do with Erlang.

eg. If you want to run a website, you might be interested in using Yaws , and if you want a fault-tolerant website, you can use OTP with braking for surveillance.

OTP also contains behavior patterns that may be useful.

+3
source share

All Articles