O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

hello waf, hello phoenix

2.082 visualizações

Publicada em

tokyo.ex #5

Publicada em: Tecnologia
  • Download or read that Ebooks here ... ......................................................................................................................... DOWNLOAD FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... .........................................................................................................................
       Responder 
    Tem certeza que deseja  Sim  Não
    Insira sua mensagem aqui
  • DOWNLOAD THAT BOOKS/FILE INTO AVAILABLE FORMAT - (Unlimited) ......................................................................................................................... ......................................................................................................................... Download FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... accessibility Books Library allowing access to top content, including thousands of title from favorite author, plus the ability to read or download a huge selection of books for your pc or smartphone within minutes Christian, Classics, Comics, Contemporary, Cookbooks, Art, Biography, Business, Chick Lit, Children's, Manga, Memoir, Music, Science, Science Fiction, Self Help, History, Horror, Humor And Comedy, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance,
       Responder 
    Tem certeza que deseja  Sim  Não
    Insira sua mensagem aqui
  • DOWNLOAD THI5 BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Responder 
    Tem certeza que deseja  Sim  Não
    Insira sua mensagem aqui
  • DOWNLOAD TH1S BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK Here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB EBOOK Here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK Here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB EBOOK Here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc EBOOK Here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Responder 
    Tem certeza que deseja  Sim  Não
    Insira sua mensagem aqui
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Responder 
    Tem certeza que deseja  Sim  Não
    Insira sua mensagem aqui

hello waf, hello phoenix

  1. 1. Hello WebApp, Hello Phoenix 2016/8/31 tokyo.ex#5 おーはら
  2. 2. Agenda 自己紹介 |> 趣旨 |> Phoenixとは? |> webアプリとは? |> webアプリの構造 |> Phoenixの構造 |> Why 軽量 |> Why 高速 |> Why 安定 |> 周辺ツール/情報 |> 不足しているもの |> まとめ
  3. 3. 自己紹介 • おーはら@ohrdev – 基盤技術部@ドリコム • 仕事/技術スタック – 広告サービスのお世話 – 全社基盤システムのお世話 – Elixir/Erlang/Ruby/Lisp/etc… • Elixirアプリ: 本番稼動:2、開発/検証: 1 – Elixirアプリ: 運用1年半/v:1.0.0 -> 1.3.1(elixir) – Phoenixアプリ: 運用1年/v:1.0.0 -> 1.2.0(phoenix)
  4. 4. 趣旨 • ターゲット – (Elixir is 何? な方) – Webアプリ is 何? な方 – Phoenix is 何? な方 • ゴール – Webアプリケーションの構造がわかる – Phoenixとは何なのかがわかる – Phoenixと他のWebアプリフレームワークの違い がわかる – Phoenixの周辺ライブラリ(何があるか)がわかる
  5. 5. Phoenixとは? • Elixirで実装された • MVCパターンの • 高生産性、高パフォーマンスな • Webアプリケーションフレームワーク • リアルタイムweb(channel/websocket)を提供 この発表ではスコープ外とさせてください
  6. 6. Webアプリとは? • インターネット/ネットワークを介して使用する アプリケーション – ここではwebブラウザ上で動作するとします – Ex) wiki、blog、掲示板、ECサイト、etc – 何らかのフレームワーク/ライブラリを利用して作 る事が多い Webクライアント (Webブラウザ) Webサーバー Request Response
  7. 7. Webアプリとは? Webサーバー Webアプリ HTTP WebSocket etcnginx Apache h2o cowboy etc I/F定義 Python: WSGI Perl: PSGI Ruby: Rack Clojure: Ring Lisp: clack Haskell: WAI Scala: SSGI Elixir: Plug データベース Python: Django Perl: Catalyst Ruby: Rails Clojure: Compojure Lisp: caveman2 Hskell: Yesold Scala: Play Elixir: Phoenix DBドライバ/ORM Python: - Perl: - Ruby: ActiveRecord Clojure: java.jdbc Lisp: CLSQL/CL-DBI Hskell: HDBC Scala: Slick Elixir: Ecto
  8. 8. Webアプリの構造 Webサーバー Controller Router Action Model Bussiness Logic Database View Template DB driverORM WAF I/F ControllerがModelの 情報をViewにPush MVCモデルPush型
  9. 9. Phoenixの構造 cowboy Endpoint Model Database View Template Ecto Plug View Router Controller Pipeline Plug.Conn Plug.Conn リクエスト/コネク ションを抽象化した 構造体 複数のplugを パイプライン plug: Plug.Connを入力して Plug.Connを出力 function (関数)
  10. 10. endpoint
  11. 11. router/pipeline
  12. 12. controller
  13. 13. Why 軽量 cowboy Endpoint Model Database View Template Ecto Plug View Router Controller Pipeline コネクションを受ける(accept)毎に、それを処理するErlangプ ロセス(軽量,OSのスレッド・プロセスではない)が生成される Phoenixというより、cowboy/ranchが軽量 Phoenixはcowboy/plugの薄いハンドラー + ジェネレー タ ここの処理がOSのスレッド、プロセスだとHeavy
  14. 14. Phoenixの構造 cowboy Endpoint Model Database View Template Ecto Plug View Router Controller Pipeline function (関数) View: データをhtml/json/etcに変 換/renderするモジュール Template: マークアップ+埋め込み Elixir/ループ/etc、eex compile データを入力して マークアップを出力
  15. 15. Why 高速 cowboy Endpoint Model Database View Template Ecto Plug View Router Controller Pipeline function (関数) compile Linked List(データ)を使って、テンプレートをビルドする (遅い・ボトルネックになる)文字列の連結は行わない 多くのWAFでテンプレートの 文字列連結処理がボトルネックになる Elixirの文字列はイミュータブル もっとも大きい文字列のコピーのみアプリ内に保持する のでキャッシュが適切に動作する
  16. 16. view/template
  17. 17. Phoenixの構造 cowboy Endpoint Model Database View Template Ecto Plug View Router Controller Pipeline Erlang VM上で動作するモ ジュールという形体で提供
  18. 18. Why 安定 cowboy Endpoint Model Database View Template Ecto Plug View Router Controller Pipeline OS ErlangVM OTP cowboy Ecto Phoenix plug 障害耐性 監視、再起動、etc 並行プログラミング の為のフレームワー ク/パターン
  19. 19. 周辺ツール/情報 • モジュール/プロジェクト管理 – mix • ジェネレーター/タスク
  20. 20. 周辺ツール/情報 • ディレクトリ構造 – 指標/レール – 基本はmixベース – MVC関連: web – 静的ファイル: • Input: web/static • Output: priv • brunch.io(等)を使って アセットコンパイル(変 更可能)
  21. 21. 不足しているもの • 日本語の情報 – 「プログラミングElixir」
  22. 22. 不足しているもの • 日本語の情報 – 「プログラミングElixir」 ! • モジュール、ライブラリ – http://www.modulecounts.com
  23. 23. 不足しているもの
  24. 24. 不足しているもの
  25. 25. モジュール/ライブラリ不足
  26. 26. モジュール/ライブラリ不足
  27. 27. まとめ • Webアプリケーションの構造を紹介しました • Phoenixの構造を紹介しました • Phoenixの特徴を紹介しました • 「プログラミング Elixir」発売おめでとうござい ます • 「プログラミングElixir」を読んで、みんなでライ ブラリを書きましょう⭐️

×