Cookies
Diese Website verwendet Cookies und ähnliche Technologien für Analyse- und Marketingzwecke. Durch Auswahl von Akzeptieren stimmen Sie der Nutzung zu, alternativ können Sie die Nutzung auch ablehnen. Details zur Verwendung Ihrer Daten finden Sie in unseren Datenschutz­hinweisen, dort können Sie Ihre Einstellungen auch jederzeit anpassen.
Engineering

Zweitag at ElixirConf.EU 2017

5
Minuten Lesezeit
Blog Post - Zweitag at ElixirConf.EU 2017
Peter Brüske
Ruben Grimm
Patrick Oscity

The conference took place in the Barceló Sants, a modern and yet nerdy venue, designed as a futuristic space station. That’s why - besides the expected Elixir celebrities - there were some other familiar faces to meet.

R2D2

Keynotes: Write Open Source Elixir Code

The conference opened with a keynote from José Valim, the creator of Elixir, and ended with a keynote from Chris McCord, the creator of the Phoenix framework. Both their keynotes started with some anecdotes about the ups-and-downs in developing open source software. While José talked about technical problems with developing Elixir, Chris discussed some problems in communicating the changes they introduced with Phoenix 1.3.

In the end both José and Chris tried to encourage the audience of almost 500 people to just start developing open source code and to help out the growing number of Elixir projects. Their message was: You may hit some obstacles when trying to design it the right way and you may hit some problems in communicating with people you only see on GitHub, YouTube and in Slack Channels, but it will be worth the time.

Of course, Chris also used his keynote to give us a sneak peek at what is coming in the future of Phoenix. We’ll describe the talks that made a lasting impression below.

Make Code "better"

When Devon Estes started his talk about Refactoring Elixir, one of his first slides said: Make code “better”. A very agreeable request. But what is the definition of “better” with respect to code? Devon named the three most important properties of good code:

  • Readability
  • (low) Complexity
  • Performance

Given those three properties it should be easy to spot the best code: Write the one that is the most readable, with the lowest complexity and the highest performance. In the real world though, most of the times you'll have to make trade-offs between those properties. Take pattern-matching for example: Although in Elixir it is quite performant, matching binaries in functions can get you into bracket-hell.

Devon presented some performance numbers comparing two implementations for solving the same problem - one with pattern-matching and one with conditionals. Turns out they performed about the same. So pattern-matching might not in every case be the best way to go, if cond improves readability or lowers the complexity. So to get to a point where we can decide which code is better than the other, we need tools that can measure our code's performance. We need tools that can solve basic readability issues for us. We need best practices for our common tasks.

Code

That’s why Andrea Leopardi showed how to design great libraries in his Talk "The Best Library I Ever Designed". He urged developers to build libraries, that do one thing exceptionally great. While supporting 80% of the use cases for the library, they should always be extensible enough to give others the ability to use them for their specific needs. Ben Marx from Bleacher Report also talked about tooling and best practices. He focused on the challenge of finding those tools (like Credo, Dialyxir, ExCoveralls) and patterns for a team of new Elixir developers (e.g. using typespecs, documentation and doing codereviews). All with the goal that your team gets the ability to develop large applications in a short time period, while still keeping the code consistent and "focus on the code".

As a side note he also gave some insights into the amazing performance and scalability boosts they experienced after moving their code to Elixir. For the first time in some years the rush to sport platforms on the day of the NFL Draft was a quiet night for them.

Introspection and Monitoring

Another trend that we observed at the conference were several talks focusing on development tools for VM introspection, as well as monitoring. This is a good sign, as production usage of Elixir is increasing, the need arises to be able to see what’s going on under the hood. In development, we need good tools for debugging complex systems, and in production it’s important to have good stable monitoring in place in order to notice when and why things went wrong. There are currently many different projects with overlapping capabilities and use cases, and it seems a lot of things are happening in this area right now.

Mental Maps

