FEATURED ARTICLES

ALL

From a web application to a distributed system

This article is an introduction to Gianluca Padovani’s talk at Code BEAM STO, on how to develop a web application that can scale to a distributed system.

Why this talk at Code BEAM STO?

Gianluca compares conference presentations to software and bananas, they rot if we do not take care of them. His Stockholm talk will update his Milan talk, as well as the code-base that both of them refer to. Gianluca plans to eventually create a workshop about this topic once complete, that can help new developers familiarise themselves with these concepts.

In the Beginning…

In the beginning, web development was very “simple,” there was a web server, a bunch of scripts and a database. Every single http request was translated into SQL queries that loaded or wrote data in a DB, the result was often the creation of a HTML page and nothing more. If we were in a “complex environment” we had some background tasks powered often by something similar to cron. Our DB was the truth and everything was in a single place, everything had a beginning (the arrival of the http request) and an end (the delivery of the http response).

This procedure developed a development attitude where we created all the related objects (we were probably adopting an OOP language) at the beginning of our work and we destroyed everything at the end. We were “ not allowed” to keep data and object in memory because everything started and finished with the life of the http request.

However, over time, the web became a platform to develop “applications” where the state cannot be kept in a single database and in a single process (you may hear a little voice whispering  “microservices” …). Operations now span the length of a single http request and we now need the ability to communicate with a lot of different systems and keep track of their states.

There is currently a lot of interest in how these problems are solved in the BEAM environment (using Actor model) and how some common patterns like Supervisor or GenServer are used in other languages or frameworks, Akka for example. Gianluca has been developing software since the last millennium and has seen a lot of patterns and development models rise and fall. There’s a saying in Italy “paese che vai usanza che trovi” (when in Rome do as the Romans do) and this holds true with programming too, there are patterns that the newbies need to learn. For those who are coming to the BEAM ecosystem through Elixir they are indeed lucky, because they will find they are able to take advantages of Erlang and the BEAM virtual machine’s patterns, which are already ‘battle hardened’ from over 20 years of development history.

About Gianluca Padovani’s Code BEAM STO talk

How can we create a web application that takes advantage of the characteristics of the BEAM using the resources of a single node and eventually scale this to a multi-node application?

Gianluca Padovani will be giving the talk ‘From a web application to a distributed system’ at Code BEAM STO. In this talk, he will be creating a simple e-commerce system that will expose some classic distributed system problems that will be resolved using patterns from the BEAM.

If you want to have a heads-up before the talk, you can dig into the code that the talk will be  based on, here is the repo and here is the link of the talk that Gianluca did in Milan. You can also follow him on Medium.

