Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Phoenix channels introduction

Phoenix channels introduction

Channels are a really exciting and powerful part of Phoenix that allow us to easily add soft-realtime features to our applications. We are going to check that and also have an overview about Elixir and the Phoenix Framework itself. If you don't know Elixir and neither the Phoenix Framework, no problem at all.

https://www.youtube.com/watch?v=fcgS9epbptY

Iuri Fernandes

December 21, 2015
Tweet

More Decks by Iuri Fernandes

Other Decks in Technology

Transcript

  1. What is Elixir? Functional language Created by José Valim in

    2012 Runs on the BEAM (Erlang VM) Influenced by Ruby
  2. Basics defmodule Parallel do def map(collection, fun) do runner =

    self Enum.map(collection, fn (el) -> spawn_link fn -> send runner, {self, fun.(el)} end end) |> Enum.map(fn (pid) -> receive do {^pid, result} -> result end end) end end
  3. Similarities Productivity MVC Security Test driven Differences Applications Explicit connection

    transformation Channels Assets (Brunch) “Phoenix is not Rails”
  4. Not convinced? Fast and productive Easy to test Highly scalable

    “With Phoenix, nothing is global. There is no monolith” “Phoenix favors explicitness in most of its stack.”