Turn Hours into Seconds - Concurrent Event Processing

schedule Nov 17th 03:00 PM - 03:45 PM place Edinburgh people 15 Attending

For programmers who have been using locks for synchronizing threads to solve all concurrency problems, embracing message passing and creating concurrent data flows is an enlightening experience. This talk is a case study of a real world concurrency problem where the developer started with a slow non-thread-safe solution and refactored it step by step into a fast yet simple concurrent solution making use of Elixir's concurrent computation library called Flow.

 
6 favorite thumb_down thumb_up 0 comments visibility_off  Remove from Watchlist visibility  Add to Watchlist
 

Outline/structure of the Session

In this talk, I'll be sharing my learnings from the most rewarding refactoring I've ever made - one which turned an extremely slow sequential solution for an event processing and aggregation problem into a blazing fast and concurrent one. I'll be going through a problem and the different iterations of the solution to the problem that will go from:

  1. Simple and non-thread safe
  2. Simple and thread safe but slow
  3. Concurrent and fast yet simple, using Flow - an official Elixir library for concurrent computations

I will also be talking about the things that happen behind the scenes in Elixir in order to achieve this level of concurrency.

Learning Outcome

This talk will help more programmers appreciate the beauty of message passing and take away some new ideas for approaching concurrency in their day-to-day work.

Target Audience

Programmers looking to learn patterns for solving concurrency problems in their day to day work

schedule Submitted 4 months ago

Comments Subscribe to Comments

comment Comment on this Proposal

  • 45 Mins
    Demonstration
    Beginner

    In Indian classical music, we have Jugalbandi, where two lead musicians or vocalist engage in a playful competition. There is jugalbandi between Flutist and a Percussionist (say using Tabla as the instrument). Compositions rendered by flutist will be heard by the percussionist and will replay the same notes, but now on Tabla and vice-versa is also possible.

    In a similar way, we will perform Code Jugalbandi to see how the solution looks using different programming languages and paradigms.This time the focus of code jugalbandi will be on solutioning in different paradigms - object-oriented or functional programming and array-oriented paradigms.

    During the session, Morten and Dhaval will take turns at coding the same problem using different languages and paradigms. There would be multiple such rounds during the Jugalbandi.

  • Liked Saurabh Nanda
    keyboard_arrow_down

    Saurabh Nanda - Real-world Haskell: Good, Bad, & Ugly - Experience of putting 34,000 lines in production

    Saurabh Nanda
    Saurabh Nanda
    Founder
    Vacation Labs
    schedule 1 month ago
    Sold Out!
    45 Mins
    Case Study
    Beginner

    We have spent the better part of a year introducing Haskell, typed languages, and functional programming, at Vacation Labs. After writing 250,000+ lines of code in dynamically typed languages (Rails & Javascript), we wanted more from our tech-stack:

    • The ability to fearlessly refactor as our market and our code evolved.
    • The ability to write only meaningful tests, and to increase coverage without increasing dev effort.
    • To share data structures across the backend & frontend.
    • And finally, the ability to continue developing features at speed - something that we take for granted in Rails.

    In this talk, we will share our experience of using Haskell, with the focus on what the ecosystem enables us to do today, pragmatically. By the end of this talk, you will know the pros and cons of using Haskell in a real-world setting, and how to contribute in making the ecosystem better. (An aside, we aren’t using Haskell on the frontend, but Typescript, which also gives us quite a few of the abilities mentioned above).

  • Liked Jayaram Sankaranarayanan
    keyboard_arrow_down

    Jayaram Sankaranarayanan - A peek in to Elm Architecture

    45 Mins
    Demonstration
    Beginner

    Elm Lang changes the way UI is built and brings in reliability , robust architecture and functional principles as an alternative to JavaScript and numerous JavaScript frameworks.

    In this session, attendees will be introduced to the basics of functional programming principles, using the Elm lang constructs, the Elm Architecture and how Elm enables easy and reliable refactoring.

  • Liked Anil Wadghule
    keyboard_arrow_down

    Anil Wadghule - Building Distributed System with Erlang Ecosystem

    45 Mins
    Demonstration
    Intermediate

    In this talk, we will explore how can we write a distributed system with Elixir/Erlang. We will cover distributed systems basics, how a distributed system is capable of enhanced performance and how it gives us higher availability.

    Then we would start with a demonstration of a distributed system written with Elixir programming language. We will spend most of the talk discussing the demo code.

    We will also cover main advantages of Elixir/Erlang ecosystem to build distributed systems.

    We will explore aspects such a latency, throughput, computing power. We will understand how Elixir is capable for fault tolerance, resilience. We will explore tool set provided by OTP library. What tools from library helps us to write a distributed system.

    But distributed Erlang/Elixir *has known limitations*. For example, issues with when a network is fully meshed, how many numbers of nodes which can scale we get in a cluster, how sending large data over distribution is an issue etc. What are solutions for it?

  • 20 Mins
    Talk
    Beginner


    A lot of companies still decide to go with Node.js / Java / Ruby / Python for building web apps.

    In this talk, we will focus on, how Elixir ecosystem is ready to replace Node.js / Java / Ruby / Python for most of the web apps

    The aim of this talk is to present why Elixir lang is a good choice for building your next web app.

    We will explore some of the features and tool that Phoenix web framework provides that replaces the need of using Java / Node.js / Ruby / Python for web apps. e.g. Better concurrency model, Ecto for database interaction,  Phoenix channels, Simple APIs, Umbrella apps etc, Speed of development.

    The talk will have a deep comparison of the runtime of Node.js, JVM, Ruby/Python with Elixir runtime. (e.g. http://joearms.github.io/2013/04/02/Red-and-Green-Callbacks.html for comparing Erlang callbacks with JavaScript callbacks, Comparison of JVM with BEAM  http://ds.cs.ut.ee/courses/course-files/To303nis%20Pool%20.pdf etc)

    We will also compare syntaxes of these languages by seeing the code of the same app but with multiple languages.

    This talk will also show how using Elixir also helps us a become better programmer because of features like immutability, functions, pattern matching, first class processes etc, great syntax.

    At the end of the talk, every Java / Node.js / Ruby / Python developer should feel confident about Elixir and talk will motivate them to choose Elixir over Java / Node.js / Ruby / Python for building the next web app.