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

ScalaのAkkaに見るおすすめポイント

 ScalaのAkkaに見るおすすめポイント

2020/10/04
J Lang Fest Kansai Online #1

nishikawasasaki

October 04, 2020
Tweet

More Decks by nishikawasasaki

Other Decks in Programming

Transcript

  1. +-BOH'FTU,BOTBJ0OMJOF ࣄྫ &$αΠτͰ঎඼Λ୳͢ʮݕࡧ"1*ʯ  )551ͰϦΫΤετΛ͏͚͚ͭΔ  ݕࡧ৚݅Λ͏͚ͱΔ  ݕࡧ৚݅ʹϚον͢Δ঎඼৘ใΛ͕͢͞ 

    ݕࡧ݁Ռͱͯ͠঎඼৘ใΛ·ͱΊΔ  Ϩεϙϯε͢Δ   ˎ໰୊ΛۃখԽͯ͠આ໌͢ΔͨΊʹ ɹͨͩͷ%#ࢀর"1*Ϩϕϧʹ୺ં͍ͬͯ·͢ɻ ɹ࣮ࡍʹ͸σʔλͷߋ৽΍৑௕Խɺ ɹศརػೳͷͨΊͷॲཧ௥ՃͳͲॾʑൃੜ͠·͢ɻ
  2. +-BOH'FTU,BOTBJ0OMJOF ࣄྫʢ؆қਤʣ   ΫϥΠΞϯτ ݕࡧ"1* ঎඼σʔλϕʔε ݕࡧ৚݅ ݕࡧ݁Ռ ݕࡧΫΤϦ

    ݁Ռ  ϦΫΤετΛ͏͚͚ͭΔ  ݕࡧ৚݅Λ͏͚ͱΔ  ݕࡧ৚݅ʹ Ϛον͢Δ঎඼৘ใΛ ͕͢͞  ݕࡧ݁Ռͱͯ͠঎඼৘ใΛ ·ͱΊΔ  Ϩεϙϯε͢Δ ɹɾ୯७ͳঢ়ଶ ɹɾշదʹಈ࡞
  3. +-BOH'FTU,BOTBJ0OMJOF ՝୊   ΫϥΠΞϯτ ݕࡧ"1* ঎඼σʔλϕʔε ݕࡧ৚݅ ݕࡧ݁Ռ ݕࡧΫΤϦ

    ݁Ռ  ϦΫΤετΛ͏͚͚ͭΔ  ݕࡧ৚݅Λ͏͚ͱΔ  ݕࡧ৚݅ʹ Ϛον͢Δ঎඼৘ใΛ ͕͢͞  ݕࡧ݁Ռͱͯ͠঎඼৘ใΛ ·ͱΊΔ  Ϩεϙϯε͢Δ ɹɾϦΫΤετଆେ෯૿Ճ ɹɾ"1*ͷॲཧ͕͖ͭ͘ͳΔ ɹɾ஗͍ݕࡧ͕͋Δͱ٧·Δ ɹɾͲ͏΍ͬͯରԠ͢Δ͔ʁ
  4. +-BOH'FTU,BOTBJ0OMJOF ݕ౼Ҋ   ΫϥΠΞϯτ ݕࡧ"1* ঎඼σʔλϕʔε ݕࡧ৚݅ ݕࡧ݁Ռ ݕࡧΫΤϦ

    ݁Ռ ϩʔυόϥϯαʔ ɹɾϩʔυόϥϯγϯά͢Δ ɹɹʢΠϯϑϥͰෛՙ෼ࢄ͢Δʣ
  5. +-BOH'FTU,BOTBJ0OMJOF ݕ౼Ҋˠ՝୊   ΫϥΠΞϯτ ݕࡧ"1* ঎඼σʔλϕʔε ݕࡧ৚݅ ݕࡧ݁Ռ ݕࡧΫΤϦ

    ݁Ռ ϩʔυόϥϯαʔ ॏෳ ॏෳ ɹɾϩʔυόϥϯγϯά͢Δ ɹɹʢΠϯϑϥͰෛՙ෼ࢄ͢Δʣ ɹˠॲཧશମ͕ॏෳ͢Δඇޮ཰͞ ɹˠϦϦʔεɾো֐ൣғΛ ɹɹ࠷খԽ͍ͨ͠
  6. +-BOH'FTU,BOTBJ0OMJOF ݕ౼Ҋˠ՝୊ˠݕ౼   ΫϥΠΞϯτ ݕࡧ"1* ঎඼σʔλϕʔε ݕࡧ৚݅ ݕࡧ݁Ռ ݕࡧΫΤϦ

    ݁Ռ  ϦΫΤετΛ͏͚͚ͭΔ  ݕࡧ৚݅Λ͏͚ͱΔ  ݕࡧ৚݅ʹ Ϛον͢Δ঎඼৘ใΛ ͕͢͞  ݕࡧ݁Ռͱͯ͠঎඼৘ใΛ ·ͱΊΔ  Ϩεϙϯε͢Δ ɹɾߴෛՙͳͷ͸Ұ෦͚ͩ
  7. +-BOH'FTU,BOTBJ0OMJOF ݕ౼Ҋˠ՝୊ˠݕ౼Ҋ   ΫϥΠΞϯτ ݕࡧ"1* ঎඼σʔλϕʔε ݕࡧ৚݅ ݕࡧ݁Ռ ݕࡧΫΤϦ

    ݁Ռ  ϦΫΤετΛ͏͚͚ͭΔ  ݕࡧ৚݅Λ͏͚ͱΔ  ݕࡧ৚݅ʹ Ϛον͢Δ঎඼৘ใΛ ͕͢͞  ݕࡧ݁Ռͱͯ͠঎඼৘ใΛ ·ͱΊΔ  Ϩεϙϯε͢Δ ɹɾߴෛՙͳͷ͸Ұ෦͚ͩ ˠ͚ͩ͜͜੾Γग़ͤͳ͍͔
  8. ΞΫλʔϞσϧ • ϝοηʔδΛૹ৴͢Δ͜ͱͰ ΞΫλʔؒͰ௨৴͋͠͏ • ϝοηʔδΛड͚औΔͱ ܾ·ͬͨʢ࣮૷͞Εͨʣ ॲཧΛ͓͜ͳ͏ • ϝοηʔδΛड͚औΔͨΊͷ

    ϝοηʔδϘοΫεʢΩϡʔʣΛ ͍࣋ͬͯΔ  *OUSPEVDUJPOUP"DUPSTw"LLB%PDVNFOUBUJPO IUUQTEPDBLLBJPEPDTBLLBDVSSFOUUZQFEBDUPSTIUNMBLLBBDUPST +-BOH'FTU,BOTBJ0OMJOF 
  9. +-BOH'FTU,BOTBJ0OMJOF ΞΫλʔԽ   Ϧ Ϋ Τ ε τ Λ

     ͏ ͚ ͭ ͚ Δ ݕࡧ৚݅Λ͏͚ͱΔ ݕࡧ৚݅ʹϚον͢Δ ঎඼৘ใΛ୳͢ ݕࡧ݁Ռͱͯ͠ ঎඼৘ใΛ·ͱΊΔ Ϩ ε ϙ ϯ ε ͢ Δ ΫϥΠΞϯτ ݕࡧ"1* ঎඼σʔλϕʔε ɹɾ"LLB"DUPSTΛ࢖͏ ɹɾॲཧΛʮΞΫλʔʯʹ ɹɹ෼ղ͢Δ "DUPS "DUPS "DUPS "DUPS
  10. +-BOH'FTU,BOTBJ0OMJOF ϧʔςΟϯά   Ϧ Ϋ Τ ε τ Λ

     ͏ ͚ ͭ ͚ Δ ݕࡧ৚݅Λ͏͚ͱΔ ϧ ồ λ ồ ݕࡧ݁Ռͱͯ͠ ঎඼৘ใΛ·ͱΊΔ Ϩ ε ϙ ϯ ε ͢ Δ ΫϥΠΞϯτ ݕࡧ"1* ঎඼σʔλϕʔε ঎඼৘ใΛ୳͢ ঎඼৘ใΛ୳͢ ঎඼৘ใΛ୳͢ "DUPS "DUPS "DUPS ɹɾಉ͡໾ׂͷΞΫλʔΛ ɹɹෳ਺ͨ͹ͶͯϧʔςΟϯά ɹˠॲཧ͕஗͍ݕࡧ͕͋ͬͯ΋ ɹɹશମ΁ͷӨڹগͳ͍
  11. +-BOH'FTU,BOTBJ0OMJOF ϧʔςΟϯά   Ϧ Ϋ Τ ε τ Λ

     ͏ ͚ ͭ ͚ Δ ݕࡧ৚݅Λ͏͚ͱΔ ϧ ồ λ ồ ݕࡧ݁Ռͱͯ͠ ঎඼৘ใΛ·ͱΊΔ Ϩ ε ϙ ϯ ε ͢ Δ ΫϥΠΞϯτ ݕࡧ"1* ঎඼σʔλϕʔε ঎඼৘ใΛ୳͢ ঎඼৘ใΛ୳͢ ঎඼৘ใΛ୳͢ "DUPS "DUPS "DUPS ɹɾಉ͡໾ׂͷΞΫλʔΛ ɹɹෳ਺ͨ͹ͶͯϧʔςΟϯά ɹˠॲཧ͕஗͍ݕࡧ͕͋ͬͯ΋ ɹɹશମ΁ͷӨڹগͳ͍ ɹɾϧʔςΟϯάͷ࢓ํ͸ ɹɹઃఆɾ࣮૷Մೳ
  12. +-BOH'FTU,BOTBJ0OMJOF ݕ౼Ҋˠ՝୊ˠݕ౼Ҋˠ݁Ռ   Ϧ Ϋ Τ ε τ Λ

     ͏ ͚ ͭ ͚ Δ ݕࡧ৚݅Λ͏͚ͱΔ ݕࡧ݁Ռͱͯ͠ ঎඼৘ใΛ·ͱΊΔ Ϩ ε ϙ ϯ ε ͢ Δ ΫϥΠΞϯτ ݕࡧ"1* ঎඼σʔλϕʔε ϧ ồ λ ồ ঎඼৘ใΛ୳͢ ঎඼৘ใΛ୳͢ ঎඼৘ใΛ୳͢ ɹʢͻͱ·ͣʣ׬੒ "DUPS "DUPS "DUPS
  13. +-BOH'FTU,BOTBJ0OMJOF ෼ղʹΑΔϝϦοτ   Ϧ Ϋ Τ ε τ Λ

     ͏ ͚ ͭ ͚ Δ ݕࡧ৚݅Λ͏͚ͱΔ ݕࡧ݁Ռͱͯ͠ ঎඼৘ใΛ·ͱΊΔ Ϩ ε ϙ ϯ ε ͢ Δ ΫϥΠΞϯτ ݕࡧ"1* ঎඼σʔλϕʔε ϧ ồ λ ồ ঎඼৘ใΛ୳͢ ঎඼৘ใΛ୳͢ ঎඼৘ใΛ୳͢ ɹ෼ղʹΑΔϝϦοτ ɹɾॲཧΛখ͘͞ݟ௨͠΍͘͢ ɹɾςετ͠΍͘͢ ɹɾյΕͨͱ͖ͷൣғݶఆ "DUPS "DUPS "DUPS
  14. +-BOH'FTU,BOTBJ0OMJOF ݕ౼Ҋˠ՝୊ˠݕ౼Ҋˠ݁Ռˠʁ   Ϧ Ϋ Τ ε τ Λ

     ͏ ͚ ͭ ͚ Δ ݕࡧ৚݅Λ͏͚ͱΔ ݕࡧ݁Ռͱͯ͠ ঎඼৘ใΛ·ͱΊΔ Ϩ ε ϙ ϯ ε ͢ Δ ΫϥΠΞϯτ ݕࡧ"1* ঎඼σʔλϕʔε ϧ ồ λ ồ ঎඼৘ใΛ୳͢ ঎඼৘ใΛ୳͢ ঎඼৘ใΛ୳͢ ɹʢͻͱ·ͣʣ׬੒ʜʜʁ "DUPS "DUPS "DUPS
  15. +-BOH'FTU,BOTBJ0OMJOF ݕ౼Ҋˠ՝୊ˠݕ౼Ҋˠ݁Ռˠ՝୊   Ϧ Ϋ Τ ε τ Λ

     ͏ ͚ ͭ ͚ Δ ݕࡧ৚݅Λ͏͚ͱΔ ݕࡧ݁Ռͱͯ͠ ঎඼৘ใΛ·ͱΊΔ Ϩ ε ϙ ϯ ε ͢ Δ ΫϥΠΞϯτ ݕࡧ"1* ঎඼σʔλϕʔε ϧ ồ λ ồ ঎඼৘ใΛ୳͢ ঎඼৘ใΛ୳͢ ঎඼৘ใΛ୳͢ "DUPS "DUPS "DUPS ɹ࣌ؒͷ͔͔ΔॲཧΛ ɹผϓϩηε΍ผαʔόʔͰ ɹ෼ࢄॲཧ͍ͨ͠
  16. +-BOH'FTU,BOTBJ0OMJOF 3FNPUF"DUPSΛ࢖ͬͨ෼ࢄ   Ϧ Ϋ Τ ε τ Λ

     ͏ ͚ ͭ ͚ Δ ݕࡧ৚݅Λ͏͚ͱΔ ݕࡧ݁Ռͱͯ͠ ঎඼৘ใΛ·ͱΊΔ Ϩ ε ϙ ϯ ε ͢ Δ ΫϥΠΞϯτ ݕࡧ"1* ঎඼σʔλϕʔε "DUPS "DUPS "DUPS ɹϦϞʔτΞΫλʔ ɹɾઃఆϨϕϧͰରԠͰ͖Δ ɹɾίʔυ͸ʢ΄΅ʣมߋෆཁ ɹɾαʔόʔ෼ࢄ΋Մೳ Πϯελϯε# Πϯελϯε" ݕࡧ৚݅ʹϚον͢Δ ঎඼৘ใΛ୳͢ "DUPS
  17. +-BOH'FTU,BOTBJ0OMJOF 3FNPUF"DUPSΛ࢖ͬͨ෼ࢄ   Ϧ Ϋ Τ ε τ Λ

     ͏ ͚ ͭ ͚ Δ ݕࡧ৚݅Λ͏͚ͱΔ ݕࡧ݁Ռͱͯ͠ ঎඼৘ใΛ·ͱΊΔ Ϩ ε ϙ ϯ ε ͢ Δ ΫϥΠΞϯτ ݕࡧ"1* ݕࡧ৚݅ʹϚον͢Δ ঎඼৘ใΛ୳͢ ঎඼σʔλϕʔε "DUPS "DUPS "DUPS "DUPS ɹʢΑ͏΍͘ʣ׬੒ Πϯελϯε# Πϯελϯε" ݕࡧ৚݅ʹϚον͢Δ ঎඼৘ใΛ୳͢ "DUPS
  18. +-BOH'FTU,BOTBJ0OMJOF ࠶ܝ   &$αΠτͰ঎඼Λ୳͢ʮݕࡧ"1*ʯ  )551ͰϦΫΤετΛ͏͚͚ͭΔ  ݕࡧ৚݅Λ͏͚ͱΔ 

    ݕࡧ৚݅ʹϚον͢Δ঎඼৘ใΛ͕͢͞  ݕࡧ݁Ռͱͯ͠঎඼৘ใΛ·ͱΊΔ  Ϩεϙϯε͢Δ
  19. +-BOH'FTU,BOTBJ0OMJOF ػೳ௥Ճ   &$αΠτͰ঎඼Λ୳͢ʮݕࡧ"1*ʯ  )551ͰϦΫΤετΛ͏͚͚ͭΔ  ݕࡧ৚݅Λ͏͚ͱΔ 

    ݕࡧ৚݅ʹϚον͢Δ঎඼৘ใΛ͕͢͞  ݕࡧ݁Ռͱͯ͠঎඼৘ใΛ·ͱΊΔ  Ϩεϙϯε͢Δ ɹػೳΛ௥Ճͨ͘͠ͳΔ ɹʮೖྗΩʔϫʔυΛม׵ͯ͠ݕࡧ͢Δʯ
  20. +-BOH'FTU,BOTBJ0OMJOF ͻͱ͘;͏   &$αΠτͰ঎඼Λ୳͢ʮݕࡧ"1*ʯ  )551ͰϦΫΤετΛ͏͚͚ͭΔ  ݕࡧ৚݅Λ͏͚ͱΔ 

    ݕࡧ৚݅ͷΩʔϫʔυΛม׵͢Δ  ݕࡧ৚݅ʹϚον͢Δ঎඼৘ใΛ͕͢͞  ݕࡧ݁Ռͱͯ͠঎඼৘ใΛ·ͱΊΔ  Ϩεϙϯε͢Δ
  21. +-BOH'FTU,BOTBJ0OMJOF ิ଍ʢऄ଍ʮݕࡧ৚݅ͷΩʔϫʔυΛม׵͢Δʯʁ   ɹ ΋ͱͷݕࡧ৚݅ʮࡒ෍ʯ ✕ʮ΢ΥϨοτʯͰొ࿥͞Εͨ঎඼͕ώοτ͠ͳ͍ ✕ʮ͍͞;ʯʮαΠϑʯͳͲϤϛΨφͰ঎඼͕ώοτ͠ͳ͍ ɹ ม׵ޙͷݕࡧ৚݅

    ˠʮࡒ෍ʯPSʮ΢ΥϨοτʯPSʮ͍͞;ʯPSʮαΠϑʯ ˎγϊχϜ΍ܗଶૉղੳͰͷϤϛΨφ௥Ճ͸ ɹผʑʹରԠ͢Δ͜ͱ͕ ɹ࣮ࡍʹ͸ଟ͍ͱࢥ͍·͢ɻ ɹ͜͜Ͱ΋આ໌ͷͨΊ໰୊ΛۃখԽ͠·͢ɻ ɹଟ͘ͷύλʔϯͰώοτ͢ΔΑ͏ʹݕࡧ৚݅ΛಡΈସ͑Δ ࡒ෍ ΢ΥϨοτ ͍͞; αΠϑ ࡒ෍ ΢ΥϨοτ ͍͞; αΠϑ
  22. +-BOH'FTU,BOTBJ0OMJOF طଘ෦඼   Ϧ Ϋ Τ ε τ Λ

     ͏ ͚ ͭ ͚ Δ ݕࡧ৚݅Λ͏͚ͱΔ ݕࡧ݁Ռͱͯ͠ ঎඼৘ใΛ·ͱΊΔ Ϩ ε ϙ ϯ ε ͢ Δ ΫϥΠΞϯτ ݕࡧ"1* ݕࡧ৚݅ʹϚον͢Δ ঎඼৘ใΛ୳͢ ঎඼σʔλϕʔε ݕࡧ৚݅ͷ ΩʔϫʔυΛม׵͢Δ "DUPS "DUPS "DUPS "DUPS ɹલճͷঢ়ଶ
  23. +-BOH'FTU,BOTBJ0OMJOF ΞΫλʔΛ௥Ճ   Ϧ Ϋ Τ ε τ Λ

     ͏ ͚ ͭ ͚ Δ ݕࡧ৚݅Λ͏͚ͱΔ ݕࡧ݁Ռͱͯ͠ ঎඼৘ใΛ·ͱΊΔ Ϩ ε ϙ ϯ ε ͢ Δ ΫϥΠΞϯτ ݕࡧ"1* ݕࡧ৚݅ʹϚον͢Δ ঎඼৘ใΛ୳͢ ঎඼σʔλϕʔε "DUPS "DUPS "DUPS "DUPS "DUPS ݕࡧ৚݅ͷ ΩʔϫʔυΛม׵͢Δ ɹʮΩʔϫʔυม׵ʯ༻ͷ ɹΞΫλʔΛ௥Ճʢ࣮૷ʣ͢Δ
  24. +-BOH'FTU,BOTBJ0OMJOF ˠݕ౼Ҋˠ݁Ռˠ՝୊ˠݕ౼Ҋˠ݁Ռ   Ϧ Ϋ Τ ε τ Λ

     ͏ ͚ ͭ ͚ Δ ݕࡧ৚݅Λ͏͚ͱΔ ݕࡧ݁Ռͱͯ͠ ঎඼৘ใΛ·ͱΊΔ Ϩ ε ϙ ϯ ε ͢ Δ ΫϥΠΞϯτ ݕࡧ"1* ݕࡧ৚݅ʹϚον͢Δ ঎඼৘ใΛ୳͢ ঎඼σʔλϕʔε ݕࡧ৚݅ͷ ΩʔϫʔυΛม׵͢Δ "DUPS ݕࡧ৚݅ͷ ΩʔϫʔυΛม׵͢Δ "DUPS "DUPS "DUPS "DUPS ɹΞΫλʔؒͷ΍ΓͱΓॱΛ ɹೖΕସ͑Δʢ࣮૷͢Δʣ
  25. +-BOH'FTU,BOTBJ0OMJOF ͭΈ͔͞Ͷͨ݁Ռ   Ϧ Ϋ Τ ε τ Λ

     ͏ ͚ ͭ ͚ Δ ݕࡧ৚݅Λ͏͚ͱΔ ݕࡧ݁Ռͱͯ͠ ঎඼৘ใΛ·ͱΊΔ Ϩ ε ϙ ϯ ε ͢ Δ ΫϥΠΞϯτ ݕࡧ"1* ݕࡧ৚݅ʹϚον͢Δ ঎඼৘ใΛ୳͢ ঎඼σʔλϕʔε ݕࡧ৚݅ͷ ΩʔϫʔυΛม׵͢Δ ɹখ͘͞෦඼Խ͍͔ͯͨ͠Β ɹطଘ෦෼ʹ͸ ɹ࠷খݶͷมߋͷΈͰࡁΜͩ "DUPS ݕࡧ৚݅ͷ ΩʔϫʔυΛม׵͢Δ "DUPS "DUPS "DUPS "DUPS
  26. +-BOH'FTU,BOTBJ0OMJOF "LLB)551   Ϧ Ϋ Τ ε τ Λ

     ͏ ͚ ͭ ͚ Δ Ϩ ε ϙ ϯ ε ͢ Δ ΫϥΠΞϯτ ݕࡧ"1* ঎඼σʔλϕʔε ɹ"LLB)551 ɹɾϦΫΤετϨεϙϯεͷ ɹɹσʔλม׵ʢ+40/ʣ ɹɾ"LLB"DUPSͱͷ࿈ܞ ɹˠϦΫΤετͷ಺༰Λ ɹɹɹΞΫλʔΛ࢖ͬͨॲཧ΁ͭͳ͛Δ
  27. +-BOH'FTU,BOTBJ0OMJOF "LLB4USFBNT   4PVSDF 'MPX 4JOL ৘ใɾσʔλͷݯ 0VUQVUΛ࣋ͭ ม׵͢Δ

    *OQVUͱ0VUQVUΛ࣋ͭ ৘ใɾσʔλͷऴண఺ *OQVUΛ࣋ͭ 'MPX 4JOL 4PVSDF
  28. +-BOH'FTU,BOTBJ0OMJOF "LLB4USFBNT   ॲཧͷྲྀΕΛ%4-Ͱදݱ͢Δ͜ͱ͕Ͱ͖Δ ˠ෦඼Λͭͬͯ͘૊Έ߹ΘͤͯॲཧΛͭ͘Γ͋͛Δ 4PVSDF 'MPX 'MPX 'MPX

    #DBTU 4JOL .FSHF 4JOL TPVSDF_CDBTU_GMPX_TJOL CDBTU_GMPX_NFSHF_TJOL CDBTU_GMPX_NFSHF ͔ͳΓ௚ײతʹ هड़Մೳ