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

PHPからScalaへ...その後

481a460d2008ec84e545cb877896d08b?s=47 YutaAdachi
September 20, 2014

 PHPからScalaへ...その後

ChatWorkがPHPからScalaへ移行する宣言をして半年、進捗どうですか?

481a460d2008ec84e545cb877896d08b?s=128

YutaAdachi

September 20, 2014
Tweet

Transcript

  1. PHP͔ΒScala΁…ͦͷޙ Yuta Adachi (ChatWork)

  2. ࣗݾ঺հ ҆ୡ ༐ଠ @UAdachi ग़਎ - ౡࠜݝদߐࢢ ࢓ࣄ - Scala

    + DDD at ChatWork झຯ - ςχε(΋ͬͺΒ؍ઓ), өը
  3. ChatWorkͷ঺հ

  4. ChatWork ౦ژɿ16ਓ େࡕɿ20ਓ USAɿ6ਓ (New!) ϧΫηϯϒϧΫʹࢠձࣾΛઃཱ ϏδωενϟοτπʔϧʮνϟοτϫʔΫʯΛల։த

  5. ChatWork + ϏσΦ௨࿩ in the cloud νϟοτ λεΫ؅ཧ

  6. ಋೖ਺ ̐ສ̒ઍࣾɺ̐̍ສϢʔβʔಥഁʂ ಋೖاۀྫɿ ʢ2014೥5݄ݱࡏʣ 0 125000 250000 375000 500000 2011

    6 9 12 2012 6 9 12 2013 6 9 12 2014 6 Ϣʔβʔ਺ɿ
  7. PHP͔ΒScala΁…

  8. ൒೥લ…

  9. ݴޠ+ϑϨʔϜϫʔΫબఆ߹॓ 2ധ3೔ ੩Ԭݝҏ౦ࢢ ! IUUQEIBUFOBOFKQSB[PO

  10. None
  11. ͦͷޙ…

  12. ͳͥScalaΛબΜ͔ͩ - ੩తܕ෇͚ݴޠΛ࢖͍͍ͨ - ιʔείʔυͷՄಡੑߴͦ͏ - εέʔϥϏϦςΟߴͦ͏

  13. ͦͷޙ…

  14. ਐḿ • Scalaֶश (5݄த०ʙ) • ϏζϦʔν͞Μͱษڧձ (5݄Լ०) • ϓϩδΣΫτൃ଍ (7্݄०ʙ)

    • ࣾ಺ษڧձ (8݄Լ०ʙ)
  15. Scalaͷֶश

  16. ScalaͷֶशϑΣʔζ • ಠश (5݄த०ʙԼ०) • ՝୊ →ϨϏϡʔ (6݄຤ʙ7্݄०) • ϖΞϓϩ

    (7্݄०ʙ)
  17. ಠश

  18. ಠश • ͰAPIΛ࡞ͬͯΈΔ • ίοϓຊ + ٯҾ͖Ϩγϐ

  19. ੒Ռ • ͘͘͝͝جຊతͳจ๏͚ͩཧղͨ͠

  20. ͜ͷઌେৎ෉͔ͳ…

  21. ͦΜͳ࣌ɺ ٹੈओ͕δϣΠϯ!!!

  22. ͔ͱ͡ΎΜ • Scalaͷ͍͢͝ਓ͕ChatWorkʹ Ճ౻५Ұ͞Μ!KJLP λά౶੍࣭ݶ ೑ 4DBMB %%%

  23. ՝୊ - ϨϏϡʔ

  24. ՝୊ • ؆୯ͳσʔλߏ଄ (2෼໦) • ਺ྻɺ୯ޠΧ΢ϯτɺݕࡧ • AkkaͰMap / Reduce

  25. ϨϏϡʔ • ϓϧϦΫग़ͯ͠ɺϨϏϡʔ • ίϝϯτΛ΋Βͬͯվળɺͷ܁Γฦ͠

  26. ੒Ռ • ύλʔϯϚον࢖͑ΔΑ͏ʹͳͬͨ • ߴ֊ؔ਺͕࢖͑ΔΑ͏ʹͳͬͨ • ؔ਺ܕͬΆ͘ॻ͚ΔΑ͏ʹͳ͖ͬͯͨ

  27. ϓϩδΣΫτൃ଍ → ϖΞϓϩ։࢝

  28. ϖΞϓϩ ɾϦϞʔτͰϖΞϓϩ ɾϖΞϓϩ : 뱌 = 3 : 7 ɾιϩͷͱ͖͸ݟΑ͏ݟਅࣅͰॻ͍ͯΈΔ

  29. ੒Ռ ɾޮ཰తͳֶश͕Ͱ͖ͨ ɾ஌ࣝͷڞ༗͕Ͱ͖ͨ ɾूதͰ͖ͨ

  30. ޮ཰తͳScalaֶश ʮ͜͜͸”for yield”Ͱॻ͖௚ͤΔͶʯ ʮ͜͏͍͏ߴ֊ؔ਺͕͋ͬͯɺ…ʯ ʮfoldLeftͱreduceLeftͷҧ͍͸…ʯ

  31. ScalaҎ֎ͷ஌ࣝ΋ڞ༗ ʮIntelliJʹ͸͜͏͍͏γϣʔτΧοτ͕…ʯ ! ʮDDDతʹ͸ɺ͜Ε͸ΞϓϦέʔγϣϯ૚ͷ ࿩ͩͶɻυϝΠϯͱ͸ؔ܎ͳ͍͔ΒҠͦ͏ɻʯ

  32. ूதͰ͖Δ ࣗવͱίʔσΟϯάʹूத͢Δ

  33. ϖΞϓϩͰେ੾ͳ͜ͱ

  34. େ੾ͳ͜ͱ μϥμϥ΍Βͳ͍ ऴྃޙʹίʔυΛטΈࡅ࣌ؒ͘Λ༻ҙ͢Δ ͨ·ʹ͸ࡶஊ͢Δ (ίϯύΠϧ͠ͳ͕Β)

  35. ϦϞʔτͰͲ͏΍ͬͯ ϖΞϓϩ͢Δͷ͔ʁ

  36. ScreenHero ɾࣗ෼ͷΩʔϘʔυͰϖΞϓϩͰ͖Δ ɾ͘͘͞͞ϦϞʔτϖΞϓϩͰ͖Δ IUUQTTDSFFOIFSPDPN

  37. ScreenHero ɾΤσΟλͷઃఆ͸ఘΊΔ IUUQTTDSFFOIFSPDPN ϖΞʮIntelliJ IDEAʹvimϓϥάΠϯ͕ೖͬͯͳ͍ͱ͔ɺ ਓ͕ؒ࢖͑Δ΋ͷ͡Όͳ͍ͳʯ

  38. ࣾ಺ษڧձ

  39. ࣾ಺ษڧձ ઌ݄຤ʹελʔτɺि2ϖʔε جຊతʹ͸΋͘΋͘՝୊ + ϖΞϓϩ → ϊ΢ϋ΢΍৘ใ·ͱ·ͬͨΒެ։͍ͨ͠

  40. ·ͱΊ

  41. ·ͱΊ ɾʮScalaʹҠߦ͠·͢ʂʯએݴ → ϏζϦʔν͞ΜͱษڧձͰ͖ͨ → ࠾༻͕ਐΜͩ

  42. ·ͱΊ ɾ̍ਓͰ΋͘΋ֶ͘श͢Δͷ͸ޮ཰ѱ͍ → ScalaΤΩεύʔτ͍ͳͯ͘΋!!! ! ɾϖΞϓϩͰ࣮ફతͳॻ͖ํ͕਎ʹ͍ͭͨ

  43. ·ͱΊ ࠓޙͷChatWorkʹظ଴͍ͯͩ͘͠͞ʂʂʂ

  44. ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