Dániel Vámosi gave a great overview of the available tools for introspecting the VM in his talk titled “Visual Reasoning and Mental Maps in Elixir”. He showed some of the familiar tools such as the built-in observer, which shows lots of data but lacks good visualizations especially for the messages that flow through the system. Tools like Visualixir have attempted to make messages visible, and while they provide a good way to trace messages through the system when you know exactly what you’re looking for, it might not be the best solution to get a good overview of the whole system and to understand how all the bits and pieces fit together.

On the other end of the spectrum are tools like Erlang Performance Lab, which allow us to see how messages flow through a distributed system, but currently lack the ability to step down to a finer-grained level once a potential problem was found. Dániel set out to build his own proof of concept which shows some promising ideas, using clever visual metaphors to make the important information stand out more clearly. He also aims to add visual clues for Elixir-specific abstractions such as GenStage and Flow which none of the other tools currently provide. He said that he was not planning on releasing his PoC to the public, but rather trying to gather ideas at this stage and then try to contribute these to existing projects.

Audience
           
Talk

Ian Luites introduced us to Wobserver (Video, Slides) which basically recreates the features of observer for deployment scenarios where SSH access is not easily possible, but also adds some additional features such as custom metrics.

Metrics

Chris McCord showed in his Keynote, he called "Gauging Progress", some of the things that he and other core team members are currently working on. While previous Phoenix releases have focused on the developers, they now want to focus on convincing the decision-makers, in order to further promote Elixir as a viable and mature option to write web applications. One of the most exciting news was that they are working on a standard monitoring component, which aims to provide a way to efficiently collect metrics from the VM. Once ready, this can be used as a common ground for proper integration with SaaS monitoring and alerting services. A standard solution will hopefully improve on the correctness and performance of the existing solutions, while also providing a way to collect application-specific KPIs.

Apart from the aforementioned tools there are many other to choose from, many of which have their roots in the Erlang ecosystem. A good overview of the available tools can be found in this blog post by Derek Haynes. It will definitely be exciting to observe the upcoming developments in this area, while the community comes to an agreement which projects are the most worth pursuing and focusing their energy on a few rock-solid and well thought out tools all of us can rely on.

Other highlights

Nerves

Timmo Verlaan and Loic Vigneron provided some interesting insights into their hobby nerves projects (Video). Timmo had some nice stories about his way to becoming a hobby brewer and presented his own distribution module (inet_tcp_dist) using a custom EPMD module. Loic gave an overview of his self built quadcopter and his way to build it. His way of structuring the code and connecting the drone to a phoenix project to configure it remotely was very impressing. His project is open source and can be found at GitHub. Maybe it is a good source of inspiration for setting up your own nerves project.

GraphQL

Benjamin Wilson and Bruce Williams are maintainers of the absinthe project and gave a quick tour through their "GraphQL toolkit for Elixir". While GraphQL has received a lot of attention in recent years, the talk gave refreshing insights into adopting it in your backend - whether to provide an API or even just for querying data internally. The talk was very well prepared and gave a good taste of their upcoming book “Craft GraphQL APIs in Elixir” which is now in our pre order basket.

Summary

Our main takeaway from ElixirConf.EU 2017 is that the Elixir community is well on its way of developing excellent tooling and best-practices, which will make the language more useful in production environments and for fast prototyping. We had a great time at the ElixirConf.EU, heard a bunch of interesting talks, met many nice people and feel further encouraged to establish Elixir in our projects.

Barcelona was a good place to go out in the evening and we tried a lot of nice beer brands. It looks like next year’s ElixirConf.EU will take place in Prague, so we hope to have a chance to do the same there.

Update: The talks are online

In the meantime all conference talks have been uploaded to YouTube. You can also find direct links to all featured talks in the article.

Evening programme
                   
Evening programme
Evening programme
Evening programme
Partner für digitale Geschäftsmodelles

Are you looking for the right partner for your digital projects?

Let's talk!