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

アクターによる
並行処理アプケーション アーキテクチャ

アクターによる
並行処理アプケーション アーキテクチャ

社内勉強会でアクターとアクターを使ったアプリケーションのアーキテクチャについて紹介した資料です

hakobe (Yohei Fushii)

November 27, 2015
Tweet

More Decks by hakobe (Yohei Fushii)

Other Decks in Programming

Transcript

  1. ྫ: σουϩοΫ  public class LeftRightDeadlock { private final Object

    left = new Object(); private final Object right = new Object(); public void leftRight() { synchronized (left) { synchronized (right) { doSomething(); } } } public void rightLeft() { synchronized (right) { synchronized (left) { doSomething(); } } } } " # leftΛ
 ϩοΫ rightΛ
 ϩοΫ rightΛ
 ϩοΫ͍ͨ͠ leftΛ
 ϩοΫ͍ͨ͠ Ӭԕʹ଴ͭ Ӭԕʹ଴ͭ
  2. spawn !!  Pid = spawn(fun() -> receive hello ->

    io:format("Hello, World!~n") end end). Pid ! hello. Actor Actor Actor Actor Actor Actor hello Hello,
 World!
  3. Link  Actor Actor Actor Actor Actor Actor -JOL Ұํ͕ऴྃ

    ࣗಈతʹ
 ΋͏Ұํ΋ऴྃ γεςϜશମΛ࣮֬ʹऴྃͰ͖Δ
  4. Link + process_trap  Actor Actor Actor Actor Actor Actor

    -JOL Ұํ͕ऴྃ &9*5
 ͕ૹ৴͞ΕΔ &9*5
  5. •ऴྃϋϯυϧͰ͖Δ Link + process_trap  Actor Actor ޙॲཧΛ͢Δ Actor Actor

    ࠶ىಈ͢Δ Actor ͋Δ͍͸ Monitorͱ͍͏࢓૊Έ΋͋Δ
  6. ࢀߟจݙ  •Javaฒߦॲཧϓϩάϥϛϯά - http://www.amazon.co.jp/dp/4797337206 •͍͢͝ErlangΏ͔͍ʹֶ΅͏ʂ - http://www.amazon.co.jp/dp/B00MLUGZIS/ •ฒߦॲཧॳ৺ऀͷͨΊͷAkkaೖ໳ -

    http://www.slideshare.net/sifue/akka-39611889 •ϓϩάϥϛϯάݴޠͷύϥμΠϜγϑτʔScala͔ΒݟΔؔ਺ܕͱฒ ྻੑ࣌୅ͷນ։͚ - http://www.slideshare.net/TanUkkii/functional-and- concurencyinscala •Web API αʔόʔͱͯ͠ͷ Elixir ͷՄೳੑ - https://speakerdeck.com/naoya/web-api-sabatositefalse-elixir- falseke-neng-xing