Hotchpotch 22

Posted on Mon 14 March 2016 in english



  • Elixir maps have built in syntax for updating.
  • Simple Web Servers with Plug and Cowboy.
  • Notes on Elixir: Templating with EEx.
  • Joe Armstrong: Calling Elixir from Erlang.

    And as Alan Kay said - “If you don’t fail at least 90% of the time, you’re not aiming high enough.”

  • Joe Armstrong: Managing two million web servers.

    We do not have ONE web-server handling 2 millions sessions. We have 2 million webservers handling one session each.

    If there is a software error and the server software crashes we lose either two million connections or one depending upon the model. In Erlang if the web server software itself is incorrect we’ll lose a single connection, which is OK. Since the software is incorrect and crashes we don’t know what to do so crashing is a good alternative. What is important is that one session crashing does not effect all the other sessions. This requirement, goes way back to when we designed Erlang in the mid 1980’s. In Telecoms systems, losing one connection due to a software error was acceptable, losing them all due to a bug was big time bad news.

    To make a fault tolerant system we use two or more processes per user; One is the master process, the others are replicas on different machines. They must be on different machines since the entire machine where the master runs might crash. We can make it scalable by just buying more machines and spreading the processes out over the machines.