1. Erlangãšã¯äœã
1.1 Erlangã®ç±æ¥ãšéçºè
Erlangãšã¯ãéä¿¡ã·ã¹ãã ããã³åæ£ã·ã¹ãã ã®éçºãç®æããŠèšèšãããé¢æ°åã®ããã°ã©ãã³ã°èšèªã§ããã¹ãŠã§ãŒãã³ã®é信倧æãšãªã¯ãœã³ã«ãã£ãŠéçºããããã®èšèªã¯ãé«ããã©ãŒãã³ã¹ãªäžŠè¡åŠçãšåæ£åŠçãå¯èœãšããç¹é·ãæã£ãŠããŸãã
ãšãªã¯ãœã³ã«ãã1986幎ããéçºãå§ãŸãããããã©ã€ãšã¿ãªãªãœãããŠã§ã¢ãšããŠäœ¿ãããŠããŸãããã1998幎ã«ãªãŒãã³ãœãŒã¹ãšãªããäžçäžã®éçºè ãå©çšã§ããããã«ãªããŸããã
Erlangã®ååã¯ãåæã®éçºè ã§ãããšãªã¯ãœã³ã®ãšã³ãžãã¢ãã¢ãŒã ã¹ããã³ã°ããŽã£ã«ãžãŒã¹ããŽã£ã¯ã¬ã³ã®å§ã®é æåããåãããŠããŸãã
1.2 Erlangã®äž»ãªç¹åŸŽãšå©ç¹
Erlangã®æ倧ã®ç¹åŸŽã¯ã䞊è¡åŠçãšåæ£åŠçã容æã«è¡ããèšèšãšãªã£ãŠããããšã§ãã倧èŠæš¡ãªéä¿¡ã·ã¹ãã ãåæ£ã·ã¹ãã ãæ¯ããŠããããã«ã¯ãè€æ°ã®åŠçãåæã«å¹çè¯ãè¡ãããšãæ±ããããŸãã
é¢æ°åããã°ã©ãã³ã°ã®ç¹æ§ã掻ãããå¯äœçšã®ãªãèšèšãè¡ãããšã§ãããã°ã容æã§ãåå©çšæ§ãé«ããšèšããŸããããã«ãããã»ã¹éã®éä¿¡ã容æã«è¡ãããããåæ£ã·ã¹ãã ã®æ§ç¯ãå¯èœã§ãã
ãŸããé«åºŠãªèé害æ§ãç¹é·ã®äžã€ã§ããé害ãçºçããéã«ãå³åº§ã«ããã»ã¹ãåèµ·åããŠåŠçãç¶ç¶ããããšãã§ããŸãã
1.3 Erlangã®ã¡ãªãããšãã¡ãªãã
Erlangã®ã¡ãªãããšããŠã¯ã䞊è¡åŠçãšåæ£åŠçãåŸæã§ããããšãé«ãèé害æ§ãæã£ãŠããããšãé¢æ°åèšèªã§ããããå®å®ããéçºãè¡ããããšãæããããŸãããŸããOTPãšãããã¬ãŒã ã¯ãŒã¯ãååšããããšã§ãããå¹ççãªåæ£ã·ã¹ãã ã®æ§ç¯ãå¯èœãšãªã£ãŠããŸãã
äžæ¹ã§ãErlangã®ãã¡ãªãããšããŠã¯ãèšèªãšããŠã®æ®åçãäœããããåŠç¿è³æãå°ãªãããšãåŠç¿æ²ç·ãæ¥ã§ããããšãä»ã®èšèªãšæ¯ã¹ãŠå®è¡é床ãé ãããšãªã©ãæããããŸãããããã®ç¹æ§ããã䜿çšç¯å²ã¯ç¹å®ã®åéã«éãããããšãå€ãã§ãã
ããããéä¿¡ã·ã¹ãã ã®éçºãåæ£ã·ã¹ãã ã®éçºã«ç¹åããŠããããããã®ç®çã«åèŽããå Žåã¯éåžžã«åŒ·åãªããŒã«ãšãªãåŸãŸãã
1.4 Erlangãæ¡çšããŠããäŒæ¥
çŸåšãäžçäžã®æ§ã ãªäŒæ¥ãErlangãæ¡çšãããã®åŒ·åãªäžŠè¡åŠçãåæ£åŠçã®èœåã掻ãããŠããŸããç¹ã«ãéä¿¡é¢é£ã®éçºãè¡ãäŒæ¥ãã倧èŠæš¡ãªããŒã¿ãæ±ãäŒæ¥ã«ãããŠããã®äŸ¡å€ãèªããããŠããŸãã
äŸãã°ãWhatsAppã¯ãã®ããã¯ãšã³ãã«Erlangã䜿çšããŠããŸããWhatsAppã¯å šäžçã§æ°ååã®ããŒã¿ããªã¢ã«ã¿ã€ã ã§ããåãããŠããããã®é«ã䞊è¡åŠçãšåæ£åŠçã®èœåãç©èªãããã«ãErlangã®åšåãçºæ®ãããŠããŸãã
ãŸããã¢ããŸã³ãFacebookãªã©ã®å€§èŠæš¡ãªITäŒæ¥ãäžéšã·ã¹ãã ã«Erlangã䜿çšããŠããŸãããã®ä»ã«ããã¢ãããCiscoãIBMããšãªã¯ãœã³ãªã©ã®æåäŒæ¥ãErlangãæ¡çšããŠããŸãã
2. Erlangã§äœãã§ããã®ã
Erlangã¯é¢æ°åããã°ã©ãã³ã°èšèªãšããŠãæ°å€ãã®æ©èœã«å¯ŸããŠé«ãããã©ãŒãã³ã¹ãæäŸããããã«èšèšãããŠããŸãããã®äžã§ãç¹ã«ç®ç«ã€ã®ã¯éä¿¡ã·ã¹ãã éçºã®å¯èœæ§ãåæ£ã·ã¹ãã éçºã®å®¹æãããããŠé«ãèé害æ§ã掻ããã䜿çšäŸã§ãã
ãŸããErlangã¯äžŠè¡åŠçãåŸæãšããŠãããããã«ããåŠçãåæã«è¡ãèœåãæã€ããšããã倧ããªäœæ¥éã§ãçŽ æ©ãåŠçããããšãå¯èœã§ãã
ããã§ã¯å ·äœçã«ãErlangã§ã¯äœãå®çŸå¯èœãªã®ããèŠãŠãããŸãããã
2.1 éä¿¡ã·ã¹ãã éçºã®äŸ
Erlangã¯éä¿¡ã·ã¹ãã éçºã«ç¹åããããã°ã©ãã³ã°èšèªã§ããããã¯å ã ãé信倧æãšãªã¯ãœã³ãèªç€Ÿã®è£œåéçºã®ããã«äœãäžããèšèªã ããã§ããã€ãŸããé«ãããã©ãŒãã³ã¹ãèŠæ±ãããéä¿¡ã·ã¹ãã éçºãåŸæã§ãã
Erlangã«ããéä¿¡ã·ã¹ãã éçºã®æ倧ã®ã¡ãªããã¯ããèé害æ§ãã«ãããŸããéä¿¡ã·ã¹ãã ã¯é«ãä¿¡é Œæ§ãæ±ããããŸãããErlangã¯ç°åžžçºçæã«ããã»ã¹ãè¿ éã«çµäºãããããšãã§ãããããéä¿¡ã·ã¹ãã éçºã匷åã«ãµããŒãããŸãã
Erlangã§äœæããéä¿¡ã·ã¹ãã ã¯ããšã©ãŒãã¬ãŒã¹æ©æ§ã«ããç°åžžæ€åºãè¡ããŸãããã®ãããªErlangã®ç¹æ§ããå®å¿ããŠéä¿¡ã·ã¹ãã ãéçºã§ããçç±ã®äžã€ã§ãã
2.2 åæ£ã·ã¹ãã éçºã®äŸ
Erlangã®äžã€ã®åŒ·ã¿ã¯ãåæ£ã·ã¹ãã éçºã容æã«ããããšã§ããåæ£ã·ã¹ãã ãšã¯ãè€æ°ã®ã³ã³ãã¥ãŒã¿ããããã¯ãŒã¯ãä»ããŠååããäžå°ã®ã³ã³ãã¥ãŒã¿ã§åäœããŠãããã®ããã«èŠããããã·ã¹ãã ã§ãã
Erlangã§ã¯ããã»ã¹ééä¿¡ãå¯èœã§ãããã«ããåæ£ã·ã¹ãã ã®éçºã容æã«ãªããŸããããããã®ããã»ã¹ã¯ç¬ç«ããŠãããäžã€ã®ããã»ã¹ããšã©ãŒãèµ·ãããŠãä»ã®ããã»ã¹ã«åœ±é¿ãäžããŸãããããã«ãããåæ£ã·ã¹ãã éçºè ã¯å®å¿ããŠéçºãè¡ãããšãã§ããŸãã
ãŸããErlangã®ã©ã€ãã©ãªã§ããOTPãåæ£ã·ã¹ãã ã®éçºãäžå±€å®¹æã«ããŠããŸããè€éãªäžŠè¡åŠçãç¶æ 管çãæœè±¡åããéçºè ã®æéãå€§å¹ ã«è»œæžããŸãã
2.3 é«ãèé害æ§ã掻ãããå©çšäŸ
Erlangã¯é«ãèé害æ§ãæã£ãŠããŸããããã«ããã倧èŠæš¡ãªäžŠååŠçãè¡ãã·ã¹ãã ã§ãå®å®ããéçšãå¯èœãšãªããŸãã
èé害æ§ã¯ç¹ã«ããªã¢ã«ã¿ã€ã ã®å€§éããŒã¿åŠçãé«ä¿¡é Œæ§ãæ±ããããã·ã¹ãã ã«ãšã£ãŠéèŠã§ããäŸãã°ãéèã®åéã§ã¯ååŒåŠçã·ã¹ãã ããªã¢ã«ã¿ã€ã ã«æ°çŸäžã®ãã©ã³ã¶ã¯ã·ã§ã³ãåŠçããããšããããŸãããã®ãããªã·ã¹ãã ã§é害ãèµ·ãããšå€§ããªæ倱ãšãªããããErlangã®é«ãèé害æ§ã掻ããããŸãã
ãŸããErlangã§ã¯ããã»ã¹ãç¬ç«ããŠåããããäžã€ã®ããã»ã¹ã§é害ãçºçããŠãä»ã®ããã»ã¹ã«åœ±é¿ãåãŒããªããšããã¡ãªããããããŸããããã«ãããå šäœã®ã·ã¹ãã ã®å®å®æ§ãä¿ã¡ã€ã€ãé害çºçæãçŽ æ©ãå埩ããããšãå¯èœã§ãã
2.4 Erlangã§å®çŸã§ãã䞊ååŠçãšã¯
Dèšèªãšããã°ã䞊è¡åŠçãåŸæãªããã°ã©ãã³ã°èšèªãšããŠç¥ãããŠããŸããããã¯ãè€æ°ã®åœä»€ã®åŠçãäžåºŠã«è¡ãããããå¹ççã«å€§éã®åŠçãè¡ãããšãå¯èœãšãªãããã§ãã
Erlangã§ã¯ãéåžžã«å€ãã®è»œéããã»ã¹ãäœæã»ç®¡çããããšãåºæ¥ãŸããããã«ããã倧éã®ãŠãŒã¶ãŒã倧éã®ããŒã¿ãæ±ãå¿ èŠãããå Žåã§ãããã¹ãŠã®ãŠãŒã¶ãŒãããŒã¿ãåæã«åŠçããããšãåºæ¥ãŸãã
ãã®ãããªErlangã®äžŠè¡åŠçèœåã¯ãäŸãã°ã²ãŒã ãµãŒããŒã®éçºãªã©ã«æŽ»çšãããŠããŸããå€ãã®ãã¬ã€ã€ãŒãåæã«ã¢ã¯ã»ã¹ããã²ãŒã ãµãŒããŒã§ããErlangã®äžŠè¡åŠçèœåã«ããã¹ã ãŒãºãªéçšãå¯èœãšãªããŸãã
3. Erlang ã®åºæ¬æäœãšåºæ¬ææ³
Erlangããã°ã©ãã³ã°ã®åºæ¬ãšãªãæäœãšææ³ã«ã€ããŠè©³ãã解説ããŸããåå¿è ã®æ¹ã§ãç解ããããããã«ãå ·äœçãªãµã³ãã«ã³ãŒããšãšãã«èª¬æããŠåããŸããããã°ã©ãã³ã°èšèªãšããŠã®Erlangã®ç¹æ§ãç解ããããã«ãåºæ¬æäœãšåºæ¬ææ³ã¯éåžžã«éèŠãªéšåã§ãã
3.1 Erlang ã®ããŒã¿åãšå€æ°
Erlangã«ã¯ããŸããŸãªããŒã¿åããããããããç°ãªãæ§è³ªãšçšéãæã£ãŠããŸããæ°å€åãæåååãããŒã«åããªã¹ãåãªã©ãæ§ã ãªããŒã¿åããããŸãããããã®ããŒã¿åãç解ããããšã§ãããè€éã§å¹ççãªããã°ã©ã ãæžãããšãå¯èœã«ãªããŸãã
ãŸããErlangã§ã¯å€æ°ã®æ±ãã«ç¹åŸŽããããŸããErlangã§ã¯äžåºŠå€ãä»£å ¥ããå€æ°ã«å床å€ãä»£å ¥ããããšã¯èš±ãããŠããŸãããããã¯ãä»ã®å€ãã®ããã°ã©ãã³ã°èšèªãšã¯ç°ãªãéšåã§ããããããErlangã®é¢æ°åããã°ã©ãã³ã°ãšããŠã®ç¹æ§ãçãã§ããŸãã
äžèŠèŠèœãšããŠããŸããããªããŒã¿åãå€æ°ã®ç¹æ§ã§ãããããããç解ããããšã§Erlangã®ãšãã»ã³ã¹ãæŽãããšãåºæ¥ãŸãã
3.2 Erlangã®ãªã¹ããšã¿ãã«
Erlangã§ã¯ããªã¹ããšã¿ãã«ãã³ã¬ã¯ã·ã§ã³åããŒã¿ã®äž»èŠãªåœ¢åŒãšãªããŸãããããã¯ããŒã¿ã®éåãäžã€ã®å€æ°ã§æ±ãããããéåžžã«äŸ¿å©ã§ãã
ãªã¹ãã¯0å以äžã®èŠçŽ ãçµã¿åãããŠäœæããããŒã¿åã§ããåèŠçŽ ã¯ä»»æã®ããŒã¿åã§ããããšãå¯èœã§ããããã€èŠçŽ å士ã®ããŒã¿åãç°ãªã£ãŠãæ§ããŸããã
äžæ¹ãã¿ãã«ã¯è€æ°ã®å€ãã²ãšãŸãšãã«ããããŒã¿åã§ããªã¹ããšç°ãªããèŠçŽ ã®è¿œå ãåé€ã¯èš±ãããŠããŸããããããã®ç¹æ§ãç解ããé©åãªå Žé¢ã§æŽ»çšããããšãéèŠã§ãã
3.3 Erlangã®é¢æ°å®çŸ©ãšåŒã³åºã
Erlangã¯é¢æ°åããã°ã©ãã³ã°èšèªã§ãããããé¢æ°ã®å®çŸ©ãšåŒã³åºãã¯å¿ é ã®ç¥èã§ããè€éãªåŠçãåçŽåããã³ãŒãã®åå©çšæ§ãé«ããããã«ããé¢æ°ã®å®çŸ©ãšåŒã³åºãã®ä»æ¹ãç解ããŸãããã
Erlangã§ã¯é¢æ°ã¯ã¢ãžã¥ãŒã«å ã«å®çŸ©ãããã¢ãžã¥ãŒã«åãšé¢æ°åãšåŒæ°ã®çµã¿åããã«ãã£ãŠç¹å®ãããŸããé¢æ°å®çŸ©ã®éã«ã¯ãé¢æ°åãšåŒæ°ã®äžŠã³é ã倧åã§ãããåŒæ°ã®æ°ãåã«ãã£ãŠç°ãªãå®è¡çµæãè¿ãå€éå®çŸ©ãå¯èœã§ãã
äžæ¹ãé¢æ°ãåŒã³åºãéã«ã¯ãã¢ãžã¥ãŒã«å:é¢æ°å(åŒæ°)ã®åœ¢åŒãåããŸããé©åãªåœ¢åŒã§åŒã³åºãããšã§ãå®çŸ©ãããé¢æ°ãå©çšããããšãå¯èœã§ãã
3.4 ã¢ãžã¥ãŒã«ãšã¯
Erlangã§ã¯é¢æ°ãã°ã«ãŒãåããããã®æ çµã¿ãšããŠã¢ãžã¥ãŒã«ãçšããããŸããã¢ãžã¥ãŒã«ã¯ç¹å®ã®æ©èœãåŠçããŸãšãããã®ã§ãä»ã®ã¢ãžã¥ãŒã«ããåŒã³åºããŠå©çšããããšãã§ããŸãã
ã¢ãžã¥ãŒã«ãå®çŸ©ããéã«ã¯ãã¢ãžã¥ãŒã«åãšãã®å éšã«å®çŸ©ããé¢æ°ã®æ å ±ãå¿ èŠã§ããã¢ãžã¥ãŒã«å ã®é¢æ°ã¯ãä»ã®ã¢ãžã¥ãŒã«ããç°¡åã«ã¢ã¯ã»ã¹ã§ããããã«ããšã¯ã¹ããŒãããå¿ èŠããããŸãã
ã¢ãžã¥ãŒã«ã®ä»çµã¿ã掻çšããããšã§ãã³ãŒãã®åå©çšæ§ãåäžãã倧èŠæš¡ãªããã°ã©ã ã§ã管çãããããªããŸãã
4. Erlangã§åæ£ã·ã¹ãã ãæ§ç¯ããæ¹æ³
ããã°ã©ãã³ã°èšèªErlangã¯ãäžè¬çã«éä¿¡ã·ã¹ãã ãåæ£ã·ã¹ãã ã®éçºã«åŒ·ããšãããŠããŸãããã®é ç®ã§ã¯ãErlangãçšããåæ£ã·ã¹ãã æ§ç¯ã«ã€ããŠçŽ¹ä»ããŸãã
ãŸãã¯ãåæ£ã·ã¹ãã ã®åºæ¬ãšãã®å©ç¹ããããŠErlangãçšããèšèšæ¹æ³ãããã»ã¹ééä¿¡æ¹æ³ãèé害æ§ã®èšèšã«ã€ããŠè§£èª¬ããŸãã
ãã®é ç®ãéããŠãErlangã®åæ£ã·ã¹ãã ã«å¯Ÿãã匷åãªèšèšã»éçºåãç解ããæå¹æŽ»çšã§ããããã«ãªããŸãããã
4.1 åæ£ã·ã¹ãã ã®åºæ¬ãšãã®å©ç¹
åæ£ã·ã¹ãã ãšã¯ãè€æ°ã®ããŒãããããã¯ãŒã¯ãä»ããŠé£æºããçµ±åçãªæ©èœãæäŸããã·ã¹ãã ãæããŸããããããã®ããŒãã¯èªèº«ã®ã¿ã¹ã¯ãåŠçãã€ã€ãä»ã®ããŒããšå調ããŠå šäœã®åœ¹å²ãæãããŸãã
Erlangãæã€åæ£åŠçã®èœåã¯ããã®ãããªåæ£ã·ã¹ãã èšèšã«åŒ·åãªããŒã«ãšãªããŸããErlangã®åæ£æ©èœãçšãããšãåã ã®ããã»ã¹ãç¬ç«ãããããããã䞊åã«åäœããããšãå¯èœã§ãã
åæ£ã·ã¹ãã ã®å©ç¹ã¯ã倧éã®ããŒã¿ãé«éã«åŠçã§ããç¹ããããŒã«ã«ãªãœãŒã¹ãå¹ççã«å©çšã§ããç¹ã«ãããŸãããŸããäžéšã®ããŒããæ éãããšããŠãã·ã¹ãã å šäœã®éçšã«åœ±é¿ããªããšããèé害æ§ãéèŠãªå©ç¹ã§ãã
4.2 Erlangã«ããåæ£ã·ã¹ãã ã®èšèšæ¹æ³
Erlangã§ã¯ãããã»ã¹ãç«ã¡äžããããããäºãã«éä¿¡ãããããšã§åæ£ã·ã¹ãã ãæ§ç¯ã§ããŸããããã¯ãErlangã®ããã»ã¹ééä¿¡èœåã«ãã£ãŠå¯èœãšãªããŸãã
åæ£ã·ã¹ãã ãèšèšããéã«ã¯ãã·ã¹ãã ãæ§æããåããã»ã¹ãã©ã®ããã«éä¿¡ãè¡ããã決å®ããŸããErlangã§ã¯ã!æŒç®åã䜿ã£ãŠã¡ãã»ãŒãžã®éåä¿¡ãè¡ããŸãã
Erlangã§ã®åæ£ã·ã¹ãã èšèšã¯ãããŒããããã»ã¹ãã¡ãã»ãŒãžã®äžã€ã®èŠçŽ ã«çç®ããŸããããŒãã¯ã·ã¹ãã ã®åã ã®èŠçŽ ãããã»ã¹ã¯ããŒãäžã®å®è¡åäœãã¡ãã»ãŒãžã¯ããã»ã¹éã§ã®ããŒã¿ãåœä»€ã®éåä¿¡ãæ åœããŸãã
4.3 Erlangã§ã®ããã»ã¹ééä¿¡ã®æ¹æ³
ããã»ã¹ééä¿¡ã¯åæ£ã·ã¹ãã ã«ãããŠéèŠãªèŠçŽ ã§ãããErlangã¯ãã®èšèšææ³ã«ããã»ã¹ééä¿¡ãäœçœ®ä»ããŠããŸãã
Erlangã®ããã»ã¹ã¯ãéåæã¡ãã»ãŒãžã³ã°ã¢ãã«ãæ¡çšããŠããŸããããã«ãããåããã»ã¹ã¯èªåŸçã«åäœããå¿ èŠã«å¿ããŠä»ã®ããã»ã¹ãšéä¿¡ããŸããåããã»ã¹ã¯èªå·±ã®ã¡ãã»ãŒãžãã¥ãŒãæã¡ãä»ã®ããã»ã¹ããéãããŠããã¡ãã»ãŒãžãé 次åŠçããŸãããã¥ãŒã®å é ã®ã¡ãã»ãŒãžããåŠçãã次ã®ã¡ãã»ãŒãžãžãšé²ãããšã§ãåããã»ã¹ã¯èªå·±ã®ã¿ã¹ã¯ãå®äºããŸãã
ãã®æ¹åŒã¯ãé«åºŠãªäžŠååŠçãšèé害æ§ãErlangã®åæ£ã·ã¹ãã ã«æäŸããŸããäŸãã°ãäžã€ã®ããã»ã¹ãåæ¢ãããšããŠããä»ã®ããã»ã¹ã¯ããã«åœ±é¿ãããããšãªãèªå·±ã®ã¿ã¹ã¯ãç¶è¡ã§ããŸãã
4.4 Erlangã§ã®èé害èšèšã®ãã€ã³ã
åæ£ã·ã¹ãã èšèšã«ãããŠãèé害æ§ã¯å¿ é ã®èŠçŽ ã§ããErlangã®ããã°ã©ãã³ã°èšèªãšããŠã®ç¹åŸŽã®äžã€ã¯ãã·ã¹ãã é害ã«åŒ·ãæ§é ãæã€ããšã§ãã
Erlangã¯ãããã»ã¹ãç°åžžçµäºããå Žåã§ãã·ã¹ãã å šäœã®éçšã«åœ±é¿ãäžããªãããã«ããããšãå¯èœã§ããããã¯ãErlangã®ããã»ã¹ã軜éã§ç¬ç«ããŠãããããäžéšã®ããã»ã¹ã倱æããŠãä»ã®ããã»ã¹ã«ã¯åœ±é¿ãåã°ãªãããã§ãã
ããã«ãããã»ã¹ç£èŠæ©èœãå©çšããããšã§ããããµããäºæ ã«å¯Ÿãè¿ éã«ã¬ã¹ãã³ã¹ããèªå·±ä¿®åŸ©ãåèµ·åãªã©ã®æªçœ®ããšãããšãã§ããŸãããã®ããã«ãErlangã¯ç¬ç¹ãªæ¹æ³ã§ã·ã¹ãã ã®èé害æ§ãå®çŸãã匷åãªããã°ã©ãã³ã°èšèªã§ãã
5. Erlang åãã®éçºããŒã«ãšãã®å©çšæ¹æ³
Erlangã䜿ã£ãŠéçºãè¡ãããã«ã¯ããã®åãæ±ãæ¹ãç解ããé©åãªéçºç°å¢ãæ§ç¯ããããšãäžå¯æ¬ ã§ãããŸããErlangç¹æã®ãããã°ãã¯ããã¯ãããã©ãŒãã³ã¹ãã¥ãŒãã³ã°ã®æ¹æ³ã«ã€ããŠãç解ããŠããããšã§ãErlangãå¹æçã«æŽ»çšããããšãã§ããŸãã
ãã®ç« ã§ã¯ãErlangåãã®éçºããŒã«ããã³ãã®å©çšæ¹æ³ã«ã€ããŠè©³ãã説æããŸãããããèªã¿é²ããããšã§ãErlangãããæ·±ãç解ãããã®å šæ©èœã掻çšããããšãã§ããããã«ãªããŸãã
5.1 Erlangã«ãããéçºç°å¢ã®æ§ç¯æ¹æ³
Erlangã®éçºç°å¢æ§ç¯ã¯ãäž»ã«Windowsã»Macã»Linux/Unixã®ïŒã€ã®ç°å¢ã«åããããŸããã€ã³ã¹ããŒã«æ¹æ³ã¯åç°å¢æ¯ã«ç°ãªããããããããã«ã€ããŠèªå·±ã®ç°å¢ã«é©ãããã®ãéžæããŠãã ããã
å ·äœçãªã€ã³ã¹ããŒã«æ¹æ³ã«ã€ããŠã¯ãErlangã®å ¬åŒãµã€ãã詳ããæ¡å ãããŠããããããã¡ãã確èªããããšã匷ãæšå¥šããŸããå ¬åŒãµã€ãã§ã¯ããŠãŒã¶ã®åé¡ãäžæç¹ã«å¯ŸããŠãæè»ãªå¯Ÿå¿ãè¡ã£ãŠããŸãã
éçºç°å¢ãæŽã次第ã次ã®ã¹ããããšããŠãåºæ¬çãªæäœæ¹æ³ãã¢ãžã¥ãŒã«ã®äœææ¹æ³ã«ã€ããŠåŠã¶ããšãéèŠã§ããããã«ãããErlangã®æ©èœãããçŽæçã«ç解ããå¹ççã«æŽ»çšããããšãã§ããŸãã
5.2 Erlangã§ã®ãããã°ãã¯ããã¯
ãããã°ã¯ããã°ã©ãã³ã°ã«ãããŠå¿ èŠäžå¯æ¬ ãªã¹ãã«ã§ããErlangã§ã¯ãé¢æ°ã®è¿ãå€ãå€æ°ã®å€ãã¢ãã¿ãŒããããšã«ãã£ãŠããšã©ãŒã®åå ãèŠã€ãåºãããšãå¯èœã§ãã
ãŸããErlangã®ãããã°ãã¯ããã¯ãšããŠãè€æ°ã®ããã»ã¹ãåæã«ãããã°ã§ãã匷åãªããŒã«ãå©çšããããšãã§ããŸãã
å ·äœçãªãããã°ã®æé ãªã©ã¯ãå ¬åŒããã¥ã¡ã³ããŒã·ã§ã³ã«è©³ãã解説ããããŸãã®ã§ããã¡ããåç §ããããšã匷ãæšå¥šããŸãã
5.3 ãã¹ãé§åéçº(TDD)ãErlangã§è¡ãæ¹æ³
ãã¹ãé§åéçº(TDD)ã¯ãããã°ã©ã ã®å質ãç¶æããªããéçºãé²ããææ³ã§ãErlangéçºã«ãæå¹ã«æŽ»çšã§ããŸãã
Erlangã§ã¯ããŸãæåã«å€±æãããã¹ãã³ãŒããæžããšããããéå§ããŸãããã®åŸããã®ãã¹ããééããæå°éã®ã³ãŒããæžããå床ãã¹ããå®è¡ããŸãããããç¹°ãè¿ãããšã§ãåŸã ã«ãœãããŠã§ã¢ãæ§ç¯ããŠãããŸãã
ãã®æ¹æ³ã«ããã
5.4 Erlangã§ã®ããã©ãŒãã³ã¹ãã¥ãŒãã³ã°ã®åºæ¬
Erlangã¯åæ£ã·ã¹ãã ãéä¿¡ã·ã¹ãã ã®éçºã«é©ããèšèªã§ãããé©åãªããã©ãŒãã³ã¹ãã¥ãŒãã³ã°ãè¡ããªããã°ããã®å šæ©èœãçºæ®ããããšã¯é£ããã§ãã
ããã©ãŒãã³ã¹ãã¥ãŒãã³ã°ã¯ãåºæ¬çã«ã¯ããã°ã©ã ãå¹çè¯ãåäœãããããã®ææ³ã§ããErlangã§ã®ããã©ãŒãã³ã¹ãã¥ãŒãã³ã°ã¯ãäŸãã°ãããã»ã¹ã®ç®¡çæ¹æ³ã®æ¹åããé¢æ°ã®åŒã³åºãæ¹ã®æé©åãªã©ãããŸããŸãªã¢ãããŒãããããŸãã
詳ããææ³ãã¢ãããŒãã«ã€ããŠã¯ãErlangã®å ¬åŒããã¥ã¡ã³ããŒã·ã§ã³ã詳ãã解説ããŠããŸãã®ã§ããã¡ããåç §ããŠãã ããã
6. Erlangãšä»ããã°ã©ãã³ã°èšèªãšã®æ¯èŒ
ããã°ã©ãã³ã°ãåŠã¶è ã«ãšã£ãŠåœ¹ç«ã€ããšã®äžã€ããç°ãªãããã°ã©ãã³ã°èšèªã®æ¯èŒã§ããããã§ã¯ãErlangãšä»ã®èšèªãæ¯èŒããããšã§ãErlangã®ç¹åŸŽãšãããã©ã®ããã«ä»ã®èšèªãšç°ãªãã®ããæ確ã«ããŸãã
ç¡è«ããã¹ãŠã®ããã°ã©ãã³ã°èšèªã«ã¯ç¬ç¹ã®å©ç¹ãšäžå©ç¹ãããããããããç¹å®ã®ã¿ã¹ã¯ãç¶æ³ã«é©ããŠããŸããããæ·±ãæŽå¯ãåŸããããäžéšã®äººæ°ã®é«ãããã°ã©ãã³ã°èšèªãPythonãšJavaããŸãé¢æ°åããã°ã©ã èšèªã§ããElixirãšErlangãšã®æ¯èŒãèŠãŠãããŸãããã
6.1 ErlangãšPythonã®æ¯èŒ
ErlangãšPythonã®æ倧ã®éãã¯ãPythonãç©ççã«ãã³ã·ã§ã³åã®èšèªãã¶ã€ã³ãæ¡çšããŠããã®ã«å¯ŸããErlangãæ確ã«é¢æ°åã§ããç¹ã§ããããã¯ãErlangã倧èŠæš¡ãªäžŠè¡åŠçãšåæ£ã·ã¹ãã ãæ±ãããã«èšèšãããŠããããã§ãã
Pythonã¯åå¿è ã«ãšã£ãŠèŠªãã¿ãããæ§æãšåºç¯ãªã©ã€ãã©ãªãæäŸããWebéçºãããŒã¿ãµã€ãšã³ã¹ãAIéçºãªã©åºãç¯å²ã®å¿çšåéã§äœ¿ãããŸããäžæ¹ãErlangã®åŒ·ã¿ã¯é«åºŠã«äžŠåãªã·ã¹ãã ãšå¹ççãªåæ£åŠçãå¯èœã«ããããšã§ãã
ããã©ãŒãã³ã¹ã®èŠ³ç¹ããèŠããšãErlangã¯å€§éã®éåæã¿ã¹ã¯ãå¹çããæ±ãããšãã§ããŸãããPythonã¯äžéšã®åŠçã«ãããŠã¯Erlangãããé ãå¯èœæ§ããããŸãã
6.2 ErlangãšJavaã®æ¯èŒ
ErlangãšJavaã®éã®äž»ãªéãã¯ãErlangãäºå®äžç¡å¶éã®äžŠè¡ããã»ã¹ãæ±ãèœåãæã¡ãããããã®ããã»ã¹ãç¬èªã®ã¡ã¢ãªç©ºéãæã€ã®ã«å¯ŸããJavaã¹ã¬ããéã§ã¡ã¢ãªãå ±æããããšã§ãã
Javaã¯ãŸããErlangã®ç±å¿ãªæ¯æè ãé »ç¹ã«ææãã”Javaã®ããŒã”ãšããåé¡ã«çŽé¢ããŸããããã¯ãã¬ããŒãžã³ã¬ã¯ã·ã§ã³ãé²è¡ããéã«ã¢ããªã±ãŒã·ã§ã³ã®ããã©ãŒãã³ã¹ãäœäžããå¯èœæ§ããããšããåé¡ã§ããErlangã®ã¬ããŒãžã³ã¬ã¯ã¿ã¯åããã»ã¹ããšã«åå¥ã«è¡åããããããã®åé¡ãé¿ããããšãã§ããŸãã
ããã§ããªããJavaã¯ã¯ãã¹ãã©ãããã©ãŒã äºææ§ãšéåžžã«å€§èŠæš¡ãªãšã³ã·ã¹ãã ãèªããå€æ°ã®äŒæ¥ã§å¹ åºãå©çšãããŠããŸãã
6.3 ErlangãšElixirã®æ¯èŒãšçžäºéçšæ§
Elixrã¯ãErlangãšåãBEAMïŒErlangä»®æ³ãã·ã³ïŒäžã§åäœãããã®ããErlangãé·ãæŽå²ã§å¹ã£ãå ç¢æ§ãšé«åºŠãªåæ£ã·ã¹ãã ã®æ©èœãåãå ¥ããŠããŸãã
ãã®äžæ¹ã§ãElixirã¯Pythonã®ãããªã¢ãã³ã§èªã¿ãããã·ã³ã¿ãã¯ã¹ãæ¡çšããŠããããŸã匷åãªã¡ã¿ããã°ã©ãã³ã°æ©èœãåããŠããŸããããã«ãããElixirã¯Erlangã®åŒ·åºŠãä¿ã¡ã€ã€ãããæ±ããããéçºç°å¢ãæäŸããŠããŸãã
ãŸããElixirã¯ErlangãšçŽæ¥çžäºéçšãå¯èœã§ãErlangã®ã©ã€ãã©ãªããã¬ãŒã ã¯ãŒã¯ãElixirããçŽæ¥äœ¿çšããããšãã§ããŸãã
6.4 Erlangãšãã®ä»é¢æ°åããã°ã©ã èšèªãšã®æ¯èŒ
äžè¬çã«ãErlangã¯éåžžã«é«åºŠãªäžŠååŠçãšåæ£åŠçã®èœåãæã€ããšã§ç¥ãããŠããŸãããä»ã®é¢æ°åããã°ã©ã èšèªãšæ¯ã¹ããšãã®æ§æã¯ããå€é¢šãªé¢ããããŸãã
ä»ã®é¢æ°åèšèªãäŸãã°HaskellãScalaã¯ãããã¢ãã³ãªæ§æãšäžè¬çãªããã°ã©ãã³ã°ã¿ã¹ã¯ã«å¯Ÿããåºç¯ãªæ©èœãæã£ãŠããŸããããã®äžæ¹ã§Erlangã®æã€é«åºŠãªåæ£ã·ã¹ãã ã®å®è£ ã»ã©ã«ã¯èª¿æŽãããŠããŸããã
ããããã®èšèªã«ã¯ç¹å®ã®çšéç¯å²ãšåãäžåãããããŸãããèŠæ±ããã·ã¹ãã ã®ããã©ãŒãã³ã¹ãšäœ¿çšäžã®å¿«é©ããç §ããåãããªãããæé©ãªããã°ã©ãã³ã°èšèªãéžæããããšãéèŠã§ãã