Overview of the Elixir based Phoenix Framework highlighting what it makes it so productive, fast and different from the other web framework. Second part describse my experience using Phoenix as a contributor to some of the open source projects leaded by evercam.io http://evercam.io, an exciting new start-up based in Dublin that specialises in Apps and Developer tools to manage IP based cameras.
3. “Phoenix is a framework for building
HTML5 apps, API backends and
distributed systems to take on the
modern Web.”
“Written in Elixir, you get beautiful
syntax, productive tooling and a fast
runtime”
6. Erlang
• Created in 1986
- Windows in 1985
- Linux in 1991
• Handles 50% of the worlds telecom traffic
• Reported 99.9999999% availability (nine
nines)
7.
8. Elixir
Elixir is a functional, concurrent, general-
purpose programming language that runs on the
Erlang virtual machine (BEAM). Elixir builds on
top of Erlang to provide distributed, fault-
tolerant, soft real-time, non-stop applications
but also extends it to support metaprogramming
with macros and polymorphism via protocols.
9. Productivity in Phoenix
• Short term productivity
- Documentation / Guides / Generators
- Eliminates trivial choices
• Long term productivity
- Maintainability
- Introspection
19. Robust Concurrency Model
• “processes” – extreme lightweight units of
concurrency
• Garbage collection is per process
- No global pauses
• Load balances on IO and CPU
27. But there is more ..
• Form builders
• Static build tools with ES6 by default
• Live reloading
• First class test tools
• Packages via hex.pm (+2MM downloads)
28. Applications
• Package and run our code
• Can be started and stopped as a unit
• Provide unified configuration
• Hold processes and state in the
supervision tree
34. • The ONVIF specification defines a common
protocol for the exchange of information
between network video devices including
automatic device discovery, video streaming
and intelligence metadata.
35. Onvif Specification
Based on relevant Web Services standards including security
and IP configuration requirements. Areas covered:
• IP configuration
• Device discovery
• Device management
• Media configuration
• Real time viewing
• Event handling
• PTZ camera control
• Video analytics
• Security
43. Integration with evercam-media
Solution:
• HTTPotion for HTTP requests
• Own implementation of SOAP Envelope and
WS-Security headers.
• Own implementation of XML to Elixir Map
transformations using Erlang xmerl library
50. Integration with evercam-media
• Definition of needed operations using
onvif_client methods.
• Add REST routes to web/router.ex
• Implement controllers that will invoke ONVIF
operations and return the responses as Elixir
Map structures.
51.
52. Integration with evercam-media
• Definition of needed operations using
onvif_client methods.
• Add REST routes to web/router.ex
• Implement controllers that will invoke ONVIF
operations and return the responses as Elixir
Map structures.
• Phoenix translate these Maps into JSON
structures without the need of extra coding