READ MORE

    Rendering the World - SLIDES - Code BEAM Lite Milan 2018

    Slides available HERE.

    READ MORE

      Why should Elixir developers get familiar with Erlang and the BEAM at Code BEAM STO?

      Elixir, Erlang and LFE certainly have different features but they all share a foundation that carries the same ideas, techniques and patterns. Having familiarity with each technology is a major strength: it allows you to tap into a wider ecosystem and get the best out of every technology. Even if you end up using only one language in your day to day development, that knowledge will be useful in giving you more tools to reason with and to solve problems efficiently.

      If you work with Elixir and Phoenix, you could benefit by spending some time looking at Cowboy. Conversely, if you have to interact with databases from Erlang you could look at how Elixir and Ecto approach the problem.

      Which is why there is a lot for Elixir developers to shout about at Code BEAM STO this year! Not only are there 12 talks focusing on Elixir alone, but numerous other talks, 50+ in total, that are super relevant for Elixir developers. Ultimately, the BEAM community is one, no matter what language is used. Elixir talks at Code BEAM STO are listed below, plus a taster of a few other relevant highlights.

      We will be joined by three members of the Elixir core team, Eric Meadows-Jönsson, Michal Muskala and Andrea Leopardi.

      **Ecto - Database library for Elixir - **Eric Meadows-Jönsson

      Ecto is a popular database library for Elixir and was one of its first major libraries. Eric will discuss Ecto's capabilities, delve into some of its inner workings, driven by code examples, he will explain what sets Ecto apart from traditional ORMs and database frameworks.

      **Optimising for the BEAM - **Michal Muskala

      Michal will explore some common techniques for optimising programs running on the BEAM, applicable to Elixir, Erlang and LFE. He’ll showcase the tools used for evaluating performance and for discovering bottlenecks.

      **Update: Elixir core dev team - **Andrea Leopardi,

      Andrea will give an update on what projects the Elixir core team have been  working on, what's being researched, as well as what new features can be expected in the next Elixir release.

      Taking it to the metal - Sonny Scroggin

      In this talk Sonny, a Phoenix core team member, will discuss Native Implemented Functions (NIFs) - Erlang's Foreign Function Interface (FFI). He will show how to build performance-critical functionality in Erlang/Elixir with Rust, whilst showing how to avoid the pitfalls of writing native code.

      Crypto + Concurrency Anna Neyzberg

      We all know that OTP is an important part of the Elixir ecosystem, but do we know why? How does it work in relation to Elixir? Anna, co-founder of ElixirBridge, will show how to leverage OTP to build highly concurrent systems that scale. In-order to see OTP at work, she will add load to a real time crypto-currency exchange.

      Raxx; refined web development - Peter Saxton

      Peter will Introduce Raxx, as an alternative to Plug in the Elixir eco-system. More generally, he will explore why functional purity is valuable in the Erlang/Elixir world and how a different conceptual model can lead to a completely different solution to the same problem.

      How Elixir helped us change Ukrainian healthcare system - Alex Troush

      Alex will delve into the caveats behind large-scale development with Elixir. Detailing  how they used it for the Ukrainian Health Services, one of the biggest open-source Elixir projects in the world.

      Sagas of Elixir - Andrew Dryga

      Andrew will show alternative approaches for dealing with interactions with remote services that create side effects. He will present a new open source package - Sage, explaining what use cases it covers.

      From a web application to a distributed system - Gianluca Padovani

      In this talk, Gianluca will explain how using the BEAM and Elixir to create a better application can start from a simple web application and then became a more complex distributed system.

      Simple is beautiful: Building an SLA monitoring tool at PagerDuty - Aish Dahal

      Aish will explain how he built an Elixir powered monitoring tool that used Kafka not only as a communication layer but also as a storage layer. He will show how they replaced a complex in-house monitoring tool with a simpler and more reliable/scalable one using Elixir/OTP.

      Stateful webhooks: what are they good for? - Nathan Herald

      Webhooks are super powerful in connecting desperate services, but what can we do when webhook functions have memory? How does one persist state in a distributed webhooks system? Nathan, from Microsoft, will explain, give some examples and live code a game using Elixir and Javascript.

      Expressive power in Elixir - Joseph Yiasemides

      Joseph will show how to become s better Elixir user by exploiting the 'module' to its fullest extent.

      There are so many more super relevant talks at Code BEAM STO for Elixir developers, view them all here. A few of the highlights are listed below.

      Keynote: A genealogy of functional programming - Osa Gaius

      Join Osa Gaius on a journey through the history of functional programming, of Erlang and Elixir more specifically. It begins with Lambda Calculus, and charts a path to the present moment. The future success of Erlang and Elixir will be marked by how we learn from the history of functional programming. Based on real-world experiences and historical analysis, Osa will then look to the future, giving some ideas on how to increase Erlang and Elixir language adoption which centers around community-building.

      Erlang/OTP team update - Kenneth Lundin

      Every year, the Ericsson Erlang/OTP team give an update on what they have been developing and what they have their eyes on for the future.

      Getting to the BEAM, without going through Erlang - Kofi Gumbs

      Using Erlang to create a language for the BEAM is well-modeled, with projects like Elixir, LFE, and Alpaca growing in popularity and maturity. In this talk, Kofi will discuss the making of a compile-to-BEAM language, from scratch. He will give a guided tour through codec-beam, a BEAM assembler written in Haskell, which provides an explicit model for the BEAM's semantics. He’ll finally compare this project to the Erlang compiler's assembler, and see if OTP can be beaten at it's own game.

      Clojure on the BEAM - Juan Facorro

      Following the theme of language implementation on the BEAM, Juan will explain the process of implementing an already existing language on the BEAM, explaining the challenges this involves and reviewing the results he has achieved.

      View all 50+ speakers and talks here.


       

       

      READ MORE

        Bridging the physical and blockchain world with Erlang - SLIDES - Code BEAM SF 2018

        Slides available HERE.

        READ MORE

          Trusted Autonomy - SLIDES - Code BEAM SF 2018

          Slides available HERE.

          READ MORE

            Introducing Wrek - SLIDES - Code BEAM SF 2018

            Slides available HERE.

            READ MORE

              Unreachable Code - SLIDES - Code BEAM SF 2018

              Slides available HERE.

              READ MORE

                Fighting authoritarianism with blockchain and blockweaves - SLIDES - Code BEAM SF 2018

                Slides available HERE.

                READ MORE

                  Deploying Elixir/Erlang applications to Kubernetes - SLIDES - Code BEAM Lite Milan 2018

                  Slides available HERE.

                  READ MORE

                    Arduino, Elixir and Nerves - SLIDES - Code BEAM SF 2018

                    Slides available HERE.

                    READ MORE

                      Wide World of Actors - SLIDES - Code BEAM SF 2018

                      Slides available HERE.

                      READ MORE

                        Why Elixir Matters - SLIDES - Code BEAM SF 2018

                        Slides available HERE.

                        READ MORE
                          si