Microservices com Elixir/Erlang

Thomaz Leite

In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API.

Erlang is a programming language used to build massively scalable soft real-time systems with requirements on high availability. Some of its uses are in telecoms, banking, e-commerce, computer telephony and instant messaging. Erlang's runtime system has built-in support for concurrency, distribution and fault tolerance.

Concorrência

Concorrência
vs

Paralelismo

Shared Memory Concurrency

Maioria das linguagens

A thread é o building block

Mutexes, semaphores, locks, caches, etc.

Message Passing Concurrency

Erlang/Elixir

O processo é o building block

Spawn, send e receive

Concorrência & Web

Distribuição

Mnesia

Banco de dados distribuído

http://erlang.org/doc/man/mnesia.html

Tolerância a Erros

"Let it crash"

(Deixa quebrar)

Link entre processos

Supervisor

Árvore de supervisão

Registro de nomes

elixir-lang.org

erlang.org

 

meetup.com/elixir-poa

 

1@thomazleite.com

Microservices com Elixir/Erlang

By thmzlt

Microservices com Elixir/Erlang

TDC Porto Alegre 2017

  • 934