éåžžã®ããã°ã©ãã³ã°èšèªã§ã¯åé¡ã解決ã§ããªãå ŽåããããŸãã 倧éã®ãã©ãã£ãã¯ã䌎ããªã¢ã«ã¿ã€ã ã¡ãã»ãŒãžã³ã°ãå®çŸããã¿ã¹ã¯ã«çŽé¢ããŠãããšããŸãã æé©ãªæ¹æ³ æãããªçç±ãããRubyã¯ããã«æé©ãªãªãã·ã§ã³ã§ã¯ãªãããã代æ¿ã®æ€çŽ¢ãéå§ããå¿ èŠããããŸãã å€ãã®æ¹æ³ããããŸãããã«ããŒã«é¢ããŠã¯ãElixirã䜿çšããã®ãæåã®éžæã§ãã
Elixirã¯ãErlangä»®æ³ãã·ã³ã§å®è¡ãããRubyæ§æãåããé¢æ°åããã°ã©ãã³ã°èšèªã§ãã ãããã£ãŠãRubyã®äžçã®äººã«ãšã£ãŠã¯ããã®èšèªã«ç²Ÿéããããšã¯éåžžã«ç°¡åã§ãã å®å šã«ç解ããããã«ã¯ãããã¥ã¡ã³ããããäžåºŠèªã¿çŽããŠã¿ãŠãã ããã
ã¿ã€ãã«ããã®è³ªåãžã®åçãšãããäžã«ãããšãªã¯ã·ãŒã«ã«é¢ããå€ãã®èå³æ·±ãããšã
絶察ã«ïŒ Phoenixã¯ãã©ãŒRailsã§ã¯ãªããããŒãããŒã§ã
äž¡æ¹ã®ãã©ãããã©ãŒã ã®Webã¢ããªã±ãŒã·ã§ã³ã®æ§é ã¯éåžžã«äŒŒãŠããŸãã ããã¯é©ãã¹ãããšã§ã¯ãããŸãããPhoenixã³ãã¥ããã£ã®æãéèŠãªã¡ã³ããŒã®1人ã¯ãRailsã®ã³ã¢ããŒã ã®å ã¡ã³ããŒã§ããããã¬ãŒã ã¯ãŒã¯ã®éçºã«æºãã人ã ã®ã»ãšãã©ã¯ã«ããŒã§ãã ãŸã ããã€ãã®éãããããŸãã
- ã¢ããªã±ãŒã·ã§ã³ãæ§ç¯ããããã®la "Clean Architecture"ã¢ãããŒãã®å®è£ ã æãéèŠãªå€æŽã¯ãPhoenix 1.3ã®ææ°ããŒãžã§ã³ã§è¡ãããŸããã 詳现ã«ã€ããŠã¯ã ãã®èšäºãã芧ãã ãã ã Phoenixã®éšåãã¢ããªã±ãŒã·ã§ã³ã®éšåããåé¢ããããžãã¹ããžãã¯ãã³ã³ããã¹ãã«å¶éãããªããžããªã䜿çšããŠããŒã¿ããŒã¹ãæäœããŸãããããã¯ãã¹ãŠRailsã®äžçã§ã¯äžè¬çã§ã¯ãããŸããã
- Umbrellaã¢ããªã±ãŒã·ã§ã³ïŒ Umbrellaã¢ããªïŒ-ãã€ã¯ããµãŒãã¹ã®æ©ããã䜿çšãæŸæ£ããèšå€§ãªããžãã¹ããžãã¯ã1ã€ã®å€§ããªã¢ããªã±ãŒã·ã§ã³å ã®ããŒãã«åå²ãããšããã¢ã€ãã¢ã ãã®Elixiræ©èœã®è©³çŽ°ã«ã€ããŠã¯ã ãã®èšäºãåç §ããŠãã ãã ã
- ãã§ããã¯ã¹ã®è¡šçŸã¯ãã³ãã¬ãŒããšåŒã°ãããã³ã¬ãŒã¿ãŒã«äŒŒãŠããŸãããçè«çã«ã¯ããã¯ç¹å¥ãªå°é£ãåŒãèµ·ããããšã¯ãããŸããããçžäºäœçšã®æŠå¿µãå€ãã çŸåšäººæ°ã®ããè±èŠã®ããã«ãªããŸã ã
- Phoenixã®ãã1ã€ã®æ©èœ-ãã£ã³ãã«ã ãã£ãã«ã«æ¥ç¶ãããã³ã«ãæ°ããããã»ã¹ãäœæãããŸãããã®åŸããšã©ãŒãçºçããŠããä»ã®æ¥ç¶ã«ã¯åœ±é¿ããŸããã ããã«è©³çŽ°ã«ãã®ãããã¯ãæ€èšããŸãã ããã«ãPhoenixã¯ãéæ§é åWebãœã±ãããžã®æ¥ç¶ã®ããã®åªããæœè±¡åãåããããã³ããšã³ãã©ã€ãã©ãªãæäŸããŸãã
- ãšãªã¯ãµãŒèšèªã®ãã¹ãŠã®æ¥œãã¿ãããã«ã€ããŠã¯åŸã§èª¬æããŸãã
ããã³ããšã³ãã§äœæ¥ããããã®çµã¿èŸŒã¿ããŒã«ãããRailsãšã¯ç°ãªãã¢ã€ãã¢ãå²åŠã«è³ããŸã§ãããŸããŸãªå°ããªéãããããŸãã
Erlangä»®æ³ãã·ã³ãšãããé£ã¹ããã®
Rubyã¯ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã§ãã ããã¯ãçç£æ§ãšã·ã³ãã«ããæåŸ
ããŠæŸæ¬å¹žåŒãäœæããã€ã³ã¿ããªã¿èšèªã§ãã äžæ¹ããšãªã¯ãµãŒã¯ãJose Valimã«ãã£ãŠäœæããã BEAM
ãšåŒã°ããErlangä»®æ³ãã·ã³ã§å®è¡ãããé¢æ°åèšèªã§ãã ããã°ã©ã ã¯BEAM
ãã€ãã³ãŒãã«ã³ã³ãã€ã«ãããŸããããã¯ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®åäžããã»ã¹ã®ããã«èŠããŸãããå®éã«ã¯å®å®å
šäœãéãã§ããŸãã
BEAM
ã¯ãµãŒããŒäžã§ç¶ç¶çã«å®è¡ãããŸãã RubyïŒããã³RailsïŒããã»ã¹ã¯ããµãŒããŒããªã¯ãšã¹ãã®åŠçãéå§ãããšãã«ã®ã¿éå§ãããŸãã ãããã£ãŠãããšãã°ã1æéããšã«äœããã®ã¢ã¯ã·ã§ã³ãå®è¡ããå¿
èŠãããå ŽåãRailsç°å¢ã§CronJob
ã䜿çšããå¿
èŠããããŸããããã§ããã¯ã¹ã§ã¯ã BEAM
å
ã®å°ããªElixirããã°ã©ã ããããåŠçããŸãã
defmodule Stack do use GenServer # Callbacks def handle_call(:pop, _from, [h | t]) do {:reply, h, t} end def handle_cast({:push, item}, state) do {:noreply, [item | state]} end end # Start the server {:ok, pid} = GenServer.start_link(Stack, [:hello]) # This is the client GenServer.call(pid, :pop) #=> :hello GenServer.cast(pid, {:push, :world}) #=> :ok GenServer.call(pid, :pop) #=> :world
Elixirã§ã¿ã¹ã¯ãå®è¡ããã«ã¯ãæ°ããããã»ã¹ïŒErlangã®éæ³ã®äžçã§ã¯ã¹ã¬ããã®ããã«åäœããŸãããå®éã«ã¯ã©ã¡ãã§ããããŸããïŒãäœæã§ããŸããäžæ¹ãRubyã§ã¯ãããã¯ã°ã©ãŠã³ãã¿ã¹ã¯ãå¥ã®ãã¥ãŒã«é
眮ããå¿
èŠããããŸãïŒããšãã°ã ã Sidekiq
ãä»ããŠïŒãWebã¢ããªã±ãŒã·ã§ã³ãšã¯ç¬ç«ããŠã¹ã±ãŒãªã³ã°ã§ããããã«ããŸãã
ããã»ã¹ãåé¢ãããã¡ãã»ãŒãžã®äº€æäžã«ããŒã¿ã®æ°ããã³ããŒãäœæããããããã·ã¹ãã ã®å察åŽã§ããŒã¿ã®ç Žæãå€æŽãå¿é ããå¿ èŠããªããªããŸãã ããã»ã¹å ã®æäœã¯åæçã§ããããããã®å®è¡é åºã¯åãããŒããããã¯ããã«é©åã§ãã å¥ã®å©ç¹ã¯ãå¹ççãªã¬ããŒãžã³ã¬ã¯ã¿ãŒã§ãã ããã»ã¹ããç¬èªã«åäœããããšããã«ãOSã®ã¡ã¢ãªã解æŸãããŸãã
Rubyã¹ããªãŒã ïŒ JRuby
ã Rubinius
ïŒã«ã¯ãä»ã®ã¹ããªãŒã ããã®ããŒã¿ãšããåãããæ©èœããããŸããããã¯ããã®åŸãããã°ããã®ã«éåžžã«åé¡ããããŸãã ãã®ãããªå Žåã競åç¶æ
ã¯ããªãæ¥éã«é²è¡ããŸãã
Webãœã±ãããæäœãã
ãªã¢ã«ã¿ã€ã ã¢ããªã±ãŒã·ã§ã³ïŒãã£ãããªã©ïŒã¯ãããŒã¿äº€æãã£ãã«ïŒWebãœã±ãããªã©ïŒã䜿çšããŸãã Phoenixã§ããããäœæããã®ã¯ç°¡åã§ãã Railsã§ã¯ãããå¯èœã§ãããWebãœã±ããæ¥ç¶ãæäŸããActionCable
ã³ã³ããŒãã³ãã¯ãæåã®1000ã®åææ¥ç¶ã«å¯ŸåŠããå¯èœæ§ã¯äœãã§ãã ãã§ããã¯ã¹ã®èŠ³ç¹ããèŠããšããµãŒããŒããã¯ã©ã€ã¢ã³ãã«ã¡ãã»ãŒãžãéä¿¡ããããã®ActionCable
ã¢ã«ãŽãªãºã ã¯ã ActionCable
åçŽã§ãä¿¡é Œæ§ãäœããæ¡åŒµæ§ãäžååã§ãã ãã®å ŽåãElixirãšPhoenixã䜿çšããã»ããã©ãã ãæå©ã§ããããç解ã§ããŸããã¢ããªã±ãŒã·ã§ã³ã¯ã1ã€ã®ãµãŒããŒããæ°åäžã®åææ¥ç¶ãç°¡åã«åŠçã§ããŸãã
å
¬å¹³ã«èšããšãå®è¡äžã®ã¢ããªã±ãŒã·ã§ã³ã§Railsã±ãŒãã«ã«åé¡ãçºçããå Žåã¯ãå®è£
ã®1ã€ãErlangã§ã®ã¿è¡ã AnyCable
ããš AnyCable
ãå§ãããŸãã ããã«ããã BEAM
on Railã¢ããªã±ãŒã·ã§ã³ã®å©ç¹ãåŸãããŸãã
èšå€§ãªWebã¢ããªã±ãŒã·ã§ã³ãBEAM
å®è¡ããããšBEAM
ç¹ã«æ¥œããã§ããè€æ°ã®ãµãŒããŒã«ãŸãããã¹ã±ãŒãªã³ã°ã¯éåžžã«ç°¡åã§ãã ãã§ããã¯ã¹ã§ãããžã§ã¯ããäœæãããšãäžè¬çã«ã¹ã±ãŒãªã³ã°ã®åé¡ãå¿ããããšãã§ããŸãã ããããã°... WhatsApp
ãµãŒããŒãBEAM
å®è¡ãããããšãç¥ã£ãŠããŸããïŒ
~~~
å€ãã®äººãççŽã«èšã£ãŠãã¢ããªã±ãŒã·ã§ã³ãã¹ã±ãŒã©ãã«ã«ããããã«ã¯ãElixirã䜿çšããå¿ èŠããããšäž»åŒµããŸããRubyãšRailsã¯ããã«å¯Ÿå¿ããŠããªãããã§ãã
ããã¯éåžžã«è¿èŠçŒçãªãã³ãã§ãããèè ãã¹ã±ãŒãªã³ã°ã®æŠå¿µã«å®å šã«ç²ŸéããŠããªãããšã瀺ããŠããŸãã Rubyã¯æãè³¢ãããã°ã©ãã³ã°èšèªã§ã¯ãããŸããããå€ãã®åŽåããããã«å žåçãªRailsã¢ããªã±ãŒã·ã§ã³ãã¹ã±ãŒã«ã¢ãŠãã§ããŸãã ãã®ãããªã¢ããªã±ãŒã·ã§ã³ã¯éåžžããªãœãŒã¹ãå ±æããªãã¢ãŒããã¯ãã£ã«åºã¥ããŠãããã»ãšãã©ã®å ŽåããµãŒããŒãè¿œå ããã ãã§1ç§ãããã®åŠçæžã¿ãªã¯ãšã¹ãã®ç·æ°ãå¢ããããšãã§ããŸãã
éã®é¢ã§æãå®äŸ¡ãªãªãã·ã§ã³ã§ã¯ãªããããããŸããããæ£ç¢ºã«ã¹ã±ãŒã©ãã«ã§ãïŒ
~~~
é¢æ°åããã°ã©ãã³ã°ãšOOP
ãšãªã¯ãµãŒã¯Rubyã«å°ã䌌ãŠããããšããããŸãã rubyã¯ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã®äžçã«å±ããElixirã¯æ©èœã®ååã«åºã¥ããŠæ§ç¯ãããŠãããããããã¯éåžžã«çŽããããã§ãã ãããã¯2ã€ã®å¹³è¡ããå®å®ã§ãïŒ ããªããšRubyããããªããã«é·ãéåãæ¿ããå ŽåãElixirãç解ããã«ã¯ãŸã æéãããããŸãã
Phoenixã¯Elixirã§æžããã軜快ãªRailsã ãã§ã¯ãããŸãã
次ã®ã¢ãžã¥ãŒã«ã䜿çšããŠãElixirã§ã¡ãã»ãŒãžãéä¿¡ããããã»ã¹ãæ§æãããã®ãèŠãŠã¿ãŸãããã
defmodule Example do def start_link do spawn(fn() -> loop() end) end def loop do receive do {:hello, pid} -> IO.inspect("Got hello from #{inspect pid}") end loop() end end
ããã§ã¯IEx
éããŠã¿ãŸãããïŒ
iex(1)> pid = Example.start_link() #PID<0.120.0> iex(2)> send pid, {:hello, self()} "Got hello from "#PID<0.118.0>" "#PID<0.118.0>" {:hello, #PID<0.118.0>}
OOPã®ããã§ããã Erlang / Elixirã³ãã¥ããã£ã¯ããŠãŒã¢ã¢ããã£ãŠãããããã®2ã€ã®èšèªã¯ãä»ã®äžè¬çãªããã°ã©ãã³ã°èšèªãããOOPã®æŠå¿µãšäžè²«æ§ããããšææããŠããŸãã ããã§ãElixirã¯ãªããžã§ã¯ãæåèšèªã§ããïŒ çš®é¡ã¯ãããŸããã ããããããã«ã€ããŠã¯åŸã§ã
ã¡ãã»ãŒãžã³ã°ã®å©ç¹ã¯ãéä¿¡è ãäºåã«ããã£ãŠãããããã»ã¹ã®çžäºäœçšãå¶åŸ¡ã§ããããšã§ãã èŠèŠåãšãããã°ã®ããã»ã¹ã¯ãããã¯ããã¥ãŒããã¯ã¹ãªã©ã®äžŠåãããŒãå¶åŸ¡ããããã®åŸæ¥ã®æ¹æ³ã§èµ·ããããšãšæ¯èŒããŠãã¯ããã«ç°¡åã§ãã
ãªããžã§ã¯ãRubyãšã¯ç°ãªããæ©èœçãªElixirã®ã³ãŒãã¯ã¢ãžã¥ãŒã«ã§æ§æãããåã¢ãžã¥ãŒã«ã«ã¯éåžžãç¹å®ã®çš®é¡ã®åé¡ã解決ããããšãç®çãšããäžé£ã®é¢æ°ãå«ãŸããŠããŸãã Elixirã®å€§ããªå©ç¹ã¯ãç¹å®ã®ã¢ã¯ã·ã§ã³ã®çµæãäºæž¬å¯èœã§ããããšã§ãã
åé¢æ°ã®åŒæ°ã¯äºåã«èšè¿°ãããŠãããããéçºè ã¯ãã€ã³ã¹ã¿ã³ã¹å€æ°ãªã©ã§çºçãããããªãå°é£ãã解æŸãããŸãã ãŸããã·ã¹ãã ã®äžéšãæå³ããŠããªãããŒã¿ãšå¯Ÿè©±ããå Žåãäžèšã®åé¡ãåé¿ããã®ã«ã圹ç«ã¡ãŸãã
競äºå
Rubyã«ã€ããŠã¯ã競äºãäžååã§ãããšèšããŸãã ã¯ããRubyã¹ããªãŒãã³ã°ã®äžéšã®ããŒãžã§ã³ã§ã¯ç«¶äºåããµããŒããããŠããŸããã GIL
ã¹ããªãŒã ãåæããçµã¿èŸŒã¿ã®MRI
ïŒå
ã®RubyãCã§èšè¿°ïŒã¡ãœããã¯ãã¿ã¹ã¯ã®ç«¶äºçãªå®è¡ãé²ããŸãã Rubyã¯ãŸã 競äºåã®ããI / Oãèš±å¯ããŠããããšã«æ³šæããŠãã ããã
ãšãªãã·ã«ã¯ãã®ããã«äœæãããã ãã§ãã æåéãã®æå³ã§ã ãã®äžã§ã®ç«¶äºã¯ããããããã¢ã¯ã¿ãŒã®ã¢ãã«ãã«åºã¥ããŠå®è£ ãããŸãããã®çšèªã¯ããã®çšèªããªãªãŒã¹ãããåããErlangä»®æ³ãã·ã³ã«ãã£ãŠå®è£ ãããŠããæŠå¿µã§ãã
ã¢ã€ãã¢ã¯ãã¡ãã»ãŒãžã³ã°ãéããŠçžäºã«äœçšããçžäºã®ç¶æ ã«åœ±é¿ãäžããªãåé¢ããã»ã¹ãäœæã§ãããšããããšã§ãã åã®ãµãã»ã¯ã·ã§ã³ã§ãã®ãããªã¢ãã«ã®äŸãèŠãŠããŸããã
ãšãªã¯ãµãŒã¯ãRubyèªèº«ããã€ãŠæ°ã«å ¥ã£ãŠããã®ãšåãããã«ãéåžžãã«ãã¹ãã«å¥œãŸããããšã«æ³šæããŠãã ããã ããã§ã®åé¡ã¯ãããèšèªããå¥ã®èšèªã«åãæ¿ããããšã§ãã ãããããç¬èªã®æ¹æ³ã§åªããŠããé åçã§ããã2ã€ã®èšèªã§åæã«æžãããšã¯äžå¯èœã§ãã ããªãã¯éžæãããªããã°ãªããŸããã
ããŒã¿ããŒã¹ãæäœãã
RubyãšElixirã§æãäžè¬çãªããŒã¿ããŒã¹ããŒã«ã§ããActiveRecord
ãšEcto
ããããæ¯èŒããŸãããã ã©ã¡ãããªã¯ãšã¹ããäœæããŠæ€èšŒã䜿çšã§ããŸãããããã§ããŸã£ããç°ãªãæ¹æ³ã§æ©èœããŸãã ããã«ãŒã«ãšã£ãŠActiveRecord
ã¯ã·ã³ãã«ã§çŽæçã«äœ¿çšã§ããããã«SQL
ç¥èã¯å¿
èŠãããŸããã Ecto
ã®ã¹ããŒãªãŒã¯æ£å察ã§ããç解ããã®ãããé£ãããããã«åºæ¬çãªSQL
ç¥èãå¿
èŠã§ãã
defmodule Sample.App do import Ecto.Query alias Sample.Weather alias Sample.Repo def keyword_query do query = from w in Weather, where: w.prcp > 0 or is_nil(w.prcp), select: w Repo.all(query) end def pipe_query do Weather |> where(city: "Kraków") |> order_by(:temp_lo) |> limit(10) |> Repo.all end end
ActiveRecord
ã¯Railsã®ç§å¯ã®æŠåšã§ãããšèšããŸãïŒ ãããã誰ãã錻ãåãå§ããã®ã§ãïŒã Ecto
ã«ã€ããŠãEcto
ããšã¯èšããŸããã Ecto
ã¯åªããŠããŸãããPhoenixã¯ããããªããã°çŽ æŽãããã®ã§ããã ActiveRecord
ãªãRailsã¯ããèªäœã§ã¯ãããŸããã
å®ç³ãšããã±ãŒãž
gemã¯ãå¥ã®éçºè ãäœæããã³ãŒãã§ãã¢ããªã±ãŒã·ã§ã³ã«ç°¡åã«çµ±åã§ããŸãã æ¬è³ªçã«æ®éã®ã©ã€ãã©ãªã ãããžã§ã¯ãã®ã»ãšãã©ã®ã«ãã¹ãã¯ãåžžã«åãå®ç³ã䜿çšããŠããŸãã gemã䜿çšããªãã³ãŒãã¯ãå¡©ã䜿çšããªãé£åã«äŒŒãŠãããšèšããŸãã gemãšã³ã·ã¹ãã ã®å šæ©èœãè©äŸ¡ããã«ã¯ã ãã¡ããã芧ãã ãã ã
Elixirã®äžçã§ã¯ããµãŒãããŒãã£ã®éçºè
ãæäŸãããã®ãããªãœãããŠã§ã¢ã¯ããã±ãŒãžãšåŒã°ããŸãã ããã±ãŒãžã®ãšã³ã·ã¹ãã ã¯ããŸã ãã ã®ãšã³ã·ã¹ãã ã®èŠæš¡ãŸã§æé·ããŠããŸããïŒè©³çŽ°ã¯ãªã³ã¯ãåç
§ ïŒã PhoenixãšEcto
ã§ã®åäœããå€æãããšãããã±ãŒãžã¯å°æ¥ã®ã¢ããããŒãã§åé¡ãåŒãèµ·ããããšã¯ãªãã¯ãã§ãã ãããã確å®ã«èšãã®ã¯æ°å¹ŽåŸã«ã®ã¿å¯èœã§ãã
ã¹ããŒã
ç§ãã¡ã¯èªä¿¡ãæã£ãŠèšãããšãã§ããŸãïŒãã§ããã¯ã¹ã¯é«éã§ãã Railsãããã¯ããã«é«éã§ãã
ãããã¯ãŒã¯ã®åºå€§ãã§ã¯ãããŸããŸãªããã©ãŒãã³ã¹ãã¹ãã«é¢ããå€ãã®æ å ±ãèŠã€ããããšãã§ããŸããã詳现ã§ã¯ãããŸããã ãããããã§ãããElixirã§ãã¹ããããŒãããŠãµãŒããŒããåèµ·åãããããšãããšãåªããé»æºã€ã³ãžã±ãŒã¿ãŒã«ããããããããã¹ããã·ã³ã¯ã»ãšãã©ã®å Žå倱æããŸãã
ãŸããRubyãšElixirïŒããã³RailsãšPhoenixïŒã§ã®éçºé床ã¯ã»ãŒåãã§ãã ãã¡ããããããã¬ãŒã ã¯ãŒã¯ããå¥ã®ãã¬ãŒã ã¯ãŒã¯ã«åããŠç§»åããå Žåãæéã®æ倱ã¯é¿ããããªãããšãç解ããå¿ èŠããããŸãã
ããŠã³ã¿ã€ã ã®ãªãé«éå±é
ã»ãšãã©ã®Webã¢ããªã±ãŒã·ã§ã³ã§ã¯ããœãããŠã§ã¢æŽæ°äžã®çãããŠã³ã¿ã€ã ã¯åé¡ãåŒãèµ·ãããŸããã å€ãã®äŒæ¥ã¯ã1ã2åã®ããŠã³ã¿ã€ã ãæé€ããããšããŠããŸããããéãæšãŠãŠããããšã«æ°ä»ãããšãããããŸããã å Žåã«ãã£ãŠã¯ãããŠã³ã¿ã€ã ãªãã®å±éãæ¬åœã«å¿ èŠã§ãã
Rubyã®ç°å¢ã§ãã®åé¡ã解決ããã«ã¯æ±ããããªããã°ãªããŸãããElixirã¯ããã«å¯ŸåŠããŸãBEAM
ç¹ã«ãã®æ©èœãçµã¿èŸŒãŸããŠããŸããããã¯ãããã³ãŒãã®çœ®ãæãã§ãã å€ãã®äººã«ãšã£ãŠãããã¯å¥è·¡ã«ãªããŸãã DockerãæŸæ£ããªããã°ãªããªãå¯èœæ§ãé«ãã§ãã èŠããã«ãããã€ãã®ãã©ã¹ã
ãã ããæ¥ãã§åã°ãªãã§ãã ãããæŽæ°ã«ããŒã¿ããŒã¹ã®ç§»è¡ãå«ãŸããŠããå Žåãäž¡æ¹ã®ãã¯ãããžãŒã®ããŠã³ã¿ã€ã ãéæããã®ã¯ããã»ã©ç°¡åã§ã¯ãããŸããã
ãŠãããvsãã» ããããvsã¯ãªã¹
æŸæ¬å¹žå®ãšãã»ã»ãŽã¡ãªã ã¯æ¬åœã«éèŠãªäººç©ã§ããããããããèªåã®èšèªãšã³ãã¥ããã£å šäœã§å€ãã®ããšãããŠããŸããã ããããåèšèªã®åååã®äœæè ã«ã€ããŠè©³ãã話ããŸãããã RailsãPhoenixãªã©ã®ãªãŒãã³ãœãŒã¹ãããžã§ã¯ãã«ã¯éåžžã倧èŠæš¡ãªéçºããŒã ãããŸãã ãã®ãããªããŒã ã§ã¯ãéåžžã補åã¯ãªãšãŒã¿ãŒãéèŠãªåœ¹å²ãæãããŸãã éçºã®æ¹åæ§ã決å®ããå ¬å ±æŽ»åãå®æœããŸãã
Railsã®éçºè ã§ãããããããã€ã³ãã€ã€ãŒãã³ãœã³ïŒ å¥å DHHïŒã¯ãçºæ¡ã®æåã®æ¥ãããã¬ãŒã³ããŒã·ã§ã³ãè¡ã£ãŠããŸãã 圌ã¯çŽ æŽãããã¹ããŒã«ãŒã§ãã 以åãRailsConfã«ã³ãã¡ã¬ã³ã¹ã§ã®åœŒã®ãã¬ãŒã³ããŒã·ã§ã³ã¯ãåžžã«å€ãã®ããšã«ç®ãåããŠããŸããã ä»ã圌ã¯å°ãå°é¢ã倱ããŸãããã圌ã®è²¢ç®ã¯ãŸã 巚倧ã§ãã
ããããã¯ã也ç¥ããäŸã説æããæ¹æ³ãç¥ã£ãŠããŸãã ããã°ã©ãã³ã°ã«å ããŠã圌ã¯åçãšã¢ãŒã¿ãŒã¹ããŒãã«åŸäºããŠããŸãã ããããããã§ãããœãããŠã§ã¢è£œåãŸãã¯æ¬ãã埩掻ãããã圌ã®èœåïŒããã圌ã¯äœå®¶ã§ããããŸã ïŒãšç«¶ãããšã¯å°é£ã§ãã
ããããã¯æ ¢ã«èŠãããããããŸããããç解ã§ããŸãã Railsã³ãã¥ããã£ã¯Phoenixã³ãã¥ããã£ãããã¯ããã«å€§ãããDavidã¯Chrisãè¡ãããã«ãäŒè°ã§å šå¡ãšç©ççã«éä¿¡ããããšãã§ããŸããã§ããã
ãã®ãéã¯æåã®ææšã§ã¯ãããŸããã§ããããDavidã¯basecamp companyã®ãããã§å€§å¯è±ªã«ãªããŸãããããã¯RubyãšRailsã¹ã¿ãã¯ã§åäœããŸãã
ãã§ããã¯ã¹ã®ã¯ãªãšãŒã¿ãŒã§ããã¯ãªã¹ã»ããã³ãŒãããæåãã人åã§è©±ããŠããŸããã ã¯ãªã¹ã¯Railsã³ãã¥ããã£ã®ã¡ã³ããŒã§ããããããã€ãã®åé¡ã®è§£æ±ºçãèŠã€ãããªãã£ãããããšãªã¯ãµãŒã«åãæ¿ããŸããã ãããããã€ãŠãã£ãããã«ã圌ã¯èªåã®åµé ã«æ ç±ãåŸããŠãããšæããŠããŸãã äŒè°ã§ã¯ãã¯ãªã¹ã¯æ°åè ã«ããå¿ å®ã§ãã 圌ã®ã¬ããŒãã¯ãèšç·ŽãããŠããªããªã¹ããŒã«ããé©ããŠããŸãã
Chrisã¯DockYardã§åããŠããŸããDockYardã®ãªãŒããŒã¯å°è±¡çãªãšãªãã·ã«ã®ããŒã ãéããŸããã äŒç€Ÿã«ã¯ã¯ãŒã«ãªããã°ããããå€ãã®èšäºããµã€ãã®ç¿»èš³ã«äœ¿ã£ãŠããŸã ã
äž¡æ¹ã®ãã¬ãŒã ã¯ãŒã¯ã®äž»ãªåé¡
æãé£ããã®ã¯ãåªããéçºè ãèŠã€ããããšã§ããããã¯ãPhoenixãšRailsã®äž¡æ¹ã«é¢é£ããŠããŸãã ãã§ããã¯ã¹ã«ãšã£ãŠããã®ã¿ã¹ã¯ã¯ã¯ããã«æ·±å»ã§ãã ãããŠãããã¯å€§ããªåé¡ã§ãã 誰ãäœæ¥ããªãã®ã«ããªãå®ç§ãªãã¬ãŒã ã¯ãŒã¯ãå¿ èŠãªã®ã§ããããïŒ ãããããPhoenixã¯äžæµã®PHPéçºè ãšåéã«ãªãã¹ãã§ããããïŒ
ä»æ¥ã誰ããã©ãã§ããšãªã¯ã·ãŒã«ã«ã€ããŠè©±ããŠããã å匷ãå§ããŸããã-ä»ãã
ãã¯ãããžãŒã®åååã¯ç§ãã¡ã§ãã®ã§ããšãªã¯ãµãŒã®éçºã«ã§ããã ãæ©ãåå ããŠãã ããïŒ
ãŸããã©ã®ãã¬ãŒã ã¯ãŒã¯ãéžæããŸããïŒ
èŠçŽãããšãPhoenixã¯ãããã«åŒ·åãªãã¯ãããžãŒãæäŸããŠãããšèšããŸãããããã¯ãããžã§ã¯ãã®æåã瀺ããã®ã§ã¯ãããŸããã æ¬åœã«éèŠãªã®ã¯ãäœæ¥ãããã¬ãŒã ã¯ãŒã¯ã«ç²ŸéããŠããéçºè ã®ååšã§ãã
Railsã§é·ãéãããžã§ã¯ããå®è¡ããŠããå ŽåãPhoenixã«ç§»åãããšãã¯éåžžã«æ³šæããŠãã ããã å¥åŠãªåºã§ã¯ãèã¯åžžã«ç·ã§ãã å®éã«ã¯ã転éã¯æåããŸãããã»ãšãã©ã®å Žåã圌ãã®æè¡ã®ãã¹ã¿ãŒããããã«å¯ŸåŠããŸããã
äœãæ°ããããšã«ææŠãããåªç§ãªRailséçºè ã®ããŒã ãæ¢ã«ããå Žåã¯ãPhoenixã§ãµã€ããããžã§ã¯ããç·šæãããã®çµæã芳å¯ããã²ãŒã ãããããã«å€ãããã©ãããå€æãã䟡å€ããããŸãã
ElixirãšPhoenixã¯ãéåžžã®CRUDã¢ããªã±ãŒã·ã§ã³ãäœæããããã«ã䜿çšã§ããŸããäœããã®çç±ã§ãæ©èœããã°ã©ãã³ã°ã1ã€ã®ãµãŒããŒã®ã¿ã®ååšãèšèªã®æ°èŠæ§ãªã©ãäŒæ¥ããããå¿ èŠãšããå Žå
ããŠã³ã¿ã€ã ãªãã®é床ãšå±éããããžã§ã¯ãã«äžå¯æ¬ ã§ããå ŽåãPhoenixã䜿çšããã°ããã«å¯Ÿå¿ã§ããŸãã
ãããŠãããªããéžæãããã®ã¯äœã§ããééã£ããªãã·ã§ã³ããªãããšãç¥ã£ãŠããŸãã
ãããã«
ãã®èšäºã¯ã次ã®3ã€ã®è³æãç·šéãããã®ã§ãã
- ãã§ããã¯ã¹ã¯åªããŠããŸãããRailsã¯ãã人æ°ããããŸã / Stefan Wintermeyer
- ãªããšãªã¯ãµãŒãšãã§ããã¯ã¹ãªã®ãïŒ /ãã€ãã¹ã»ã©ãã³ãº
- Elixir / PhoenixãRuby / Railsãããæå©ãªãŠãŒã¹ã±ãŒã¹ã¯äœã§ããïŒ /ãã³ããªãã¯ãã³
翻蚳ã¯Nadezhda / tresstenselã«ãã£ãŠè¡ãããŸãã ã
ææã®é©åã¯ã ã€ãã¹ã©ã / ã€ãã¹ã©ãã«ãã£ãŠè¡ãããŸãã ã
PSèå³ã®ãã人ã¯å šå¡ã10æ19æ¥19:00 ã«Ramblerã§éå¬ãããElixirããŒãã£ã³ã°ã«æåŸ ãããŸãã ä»ã®éœåžãåœã®å± äœè åãã«ããªã³ã©ã€ã³ãããŒããã£ã¹ããéå¬ãããŸãã
PPS Telegramã®Elixirã«é¢ãã質åãžã®åçã