Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Brief Intro to Phoenix - Elixir Meetup at BukaLapak

1.814 visualizaciones

Publicado el

Brief introduction to Phoenix, Elixir web framework. Phoenix web framework is awesome. Backed by the beauty and productive Elixir and performance and realibility of Erlang VM. This presentation is for Lambda Jakarte meetup chapter Elixir at BukaLapak, April 2016.

http://www.meetup.com/Lambda-Jakarta/events/230464443/

Publicado en: Tecnología
  • Sé el primero en comentar

Brief Intro to Phoenix - Elixir Meetup at BukaLapak

  1. 1. Riza Fahmi - ElixirDose.com - @rizafahmi22 - riza@ hacktiv8.com PRODUCTIVE. RELIABLE. FAST.
  2. 2. INTRODUCTION YOU’RE MY REGULATOR, MY COMPILER ▸ Scream when things go too fast / slow / are unclear ▸ Scream when cool things happen ▸ Help me when live coding, I’m suck at it. Find errors for me before the compiler do ▸ Similar to Phoenix channel, this is two way communication channel. Don’t let me do all the talking!
  3. 3. INTRODUCTION SLIDES ARE UP! slideshare.net/rizafahmi speakerdeck.com/rizafahmi
  4. 4. INTRODUCTION WHO AM I ▸ Was at CitizenLab, a Belgium-based early stage startup. As a CTO ▸ Now at Hacktiv8, a startup for dev bootcamp ▸ Run ElixirDose — an Elixir-focused blog since November 2013
  5. 5. INTRODUCTION WHAT WE’LL SEE ▸ The Awesomeness of Phoenix ▸ Build something with Phoenix ▸ Some live coding
  6. 6. SOME GLOSSARY Web Framework Programming Language Erlang Virtual Machine
  7. 7. WHAT IS PHOENIX
  8. 8. “Framework for building HTML5 apps, API backends and distributed systems to take on the modern web.” Chris McCord
  9. 9. HOW IS PHOENIX DIFFERENT?
  10. 10. PRODUCTIVITYPERFORMANCE VS
  11. 11. LET’S TALK PRODUCTIVITY
  12. 12. PRODUCTIVITY SHORT TERM ▸ Documentation / Guides / Generators ▸ Eliminates trivial choices
  13. 13. PRODUCTIVITY LONG TERM ▸ Maintainability ▸ Tried and true architecture patterns ▸ Let it crash mentality
  14. 14. “IF I HAVE TO BUILD SKYNET, KILLER ARTIFICIAL INTELLIGENT FROM TERMINATOR MOVIES, I WOULD USE ERLANG AND ERLANG VM. MOSTLY BECAUSE IT’S UNKILLABLE AND KEEP COMING BACK!” Simon St.Laurent from MostlyErlang Podcast
  15. 15. MORE FEATURES PLEASE…
  16. 16. FEATURES STATIC BUILD TOOLS WITH ES6 AS DEFAULT Ultra fast HTML5 build tools Compiles/lints your scripts and styles Concatenates your scripts and styles Minifies it Watches for file changes
  17. 17. FEATURES PRETTY AND HELPFUL ERROR PAGES
  18. 18. FEATURES CHANNELS ▸ The main reason why Phoenix exists in the first place ▸ It’s websocket with steroid ▸ Cross-platform, cross-languages ▸ For creating modern, real-time apps ▸ Beyond HTML
  19. 19. FEATURES MORE… ▸ Form builder ▸ Live reloading ▸ MCV with twist ▸ much more…
  20. 20. LET’S TALK PERFORMANCE NOW
  21. 21. PERFORMANCE VIEWS & TEMPLATES ▸ Precompiled and pretty fast! ▸ Views render templates ▸ It’s beyond HTML
  22. 22. PERFORMANCE WHAT ABOUT SOME BENCHMARK Frameworks Throughput (req/s) Latency (ms) Plug (Elixir) 54,948.14 3.83 Gin (Go) 51,483.20 1.94 Phoenix (Elixir) 43,063.45 2.82 Express Cluster (Nodejs) 27,669.46 3.73 Martini (Go) 14,798.46 6.81 Express (Nodejs) 9,965.56 10.07 Sinatra (Ruby) 9,182.86 6.55 Rails (Ruby) 3,274.81 17.25 https://github.com/mroth/phoenix-showdown
  23. 23. PERFORMANCE ROBUST CONCURRENCY MODEL ▸ “processes” is extremely lightweight units of concurrency ▸ Garbage collection is per process, no global pauses
  24. 24. “ WE DO NOT HAVE ONE WEB-SERVER HANDLING 2 MILLIONS SESSIONS. WE HAVE 2 MILLION WEBSERVERS HANDLING ONE SESSION EACH.” Joe Armstrong - Erlang Father http://goo.gl/DprVTC
  25. 25. LET’S BUILD SOMETHING
  26. 26. WHAT WE’LL BUILD ELIXIR TALKS VIDEO PORTAL ▸ CRUD app for collecting Elixir-related video talk ▸ Similar confreaks.tv or pyvideo.org
  27. 27. OFF ROAD… WE GO!
  28. 28. INSTALLING… INSTALL PHOENIX $ mix archive.install https://github.com/ phoenixframework/archives/raw/master/ phoenix_new.ez $ mix phoenix.new -v
  29. 29. WANT MORE?
  30. 30. WANT MORE… READ SOME BOOKS
  31. 31. WANT MORE… WATCH AND LEARN
  32. 32. I’M DONE. THANKS FOR TUNING IN!

×