ã¯ã©ã€ã¢ã³ãã§å®éã«äœãèµ·ããã®ã§ããããïŒ
ãã©ãŠã¶ã§ã¯ãéçºè ã¯ãã§ã«æ¬æ Œçãªãéåžžã®ãMVCã¢ããªã±ãŒã·ã§ã³ãæ§ç¯ããŠããŸãã MVCã¢ãŒããã¯ãã£èªäœã¯ïŒ1970幎代ããïŒæ°ãããã®ã§ã¯ãããŸããããGoogle Mailãšãšãã«10幎åã«ãŠã§ãã«ç»å ŽããŸããã ãããããã®ã¯ãGMailãããžã§ã¯ããæåã¯ãªã¿ã¯ã®è¿·ããšããŠèªèãããŠããããšã§ãããã©ãªãŒãã€ãžãèšã£ãããã«ã ãéåžžã®ãŠãŒã¶ãŒã¯10幎åŸã«ã¯ç§ãã¡ã®ããã«èŠããã§ãããã ã ãŸããããã¯æ©èœããGMailã¯ãã¹ãŠã䜿çšããããã«ãªããŸããã
HTML5ã®åºçŸã«ããããã©ãŠã¶ã«ã¯ãã§ã«ç¬èªã®ããŒã¿ãŠã§ã¢ããŠã¹ïŒ2ã€ãïŒãJavaScriptã®ç¬èªã®ããžãã¹ããžãã¯ãããã³ãµãŒããŒãžã®æ°žç¶çãªæ¥ç¶ããããŸãã çŸåšãéçºè ã¯ãããŒã«ã«ã¢ããªã±ãŒã·ã§ã³ã®å¯çšæ§ãšå³æå¿çãããã³Webã¢ããªã±ãŒã·ã§ã³ã®äžå®ã®ããªã³ã©ã€ã³ã¢ãŒãããšãã2ã€ã®äžçã®å©ç¹ãçµã¿åãããããšããŠããŸãã
äžå¿«æã®äž»ãªåå ã¯ãµãŒããŒãªã¯ãšã¹ãã§ãã ããã¯ç¹ã«ã¢ãã€ã«ããã€ã¹ã§æããããŸãã ç®èãªããšã«ãç¡ç·ã€ã³ã¿ãŒãããã¯ãæãå¿ èŠãªãšãã«ã¯ã©ãã·ã¥ããŸã-éè·¯ïŒå°äžéïŒãå ¬å ±ã®ã€ãã³ããããã³éå€ã§ã èªå® ã§ãä»äºå Žã§ãã圌ã¯ã¹ã ãŒãºã«èµ°ããŸããããããšãã ãããŠãããã§ãåãYandexã®ãªãã£ã¹ã§ã¯ãWiFiã¯å®ç§ã§ã¯ãããŸãããæããã«ã1å¹³æ¹ã¡ãŒãã«ãããã®ã®ãŒã¯ãéäžããŠããããã§ãã FOSDEMã®ãããªäŒè°ã§ã¯ãWiFiã¯æ©èœããŸããã§ããã
LTEã䜿çšãããšãåé¡ã¯ãªããªããšæããããããŸããã ã»ãšãã©ãªãã ã¹ã«ãŒããããã¹ãã¬ãŒãžå®¹éããããå¯åºŠã¯ææ°é¢æ°çã«å¢å ããŠãããRTTïŒãµãŒããŒå¿çæéïŒãšCPUåšæ³¢æ°ã¯éå»10幎éã§ã»ãšãã©æ¹åãããŠããŸããã ã¢ãã€ã«ãããã¯ãŒã¯ã®å Žåãç©çåŠãšã¯ãäœçŸäžãã³ãã®ã³ã³ã¯ãªãŒããéçã岩ãããã³ã©ãã«ãè¡ããªãé»æ³¢ã¹ãã¯ãã«ã®ç¹æ§ãæå³ããŸãã ããŒã¿ãã£ãã·ã¥ãšããã¯ã°ã©ãŠã³ãåæãåãGMailã§ä¿åããå šå¡ã®åã«é 眮ããŸãã Dropboxããã®ç¹ã§æºè¶³ããŠããŸãããEvernoteã¯ããŸãæºè¶³ããŠããŸãããåæã®å€±æãããŒã¿æ倱ã«é¢ããèŠæ ããã£ã±ãã§ãã
ããã«ã€ããŠèããŠã¿ãŸãããã ããå€ãã®ããŒã¿ãšããžãã¯ãã¯ã©ã€ã¢ã³ãã«ç§»è¡ããŠããŸãã WebStorageãCoreDataãIndexedDBã ããå€ãã®ããŒã¿ãã¯ã©ã€ã¢ã³ãäžã®ããå€ãã®ã¹ããŒã¹ãããããµãŒããŒãžã®ãžã§ã®ã³ã°ã¯ç°¡åã«ãªããŸããã ããŒã¿ã®ããŠã³ããŒãã¯ç°¡åã§ããã£ãã·ã¥ã¯ããã«ç°¡åã§ãããã±ããç§åŠã¯åæããå§ãŸããŸãã 倱æããã¢ãã€ã«ã¯ã空ã®ããŒã¿ããµãŒããŒã«ãä¿åãããŸã-ãã£ãšãçŽå€±ããŠãŒã¶ãŒã¯äžæºã§ãã ããŒã¿ã¯è€æ°ã®ããã€ã¹ã§äžåºŠã«å€æŽãããŸã-ãã£ãšã競åããŠãŒã¶ãŒãæ¯ã磚ããŸãã ãããŠããã®ãããªãã£ãšãããšã©ããããã«ãªããã ã¯ã©ã€ã¢ã³ãã®æ°ããæ¡ä»¶ã¯ããã§ã«ã倧èŠæš¡ãã·ã¹ãã ã®æ¡ä»¶ãé£æ³ãããŸã-å€ãã®æ©åšãå€ãã®ããŒã¿è€è£œããã¹ãŠãåžžã«æ éããããã¯æ£åžžã§ãã ã¯ã©ã€ã¢ã³ãã¯ããã«ãããã°ããŒã€ãã®æŠåšåº«ã®ããŒã«ãå¿ èŠãšããããã§ãã
ãããŠãå®éã«ãµãŒããŒäžã§äœãèµ·ãããŸããïŒ
ãµãŒããŒäžã§ããã¹ãŠãç°¡åãã€è«ççã«éå§ããããšããã©ãã«ã®åå ã¯ãããŸããã§ããã çå®ã®1ã€ã®ãœãŒã¹ããããŸãã-ããŒã¿ããŒã¹ïŒããšãã°ãMySQLïŒãããžãã¯ïŒããšãã°ãPHPïŒãåãã1ã€ã®ãµãŒããŒããããã¯ã©ã€ã¢ã³ãã¯ãã©ãããã¥ãŒãåãåããHTTP GETãªã¯ãšã¹ããä»ããŠãµãŒããŒäžã®ããžãã¯ãåŒãåºããŸããã æåã¯ãã¹ããŒãã¬ã¹ãµãŒããŒã®å¢å ãéããŠã誰ããåçŽã«è«çã¹ã±ãŒãªã³ã°ãèšé²ããŸããã ããŒã¿ããŒã¹ã¯åŸã ã«ã¬ããªã±ãŒã·ã§ã³ïŒãã¹ã¿ãŒã¹ã¬ãŒãïŒãå¿ èŠãšãå§ãããã£ãã·ã¥ïŒMemcacheïŒã§ããŒã¿ããŒã¹ãä¿è·ããããã·ã£ãŒãè¿œå ããŠã€ãã³ãããªã¢ã«ã¿ã€ã ã§ã¯ã©ã€ã¢ã³ãã«éä¿¡ããå¿ èŠããããŸããã ãã®åŸãç¶æ³ã¯ããã«è€éã«ãªãå§ããŸããã Hadoopã¯ã©ããã«ãã©ããã«NoSQLã«ãã©ããã«ã°ã©ãããŒã¿ããŒã¹ã«ãã蟌ãŸããŸãããå€ãã®ã¹ãã¬ãŒãžããããŸããã ãŸããåæãæ€çŽ¢ãéµéãªã©ããã¹ãŠãå°éãµãŒãã¹ã§å€§ãããªããããŠããŸããã
ç¹æ®ãªã·ã¹ãã ã®ãã®æ¥éãªä¹ç®ããããŒã¿åæã®åé¡ãåŒãèµ·ãããŸããã ãåç©åãã®æãæåãããœãªã¥ãŒã·ã§ã³ãšããŠãå€ãã®äººãApache Kafkaã«èšåããŠããŸãã ãã®ãããªã¢ãŒããã¯ãã£ã§ã¯ãããã¹ããä»ããŠã€ãã³ãã亀æããããšã奜ãç°ãªãã·ã¹ãã ã«ç°ãªãããŒã¿ã¹ã©ã€ã¹ãä¿åãããŸãã å®éãNåã®ã·ã¹ãã ãçµ±åããå ŽåãOïŒN * NïŒã¢ããã¿ãŒãŸãã¯1ã€ã®å ±éã€ãã³ããã¥ãŒã®ãããããäœæã§ããŸãã N = 2..3ã§ã¯ããã®ãã¥ã¢ã³ã¹ã¯ãŸã ããŸãç®ç«ã¡ãŸããããLinkedInã§ã¯æããã«Nã¯çŽ æŽãããã§ãã
ãããŠä»ã2ã€ã®ãã°ãã®åžãæ®»ãåæã«ã ãµãŒããŒãšã¯ã©ã€ã¢ã³ãåŽã®äž¡æ¹ã§ãã·ã¹ãã å ã®åãããŒã¿ã®ã¬ããªã«ã®æ°ãæ³åããŠãã ããã MongoDB + Redis + Hadoop + WebStorage + CoreDataãšããŸãããã ããããã¹ãŠæèœã«åæããæ¹æ³ã¯ïŒ
ãããŠãããã¯ãã¹ãŠäœã«ã€ãªãããŸããïŒ
ã§ã¯ãä»åŸã®ãã¬ã³ãã¯ã©ããªãã®ã§ããããïŒ èª°ã確ãã«èšãããšã¯ãããŸããããäœãæ¢ãã¹ãããç¥ãããšãã§ããŸãã å®éãæ°ããã¢ã€ãã¢ã¯éåžžã«ãã£ãããšåºçŸããéåžžã«ãŸãã§ãã ããšãã°ãMongoDBã¯oplogçµç±ã®ãã¹ã¿ãŒã¹ã¬ãŒãã¬ããªã±ãŒã·ã§ã³ã䜿çšããŸããããã¯ãå¢åæ¹åã®ã¿ãbinlogçµç±ã®MySQLã¬ããªã±ãŒã·ã§ã³ãšç°ãªããã¬ã¹ãªãŒã©ã³ããŒãã«ãã1979幎ãã1984幎ãŸã§ã®ã¹ããŒããã·ã³ã¬ããªã±ãŒã·ã§ã³ã®äœæ¥ã«åºã¥ããŠããŸãã
NoSQLã·ã¹ãã -RiakãVoldemortãCassandraãCouchDBã¯ãéèŠãªäžæ©ãèžã¿åºããæçµçãªäžè²«æ§ãå æé¢ä¿ãè«çã¯ããã¯ããã¯ãã«ã¯ããã¯ããäœããçµã蟌ãããšããŸã-ãããã®ã¢ãããŒãã¯ã80幎代åŸåã®åãL.ã©ã³ããŒããšC.ãã£ãŒãžã®äœåã«é¡ããŸãã
Google WaveãšDocsã®è¶ 倧åã®æäœå€æåæç·šéæè¡ã¯ã1989幎ã«CA EllisãšSJ Gibbsã«ãã£ãŠæåã«èšè¿°ãããçŸåšã¯å»æ¢ãããŠããŸãã
æ°é®®ãªã ãã§ã¯ååã§ã¯ãããŸããããåºããããŸãã NoSQLãã³ããŒã«ããCRDTããŒã¿æ§é ã§æ°Žãè©Šãè©Šã¿ã¯ã2000幎代åŸåã®çè«ã«åºã¥ããŠããŸã-éåžžã«å žåçãªæ°å ¥çã§ãã
ããã§ã¯ãæ°ããç°å¢ã§æé·ãããã®ã«ã€ããŠèããŠã¿ãŸãããã æ°ãããã¬ã³ãã¯ãçãåã§ãã§ã«åºãç¥ãããŠãããã®ã«ãã£ãŠå¿ ç¶çã«æ±ºå®ãããŸãã äž»ãªå®¹çè ã¯3人ã§ãã
å ±éãã¹ããã³ã€ãã³ãæå
æåã®æãææãªãã¬ã³ãã¯ãã€ãã³ããœãŒã·ã³ã°ãšåæ§ã«ãã€ãã³ãæåã®ãªã¢ã¯ãã£ãã¢ãŒããã¯ãã£ã§ãã ãããã®ã¢ãããŒãã§ã¯ãã·ã¹ãã ã§ã®äœæ¥ã¯çŸåšã®ç¶æ èªäœã ãã§ãªãããæåã®ã«ããŽãªãã®ãªããžã§ã¯ãã§ãããããå€æŽããæäœã§ãè¡ãããŸãããããã¯ç¶æ ãšã¯å¥ã«åŠçã転éãä¿åãããŸãã ã«ãã«ãšç§ããã§ã«èšåããäžè¬çãªã€ãã³ããã¹ã èããŠã¿ããšãã¯ã©ã€ã¢ã³ãåŽã®äœæ¥ã®ããžãã¯ã¯ã€ãã³ãæåã§ãã ããã«ã€ãã³ãæåã®ããžãã¹ããžãã¯ãè¿œå ãããšãèå³æ·±ãããºã«ãçµã¿ç«ãŠããå§ããŸãã
ç¹ã«ãã€ãã³ãæåã®ã¢ãããŒãã¯ãACIDãã©ã³ã¶ã¯ã·ã§ã³ãžã®äŸåãæžãããŸãã ãã©ã³ã¶ã¯ã·ã§ã³ã®äž»ãªè«ç¹ã¯ããéãæ°ãããšã©ããªããŸããïŒãã§ããç®èãªããšã«ãå®éã«å€§ããªãéãæ°ããéèæ¥çèªäœã§ã¯ãSQLããã©ã³ã¶ã¯ã·ã§ã³ã§çºæãããåã¯ãäœå幎ãã®éå®å šã«å·éã§ããã äžäžã«åœ¢ãå€ãã圢ã§ã®åå®ãšæ®é«ã®ç°¿èšã¯ãã€ãã³ããœãŒã·ã³ã°ã®å žåçãªäŸã§ããæäœã¯å·ã§èšé²ãåæžãåéãããŸãã å€ä»£ã®ãã¯ã©éèœã·ã¹ãã ã§ãåãããšãããããŸãã ACIDãªããçŽç²ãªçµææŽåæ§ã ããšãã°ãã¹ãã€ã³åžåœã®çºå±ããéèã·ã¹ãã ã«ã€ããŠæžãããæ¬ã¯ã100幎ã«ããã£ãŠä¿¡çšã§æŠã£ãŠããŸããã éŠéœããåšèŸºã®å°æ¹ãžã®æçŽã¯äžå¹Žæ¯ãåããã ãããŠäœããç©è³ã¯é éããããè»éã¯æŠãããã©ã³ã¹ã¯äœäžããã ããããç§ã®ããžãã¹ããŒãããŒã¯ãã³ã³ãã¥ãŒã¿ãŒãåçµãããŠãããããæè¿3åçšå眲ã«è¡ããŸããã
æ å ±äžå¿ã®ã¢ãŒããã¯ãã£
2ã€ç®ã¯ãæ å ±äžå¿ã®ã¢ãŒããã¯ãã£ã§ãã ããŒã¿ãä»»æã®å Žæã«ä¿åãããèªç±ã«æµããå Žåãã¹ãã¬ãŒãžæ¥ç¶å Žæã®ããžãã¯ã§ã¯ãªããåžžã«ããŒã¿ããèžãã¢ããªã±ãŒã·ã§ã³ãå®è£ ããããšã¯çã«ããªã£ãŠããŸãã æ å ±äžå¿åãããã¯ãŒã¯ã®æŽå²çãªäŸ-USENETããã³BitTorrent; æåã¯ãã¡ãã»ãŒãžã¯ã°ã«ãŒãåãšç¬èªã®IDã«ãã£ãŠèå¥ããããµãŒããŒéãèªç±ã«æµããŸãã 2çªç®ã®æ¹æ³ã§ã¯ãããŒã¿ã¯äžè¬ã«ããã·ã¥ã«ãã£ãŠèå¥ãããåå è ã¯äºãã«æçãªããŒã¿ã亀æããŸãã äžè¬ååïŒããŒã¿ã確å®ã«èå¥ããåå è ãšãã®ãããã¯ãŒã¯ããããžãæ§ç¯ããŸãã ããã¯ãåå è ãä¿¡é Œã§ãããåžžã«åºå ¥ãããå Žåã«ç¹ã«éèŠã§ããããã¯ãã¢ãã€ã«ã¯ã©ã€ã¢ã³ãã«ãšã£ãŠéåžžã«éèŠã§ãã
çŽ5幎åãã€ã³ã¿ãŒãããã®æ å ±äžå¿æ§ã«é¢ããèå³æ·±ãæèŠäº€æããããŸããã TCPã®ãã€ãªãã¢ã§ããVan Jacobsonã¯ãæ¢åã®ã¢ãŒããã¯ãã£ã¯ã¹ã±ãŒã©ããªãã£ã®éçã«éããæ å ±äžå¿ã®ã€ã³ã¿ãŒãããããŒãããèšèšããå¿ èŠããããšäž»åŒµããŠããŸãã Ion Stoicaãæãåºãããšãã§ããå¥ã®åå è ã°ã«ãŒãã¯ãäžè¬çã«HTTPãæ代é ãã§ãããšããç«å Žãäžè¬çã«ä¿æããŠããŸããããHTTPã®CDNã€ã³ãã©ã¹ãã©ã¯ãã£ã調æŽããããšã«ãããURLããµãŒããŒãã¡ã€ã«ãã¹ã§ã¯ãªãæ å ±ã®åãªãèå¥åãšããŠç解ã§ããŸãã ãããã£ãŠãHTTP + CDNããã¬ããã¯ãHTTPã§ã®éçã®æ¡æ£ã«é¢ãããã¹ãŠã®å·®ãè¿«ã£ãåé¡ã解決ããããã«å¿ èŠãªçšåºŠãŸã§æ å ±äžå¿ã«ããããšãã§ããŸãã ãããŠããããããç·ã¯ã»ãšãã©æ£ããã£ãã
èå³æ·±ã質åã¯ãé¡æšã«ãããæåããã¢ãŒããã¯ãã£ãåèšèšããããšãªããWebã¢ããªã±ãŒã·ã§ã³ã®ããŒã¿ã®æ å ±äžå¿æ§ããã£ããã£ã§ãããã©ããã§ãã
CRDTã¿ã€ã
ãããŠãç§ãæ°å ¥çãšããŠãã§ã«èšåãã3çªç®ã®èå³æ·±ãåŸåã¯ãCRDTïŒConflict-free Replicated Data TypesïŒã§ãã 圌ãã¯ãã§ã«ãé«è² è·ã®NoSQLã·ã¹ãã ã«ãããããã蟌ã¿å§ããŠããŸãïŒCassandraãšRiakã«ã€ããŠã¯ç¢ºãã«ç¥ã£ãŠããŸãããä»ã®èª°ããããã ã£ãããã§ãïŒã CRDTã®äž»ãªèãæ¹ã¯ãã·ã¹ãã å ã®ãã¹ãŠã®æäœã®ç·åœ¢åãæŸæ£ãïŒããã¯MySQLãã¬ããªã±ãŒã·ã§ã³ã«äœ¿çšããã¢ãããŒãã§ãïŒãè¯å¥œãªããããã£ïŒå æé åºïŒãæã€åé åºã®ååšã«å¶éããŸãã ãããã£ãŠãæäœã®ç°¡åãªäžŠã¹æ¿ããå£ããªãããŒã¿æ§é ãšã¢ã«ãŽãªãºã ã®ã¿ã䜿çšã§ããŸãã
ãã¹ãŠã®æäœã®å®å šãªç·åœ¢åãååãšããŠäžå¯èœãªå ŽåãCRDTã䜿çšãããšãè€æ°ã®ã¬ããªã«ã楜芳çã«åæã§ããŸãã æç®ã§ã¯ãCRDTã®åºæ¬çãªããŒã¿æ§é ïŒã»ãããããããã«ãŠã³ã¿ãŒãããã¹ãïŒãå®è£ ããæ¹æ³ã®ãªãã·ã§ã³ã«ã€ããŠèª¬æããŠããŸãã
ããã¯æãææãªã¢ãããŒãã§ããã競åããã¬ã³ãŒãã£ã³ã°äžã«ãåäœã®æçµäœè ãåã¡ãå±éºãªæœåšçãªããŒã¿æ倱ãããå°ãå ã«é²ãããšãã§ããŸãã ãã¡ãããäž»ãªé£ç¹ã¯ãéçºè ãCRDTã®æ©èœãç解ããå¿ èŠãããããšã§ãã äžè¬ã«ãããã¯ã©ã®ãã¯ãããžãŒã«ãåœãŠã¯ãŸããŸãã ããã«ããã¹ãŠã®ããŒã¿ãšã¢ã«ãŽãªãºã ãCRDTããŒã¹ã«å解ã§ããããã§ã¯ãããŸããã ãããŠãäž»ãªå©ç¹ã¯ã競åããæžã蟌ã¿ã¢ã¯ã»ã¹ã§ãã¬ããªã«ãšããŒã¿ãŠã§ã¢ããŠã¹ã®åç©åã§åæã®åé¡ã解決ã§ããããšã§ãã
ã¢ãã€ã«ã¢ããªã±ãŒã·ã§ã³ã®CRDTãšã³ãžã³ã䜿çšãããšãæ°žç¶çãªã€ã³ã¿ãŒãããæ¥ç¶ããªããŠãããŒã¿ãå®å šã«æäœã§ããæ¥ç¶ã衚瀺ãããå Žåã«ã®ã¿ã競åãããŒã¿æ倱ãªãã«åæã§ããŸãã çæ³çã«ã¯ãããã¯ãŠãŒã¶ãŒã«ã¯ãŸã£ããèŠããªãããšããããŸãã ãªããžã§ã¯ãã®äžçš®ã®Dropbox / gitã ã¯ããFirebaseãMeteorãDerbyãGoogle Drive Realtime API-ãã®æ¹åã«åãã£ãŠããŸãã ããããMySQLãŸãã¯jQueryã®ã¬ãã«ã§ããç匟ã¯ãŸã å®çŸããŠããŸãããã€ãŸãããŸã æºåãæŽã£ãŠããªããšããããšã§ãã
ããšãã°ãæ å ±äžå¿ã§ã€ãã³ãæåã®CRDTã粟ç¥çã«æšªæãããšãä»®æ³ã®CRDTãã¹ãåŸãããŸããããã«ãããåãCORBA / DCOM / RMIãšã¯ç°ãªãããªã¢ãŒããªããžã§ã¯ãã«ã¢ã¯ã»ã¹ããã ãã§ãªããããŒã«ã«ã³ããŒãæäœããããšãã§ããŸãã åæã«ããããã®ããŒã«ã«ã³ããŒã¯ãã©ãããªããã£ãã·ã¥ãã§ã¯ãªããèšé²æ©èœãåããæ¬æ Œçãªã©ã€ãã¬ããªã«ã§ãããèªåçã«åæãããŸãã
å°æ¥ã®Webã¢ããªã±ãŒã·ã§ã³ã®ã¢ãŒããã¯ãã£ã§ã¯ãªããã®ã¯äœã§ããïŒ