![](https://s3.amazonaws.com/media-p.slid.es/uploads/391469/images/3651606/phoenixframework-logo.png)
RELIABLE WEB APPS WITH ELIXIR
AND
![](https://s3.amazonaws.com/media-p.slid.es/uploads/391469/images/3914891/EPAM_LOGO_Full_Color_RGB.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/391469/images/3914899/content_rsontour-min.jpg)
Ales Tsvil
Intro
Elixir
Phoenix
INTRODUCTION
![](https://s3.amazonaws.com/media-p.slid.es/uploads/391469/images/3914942/________-_______-______-2627774.gif)
Elixir
![](https://s3.amazonaws.com/media-p.slid.es/uploads/391469/images/3651285/1481354.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/391469/images/3651672/pasted-from-clipboard.png)
What is Elixir?
![](https://s3.amazonaws.com/media-p.slid.es/uploads/391469/images/3651475/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/391469/images/3651654/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/391469/images/3914883/lang.rank_.117.wm_.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/391469/images/3914865/lang.rank_.617.wm_.png)
Features
- Pattern Matching
- Data Immutability
- Simple Multithreading
- Metaprogramming
- Data Structures
- Full Functional
- Modular Structure
- Erlang VM
Most operators are functions
Pipe Operator |>
Built-in Libraries for almost everything!
Infrastructure for almost whole server-side needs
REPL
Existing Toolchain
![](https://s3.amazonaws.com/media-p.slid.es/uploads/391469/images/3651290/3172415460_ce2a85308d.jpg)
What is Erlang?
-
Created in 1986
- Windows in 1985
- Linux in 1991
- Handles 50% of the world telecom traffic
- Reported 99.999999% of availability
DISTRIBUTED SYSTEMS
TREE OF SUPERVISORS
POSSIBLE ETERNAL
LIFETIME
![](https://s3.amazonaws.com/media-p.slid.es/uploads/391469/images/3651632/3f9b0d9d4f3769cbeaf3c2987dff14d8_explosion-clip-art-at-clker-comic-book-explosion-clipart_600-557.png)
GAPS?
![](https://s3.amazonaws.com/media-p.slid.es/uploads/391469/images/3651606/phoenixframework-logo.png)
PRODUCTIVE.
RELIABLE.
FAST.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/391469/images/3915455/giphy__3_.gif)
Let it Crash?
List of things
- The Endpoint
- The Router
- Controllers
- Views
- Templates
- Channels
- PubSub
- handles all aspects of requests up until the point where the router takes over
- provides a core set of plugs to apply to all requests
- dispatches requests into a designated router
ENDPOINT
- parses incoming requests and dispatches them to the correct controller/action, passing parameters as needed
- provides helpers to generate route paths or urls to resources
- defines named pipelines through which we may pass our requests
- Pipelines
- allow easy application of groups of plugs to a set of routes
ROUTER
- provide functions, called actions, to handle requests
- Actions
- prepare data and pass it into views
- invoke rendering via views
- perform redirects
CONTROLLER
- render templates
- act as a presentation layer
- define helper functions, available in templates, to decorate data for presentation
- are what they sound like :)
- are precompiled and fast
VIEWS
TEMPLATES
- manage sockets for easy realtime communication
- are analogous to controllers except that they allow bi-directional communication with persistent connections
CHANNELS
- underlies the channel layer and allows clients to subscribe to topics
- abstracts the underlying pubsub adapter for third-party pubsub integration
PUBSUB
PLUG AND ECTO
![](https://s3.amazonaws.com/media-p.slid.es/uploads/391469/images/3914941/Ecto1.gif)
MICROSERVICES
FRONT-END
![](https://s3.amazonaws.com/media-p.slid.es/uploads/391469/images/3333117/es6-logo.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/391469/images/3914935/color-1c4aab2b.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/391469/images/3333183/multi-3.jpg)
Any Questions?
tsvil_@tut.by
diodread
Thank You!
![](https://s3.amazonaws.com/media-p.slid.es/uploads/391469/images/3915646/gmail-email-mail-logo-circle-material.png)
Elixir
By diodredd
Elixir
- 338