ããã«ã¡ã¯ãHabrïŒ ãã®æçš¿ã§å§ãŸã£ãRBK.moneyæ¯æããã©ãããã©ãŒã ã®å éšã«é¢ãããµã€ã¯ã«ãå ¬éãç¶ããŸãã ä»æ¥ã¯ãè«çåŠçã¹ããŒã ãç¹å®ã®ãã€ã¯ããµãŒãã¹ãšãããã®çžäºé¢ä¿ãåããžãã¹ããžãã¯ãåŠçãããµãŒãã¹ãè«ççã«åé¢ãããæ¹æ³ãåŠçã³ã¢ãæ¯æãã«ãŒãã®çªå·ãšãã©ãããã©ãŒã å ã§ã®æ¯æãæ¹æ³ã«ã€ããŠäœãç¥ããªãçç±ã«ã€ããŠèª¬æããŸãã ãŸããããå°ã詳ãããé«è² è·ãåŠçããããã«é«å¯çšæ§ãšã¹ã±ãŒãªã³ã°ãæäŸããæ¹æ³ã®ãããã¯ãæããã«ããŸãã
æŠèŠããžãã¯ãšäžè¬çãªã¢ãããŒã
äžè¬ã«ãæ¯æããæ åœããåŠçã®ãã®éšåã®åºæ¬èŠçŽ ã®ã¹ããŒã ã¯æ¬¡ã®ããã«ãªããŸãã
è«ççã«èªåã®å éšã§ã責任ç¯å²ã3ã€ã®ãã¡ã€ã³ã«åå²ããŸãã
- å€éšãŸãŒã³ãã€ã³ã¿ãŒãããäžã®ãšã³ãã£ãã£ãæ¯æããã©ãŒã ã®JSã¢ããªã±ãŒã·ã§ã³ïŒããã«ã«ãŒãã®è©³çŽ°ãå ¥åããŸãïŒãããŒãã£ã³ãã¯ã©ã€ã¢ã³ãã®ããã¯ãšã³ããããŒãããŒãã³ã¯ã®åŠçã²ãŒããŠã§ã€ããã®ä»ã®æ¯æãæ¹æ³ã®ãããã€ããŒãªã©ã
- å
éšã«éåžžã«ã¢ã¯ã»ã¹ãããããŸãŒã³ããã€ã¯ããµãŒãã¹ãããã«ãããæ¯æãã²ãŒããŠã§ã€ã®äœæ¥ãçŽæ¥æäŸãããéã®åŒãèœãšãã管çããã·ã¹ãã ããã³ãã®ä»ã®ãªã³ã©ã€ã³ãµãŒãã¹ã§ããããèæ
®ããŸãã
- ã«ãŒãææè ã®å®å šãªããŒã¿ãšçŽæ¥é£æºãããµãŒãã¹ã«ã¯å¥ã®é åããããŸãããããã®ãµãŒãã¹ã«ã¯ãééçãæå±ããåå¥ã®èŠä»¶ããããPCI-DSSèŠæ Œã«åºã¥ã匷å¶èªèšŒã®å¯Ÿè±¡ãšãªããŸãã ãã®ãããªåé¢ãè¡ãããçç±ã«ã€ããŠã以äžã§è©³ãã説æããŸãã
- å€å žçãªæå³ã§ãæäŸããããµãŒãã¹ã®å¯çšæ§ãŸãã¯ãããã®å¿çã®æéã«é¢ããèŠä»¶ãããå°ãªãå éšãŸãŒã³-ããã¯ããã¯ãªãã£ã¹ã§ãã ãã¡ãããããã§ã¯ãåžžã«å©çšå¯èœãã®ååãä¿èšŒããããšããŠããŸãããããã«è²»ããåŽåã¯å°ãªããªã£ãŠããŸãã
åãŸãŒã³å ã«ã¯ãããžãã¹ããžãã¯ã®åŠçã®åéšåãå®è¡ãããã€ã¯ããµãŒãã¹ããããŸãã å ¥åã§RPCã³ãŒã«ãåä¿¡ããåºåã§ãçµã¿èŸŒã¿ã¢ã«ãŽãªãºã ã«åŸã£ãŠåŠçãããããŒã¿ãçæããŸãããã®ã¢ã«ãŽãªãºã ã¯ããã§ãŒã³ã«æ²¿ã£ãä»ã®ãã€ã¯ããµãŒãã¹ã®ã³ãŒã«ãšããŠãå®è¡ãããŸãã
ã¹ã±ãŒã©ããªãã£ã確ä¿ããããã«ãå¯èœãªéãå°ãªãå Žæã«ç¶æ ãä¿åããããšããŸãã å³ã®ã¹ããŒãã¬ã¹ãµãŒãã¹ã«ã¯ãæ°žç¶ãªããžããªãšã®æ¥ç¶ã¯ãªããããããã¹ããŒããã«ãæ¥ç¶ãããŠããŸãã äžè¬ã«ãæ°žç¶çãªç¶æ ã®ã¹ãã¬ãŒãžã«ã¯ããã€ãã®å¶éããããµãŒãã¹ã䜿çšããŸã-åŠçã®äž»èŠéšåã§ã¯ããããã¯é¢é£ãµãŒãã¹çšã®Riak KVã¯ã©ã¹ã¿ãŒã§ã-PostgreSQLãKafkaã䜿çšãããã¥ãŒã®éåæåŠççšã§ãã
é«å¯çšæ§ã確ä¿ããããã«ãéåžž3ã5ã®è€æ°ã®ã³ããŒã§ãµãŒãã¹ãå±éããŸãã
ã¹ããŒãã¬ã¹ãµãŒãã¹ã®ã¹ã±ãŒãªã³ã°ã¯ç°¡åã§ããç°ãªãä»®æ³ãã·ã³ã§å¿ èŠãªã€ã³ã¹ã¿ã³ã¹ã®æ°ãå¢ããã ãã§ãConsulã«ç»é²ãããã³ã³ãœãŒã«DNSãä»ããŠè§£æ±ºããä»ã®ãµãŒãã¹ããã®åŒã³åºããåä¿¡ããåä¿¡ããããŒã¿ãåŠçããŠããã«éä¿¡ããŸãã
ã¹ããŒããã«ãµãŒãã¹ããŸãã¯ããã¯ã¡ã€ã³ã®ãã®ã§ãããå³ã§ã¯MachinegunãšããŠç€ºãããŠãããã¢ã¯ã»ã¹ããããã€ã³ã¿ãŒãã§ã€ã¹ãå®è£ ããŠããŸãïŒåæ£ã¢ãŒããã¯ãã£ã¯Erlang Distributionã«åºã¥ããŠããŸãïŒãConsulKVãä»ããåæã¯ããã¥ãŒã€ã³ã°ãšåæ£ããã¯ãä¿èšŒããããã«äœ¿çšãããŸãã ããã¯çãã詳现ãªèª¬æã¯å¥ã®æçš¿ã«ãªããŸãã
Riakã¯ãããã«ã¢ã¯ã»ã¹ã§ããæ°žç¶çãªãã¹ã¿ãŒã¬ã¹ã¹ãã¬ãŒãžãæäŸããŸããã©ã®ãããªæ¹æ³ã§ãæºåããããšã¯ãªããèšå®ã¯ã»ãŒããã©ã«ãã§ãã çŸåšã®è² è·ãããã¡ã€ã«ã§ã¯ãã¯ã©ã¹ã¿ãŒå ã®5ã€ã®ããŒããå¥ã ã®ãã¹ãã«ãããã€ãããŠããŸãã éèŠãªæ³šæ-ã€ã³ããã¯ã¹ãšå€§ããªããŒã¿ãµã³ãã«ãå®éã«ã¯äœ¿çšãããç¹å®ã®ããŒã䜿çšããŸãã
KVã¹ããŒã ãå®è£ ããã«ã¯è²»çšãããããããå Žåã¯ããªã³ã©ã€ã³ããŒãããMachinegunã䜿çšããŠé害ãçºçããå Žåã«å¿ èŠãªã€ãã³ãããã€ã§ãã¢ããããŒãã§ãããããPostgeSQLããŒã¿ããŒã¹ãã¬ããªã±ãŒã·ã§ã³ãŸãã¯ã·ã³ã°ã«ã¢ãŒããœãªã¥ãŒã·ã§ã³ã§äœ¿çšããŸãã
å³ã®ãã€ã¯ããµãŒãã¹ã®è²åãã¯ãããããèšè¿°ãããŠããèšèªã瀺ããŠããŸã-èç·è²-ãããã¯Javaã¢ããªã±ãŒã·ã§ã³ãèéè²-Erlangã§ãã
ãã¹ãŠã®ãµãŒãã¹ã¯Dockerã³ã³ããã§åäœããŸããããã¯CIãã«ãã¢ãŒãã£ãã¡ã¯ãã§ãããããŒã«ã«ã®Dockerã¬ãžã¹ããªã«ãããŸãã æ§æããã©ã€ããŒãGithubãªããžããªã«ããSaltStackæ¬çªç°å¢ã«ãµãŒãã¹ããããã€ããŸãã
éçºè ã¯ãã®ãªããžããªã®å€æŽãç¬èªã«èŠæ±ãããµãŒãã¹ã®èŠä»¶ãèšè¿°ããŸããã³ã³ããã«å²ãåœãŠãããã¡ã¢ãªã®ãµã€ãºãç°å¢å€æ°ãªã©ã«è»¢éãããå¿ èŠãªããŒãžã§ã³ãšãã©ã¡ãŒã¿ã瀺ããŸãã ããã«ãæ¿èªãããåŸæ¥å¡ã«ããå€æŽã®èŠæ±ãæåã§ç¢ºèªããåŸïŒDevOpsããµããŒããããã³æ å ±ã»ãã¥ãªãã£ããããŸãïŒãCDã¯æ°ããããŒãžã§ã³ã®ã³ã³ãããŒã®ã€ã³ã¹ã¿ã³ã¹ã補åç°å¢ã®ãã¹ãã«èªåçã«ããŒã«ã¢ããããŸãã
ãŸããåãµãŒãã¹ã¯ãElasticsearchãç解ã§ãã圢åŒã§ãã°ãæžã蟌ã¿ãŸãã ãã°ãã¡ã€ã«ã¯Filebeatã«ãã£ãŠååŸãããElasticsearchã¯ã©ã¹ã¿ãŒã«æžã蟌ãŸããŸãã ãããã£ãŠãéçºè ã¯è£œåç°å¢ã«ã¢ã¯ã»ã¹ã§ããªããšããäºå®ã«ããããããã圌ãã¯åžžã«ãããã°ãããµãŒãã¹ã«äœãèµ·ããããèŠãæ©äŒããããŸãã
å€ã®äžçãšã®çžäºäœçš
ãã©ãããã©ãŒã ã®ç¶æ ã®å€æŽã¯ããããªãã¯APIã®å¯Ÿå¿ããã¡ãœããã®åŒã³åºãã«ãã£ãŠã®ã¿çºçããŸãã åŸæ¥ã®Webã¢ããªã±ãŒã·ã§ã³ãšãµãŒããŒåŽã®ã³ã³ãã³ãçæã¯äœ¿çšããŠããŸãããå®éãUIãšããŠè¡šç€ºãããã®ã¯ãå ¬éAPIäžã®JSãã¥ãŒã®ã¿ã§ãã ååãšããŠããã©ãããã©ãŒã ã§ã®ã¢ã¯ã·ã§ã³ã¯ã䜿çšããã³ã³ãœãŒã«ããã®curlåŒã³åºãã®ãã§ãŒã³ã䜿çšããŠå®è¡ã§ããŸãã ç¹ã«ãçµ±åãã¹ãïŒJSã§ã©ã€ãã©ãªãšããŠäœæããŸããïŒãèšè¿°ããããã«ãCIã§åã¢ã»ã³ããªäžã«ãã¹ãŠã®ãããªãã¯ã¡ãœããããã§ãã¯ããŸãã
ãŸãããã®ãããªã¢ãããŒãã¯ããã©ãããã©ãŒã ãšã®å€éšçµ±åã®ãã¹ãŠã®åé¡ã解決ãããšã³ããŠãŒã¶ãŒãæ¯æãããŒã¿ãå ¥åãããšããçŸãã圢åŒã®åäžã®ãããã³ã«ãšããµãŒããŒé察話ã®ã¿ã䜿çšãããµãŒãããŒãã£ã®åŠçãšã®çŽæ¥çµ±åã®ããã®ãã¹ãããŒãã¹ãã®äž¡æ¹ãååŸã§ããããã«ããŸãã
çµ±åãã¹ãã§ã®å®å šãªã«ãã¬ããžã«å ããŠãã¹ããŒãžã³ã°æŽæ°ã¢ãããŒãã䜿çšããŸããåæ£ã¢ãŒããã¯ãã£ã§ã¯ããããè¡ãã®ã¯éåžžã«ç°¡åã§ããããšãã°ã1åã®ãã¹ã§åã°ã«ãŒããã1ã€ã®ãµãŒãã¹ã®ã¿ãå±éãããã®åŸãã°ãšã°ã©ãã®äžæåæ¢ãšåæãè¡ããŸãã
ããã«ãããéææ¥ã®å€ãå«ãã»ãŒ24æéå±éãå¯èœã«ãªããŸããäœãå®è¡ã§ããªãããšãããã«ããŒã«ããã¯ããããšãæããã誰ãæ°ä»ããªããŸã§å€æŽãå ããåçŽãªã³ããããå ã«æ»ããŸãã
ãã©ãããã©ãŒã ç»é²ãšãããªãã¯API
ãããªãã¯ã¡ãœãããåŒã³åºãåã«ãã¯ã©ã€ã¢ã³ããæ¿èªããã³èªèšŒããå¿ èŠããããŸãã ã¯ã©ã€ã¢ã³ãããã©ãããã©ãŒã ã«è¡šç€ºãããããã«ã¯ããšã³ããŠãŒã¶ãŒãšã®ãã¹ãŠã®ããåããåŠçãããã¹ã¯ãŒãã®ç»é²ãå ¥åããªã»ãããã»ãã¥ãªãã£å¶åŸ¡ããã®ä»ã®ãã€ã³ãã£ã³ã°ã®ããã®ã€ã³ã¿ãŒãã§ãŒã¹ãæäŸãããµãŒãã¹ãå¿ èŠã§ãã
ããã§ã¯ãèªè»¢è»ãçºæããŸããã§ããããRedhat- Keycloakã®ãªãŒãã³ãœãŒã¹ãœãªã¥ãŒã·ã§ã³ãåã«çµ±åããŸãã ã åŒç€Ÿãšã®ããåããéå§ããåã«ããã©ãããã©ãŒã ã«ç»é²ããå¿ èŠããããŸããããã¯å®éãKeycloakãéããŠè¡ãããŸãã
ãµãŒãã¹ã§ã®èªèšŒã«æåãããšãã¯ã©ã€ã¢ã³ãã¯JWTãåãåããŸãã åŸã§æ¿èªã«äœ¿çšããŸããKeycloakåŽã§ã¯ãJWTã«åçŽãªjsonæ§é ãšããŠåã蟌ãŸãããµãŒãã¹ã®ç§å¯ããŒã§çœ²åãããããŒã«ãèšè¿°ããä»»æã®ãã£ãŒã«ããæå®ã§ããŸãã
JWTã®æ©èœã®1ã€ã¯ããã®æ§é ããµãŒããŒã®ç§å¯ããŒã«ãã£ãŠçœ²åãããŠããããšã§ãããããã£ãŠãããŒã«ãšä»ã®ãªããžã§ã¯ãã®ãªã¹ããæ¿èªããããã«ãæ¿èªãµãŒãã¹ã«ã¢ã¯ã»ã¹ããå¿ èŠã¯ãªããããã»ã¹ã¯å®å šã«åé¢ãããŸãã èµ·åæã®CAPIãµãŒãã¹ã¯ãKeycloakãããªãã¯ããŒãèªã¿åããããã䜿çšããŠãããªãã¯APIã¡ãœãããžã®åŒã³åºããèš±å¯ããŸãã
ããŒå€±å¹ã¹ããŒã ãæãã€ããã®ã§ãã¹ããŒãªãŒã¯ç¬ç«ããŠãããç¬èªã®æçš¿ã«å€ããŸãã
ãããã£ãŠãJWTãåãåããŸããããããèªèšŒã«äœ¿çšã§ããŸãã ããã§ã¯ãCAPIããã³CAPI-DSSãšããŠç€ºãããŠãããã€ã¢ã°ã©ã ã§ã次ã®æ©èœãå®è£ ãããã€ã¯ããµãŒãã¹ã®å ±éAPIã®ã°ã«ãŒããæ©èœããŸãã
- åä¿¡ããã¡ãã»ãŒãžã®æ¿èªã åãããªãã¯APIåŒã³åºãã®åã«ã¯ãAuthorizaionïŒBearer {JWT} HTTPããããŒãä»ããŠããŸãã å ±éAPIã°ã«ãŒãã®ãµãŒãã¹ã¯ãããã䜿çšããŠãæ¿èªãµãŒãã¹ã®æ¢åã®å ¬éããŒã§çœ²åãããããŒã¿ãæ€èšŒããŸãã
- åä¿¡ããŒã¿ã®æ€èšŒã ã¹ããŒãã¯OpenAPIä»æ§ïŒSwaggerãšãåŒã°ããïŒãšããŠèšè¿°ãããŠãããããããŒã¿æ€èšŒã¯éåžžã«ç°¡åã§ãããŒã¿ã¹ããªãŒã ã§å¶åŸ¡ã³ãã³ããåãåãå¯èœæ§ã¯ã»ãšãã©ãããŸããã ããã¯ããµãŒãã¹å šäœã®ã»ãã¥ãªãã£ã«ãã©ã¹ã®å¹æããããããŸãã
- ãããªãã¯REST JSONããå éšãã€ããªThriftãžã®ããŒã¿åœ¢åŒã®å€æã
- ãã©ã³ã¹ããŒããã€ã³ãã£ã³ã°ãäžæã®trace_idãªã©ã®ããŒã¿ã§ãã¬ãŒãã³ã°ããããžãã¹ããžãã¯ã管çããæ¯æããªã©ãææ¡ããŠãããµãŒãã¹ã«ãã©ãããã©ãŒã å ã§ã€ãã³ããããã«æž¡ããŸãã
ãã®ãããªãµãŒãã¹ã¯å€æ°ãããéåžžã«ã·ã³ãã«ã§ãªãŒã¯ã§ãããç¶æ ãä¿åããŸããããã®ãããç·åœ¢ããã©ãŒãã³ã¹ã¹ã±ãŒãªã³ã°ã§ã¯ãå¿ èŠãªéã®ç©ºã容éã§ãµãŒãã¹ãå±éããã ãã§ãã
PCI-DSSããã³ãªãŒãã³ã«ãŒãããŒã¿
å³ãããããããã«ããã®ãããª2ã€ã®ãµãŒãã¹ã°ã«ââãŒãããããŸã-ã¡ã€ã³ã¯å ±éAPIã§ããããªãŒãã³ã«ãŒãäŒå¡ããŒã¿ãæããªããã¹ãŠã®ããŒã¿ã¹ããªãŒã ãåŠçããŸãã2ã€ç®ã¯ããããã®ã«ãŒãã§çŽæ¥åäœããPCI-DSSå ±éAPIã§ãã å éšã§ã¯ãŸã£ããåãã§ãããç©ççã«åé¢ããç°ãªãéçã«é 眮ããŸããã
ããã¯ãã«ãŒãããŒã¿ãä¿åããã³åŠçããå Žæã®æ°ãæå°éã«æãããã®ããŒã¿ããã³PCI-DSSèªå®ãšãªã¢ã®æŒæŽ©ã®ãªã¹ã¯ãæžããããã«è¡ãããŸãã ãããŠãããã¯ããªãæéãããããè²»çšã®ãããããã»ã¹ã§ã-æ¯æãäŒç€ŸãšããŠãç§ãã¡ã¯æ¯å¹ŽMPSèŠæ Œã«æºæ ããããã«ææã®èªèšŒãåããå¿ èŠããããããã«é¢ä¿ãããµãŒããŒãšãµãŒãã¹ãå°ãªãã»ã©ããã®ããã»ã¹ãå®äºããã®ã¯ããéãç°¡åã«ãªããŸãã ããŠãã»ãã¥ãªãã£äžãããã¯æãããžãã£ããªæ¹æ³ã§åæ ãããŸãã
è«æ±ãšããŒã¯ã³å
ãã®ãããæ¯æããéå§ããæ¯æ人ã®ã«ãŒããããéãååŽããŸãã
ãã®ãªã¯ãšã¹ãã¯ããããªãã¯APIã®ã¡ãœãããžã®äžé£ã®åŒã³åºãã®åœ¢ã§è¡ããããšæ³åããŠãã ãããããã¯ããªã³ã©ã€ã³ã¹ãã¢ã«è¡ã£ãŠååã®ãã¹ã±ãããåéãã[è³Œå ¥]ãã¯ãªãã¯ããæ¯æãã«ã«ãŒãã®è©³çŽ°ãå ¥åããåŸãæ¯æè ãšããŠéå§ãããŸãããã©ãŒã ãã¯ãªãã¯ãããæ¯æãããã¿ã³ãã¯ãªãã¯ããŸããã
ç§ãã¡ã¯ãéãååŽããããã®ããŸããŸãªããžãã¹ããã»ã¹ãæäŸããŠããŸãããæãèå³æ·±ãã®ã¯è²·æéã䜿çšããããã»ã¹ã§ãã ãã©ãããã©ãŒã ã§ã¯ãæ¯æãã®è«æ±æžããŸãã¯æ¯æãã®ã³ã³ãããšãªãè«æ±æžãäœæã§ããŸãã
1ã€ã®è«æ±æžå ã§ã1ã€ãã€æ¯æããè©Šã¿ãããšãã§ããŸããã€ãŸãã次ã®æ¯æããæåãããŸã§æ¯æããäœæã§ããŸãã ããšãã°ãããŸããŸãªã«ãŒãããŠã©ã¬ããããã®ä»ã®æ¯æãæ¹æ³ããè«æ±æžã®æ¯æããè©Šã¿ãããšãã§ããŸãã ã«ãŒãã®1ã€ã«ãéããªãå Žåã¯ãå¥ã®ã«ãŒããè©Šãããšãã§ããŸãã
ããã¯ãã³ã³ããŒãžã§ã³ãšãŠãŒã¶ãŒãšã¯ã¹ããªãšã³ã¹ã«ãã©ã¹ã®å¹æããããããŸãã
è«æ±æžã¹ããŒããã·ã³
ãã©ãããã©ãŒã å ã§ã¯ããã®ãã§ãŒã³ã¯æ¬¡ã®ã«ãŒãã«æ²¿ã£ãçžäºäœçšã«å€ãããŸãã
- ã³ã³ãã³ãããã©ãŠã¶ã«é ä¿¡ãããåã«ãã¯ã©ã€ã¢ã³ãããŒãã£ã³ãã¯ãã©ãããã©ãŒã ã«çµ±åãããç»é²ãããæ¿èªã®ããã®JWTãåãåããŸããã
- ããŒãã£ã³ãã¯ããã¯ãšã³ãããcreateInvoiceïŒïŒã¡ãœãããåŒã³åºããŸãããã€ãŸãããã©ãããã©ãŒã ã§æ¯æãã®è«æ±æžãäœæããŸããã å®éãããŒãã£ã³ãããã¯ãšã³ãã¯æ¬¡ã®ã³ã³ãã³ãã®HTTP POSTãªã¯ãšã¹ãããšã³ããã€ã³ãã«éä¿¡ããŸããã
curl -X POST \ https://api.rbk.money/v2/processing/invoices \ -H 'Authorization: Bearer {JWT}' \ -H 'Content-Type: application/json; charset=utf-8' \ -H 'X-Request-ID: 1554417367' \ -H 'cache-control: no-cache' \ -d '{ "shopID": "TEST", "dueDate": "2019-03-28T17:41:32.569Z", "amount": 6000, "currency": "RUB", "product": "Order num 12345", "description": "Delicious meals", "cart": [ { "price": 5000, "product": "Sandwich", "quantity": 1, "taxMode": { "rate": "10%", "type": "InvoiceLineTaxVAT" } }, { "price": 1000, "product": "Cola", "quantity": 1, "taxMode": { "rate": "18%", "type": "InvoiceLineTaxVAT" } } ], "metadata": { "order_id": "Internal order num 13123298761" } }'
ãªã¯ãšã¹ãã¯ãå ±éAPIã°ã«ãŒãã®ã¢ãŒã©ã³ã¢ããªã±ãŒã·ã§ã³ã®1ã€ã§ãã©ã³ã¹ãåãããæå¹æ§ã確èªãããã³ããŒãµãŒãã¹ã«è¡ããããã§keyçæ§ããŒãåãåãããªããã«è»¢éããHellgateãµãŒãã¹ã°ã«ââãŒãã«ãªã¯ãšã¹ããéä¿¡ããŸããã Hellgateã€ã³ã¹ã¿ã³ã¹ã¯ããžãã¹ãã§ãã¯ãå®è¡ããŸãããããšãã°ããã®JWTã®ææè ãååçã«ãããã¯ãããŠããªãããšã確èªããè«æ±æžãäœæããäžè¬çã«ãã©ãããã©ãŒã ãšå¯Ÿè©±ããŠè«æ±æžã®äœæãéå§ããŸããã
Hellgateã¯ç§ãã¡ã®åŠçã®äžæ žã§ãããšèšãããšãã§ããŸããããã¯ããžãã¹ãšã³ãã£ãã£ã§åäœããæ¯æããéå§ããæ¹æ³ãç¥ã£ãŠãã人ããã®æ¯æããå®éã®ãéã®è«æ±ã«å€ããããã«è¹Žãå¿ èŠããã人ããã®æ¯æãã®çµè·¯ãèšç®ããæ¹æ³ããããåãæ¶ãããã«èšãããã¹ãã ããã§ã貞åå¯Ÿç §è¡šã«åæ ãããææ°æããã³ãã®ä»ã®ææåãèšç®ããŸãã
éåžžãç¶æ ãä¿åãããç°¡åã«æ¡åŒµã§ããŸãã ããããäœããã®çç±ã§ãããã¯ãŒã¯ã®åå²ãHellgateã®é害ãçºçããå Žåãè«æ±æžãçŽå€±ããããã«ãŒãããäºéã®ãéãè«æ±ãããããããšã¯æã¿ãŸããã ãã®ããŒã¿ãæ°žç¶çã«ä¿åããå¿ èŠããããŸãã
3çªç®ã®ãã€ã¯ããµãŒãã¹ãã€ãŸãMachinegunãç»å ŽããŸãã Hellgateã¯Machinegunã«åŒã³åºããéä¿¡ããã¯ãšãªãã©ã¡ãŒã¿ãŒã®åœ¢åŒã®ãã€ããŒãã§ããªãŒãããã³ãäœæãããŸãã Machinegunã¯åæèŠæ±ãæŽçããHellgateã䜿çšããŠããã©ã¡ãŒã¿ãŒããæåã®ã€ãã³ãInvoiceCreatedãäœæããŸãã ãã®åŸãããèªäœãRiakãšãã¥ãŒã«æžã蟌ã¿ãŸãã ãã®åŸãæåããå¿çããã§ãŒã³å ã®æåã®ã¯ãšãªã«éã®é åºã§è¿ãããŸãã
èŠããã«ãMachinegunã¯ãçŸåšã®ããŒãžã§ã³ã®ãã©ãããã©ãŒã ã§ããRiakäžã®ãä»ã®DBMSãããã¿ã€ããŒãé·ãDBMSã§ãã ããã¯ãç¬ç«ãããã·ã³ã管çã§ããã€ã³ã¿ãŒãã§ãŒã¹ãæäŸããencyçæ§ãšèšé²é åºã®ä¿èšŒãæäŸããŸãã è€æ°ã®HGãçªç¶ãã®ãããªèŠæ±ã§ããã«æ¥ãå Žåãã€ãã³ããé çªéãã«ãã·ã³ã«æžã蟌ãŸããããšãèš±å¯ããªãã®ã¯MGã§ãã
ãªãŒãããã³ã¯ãã©ãããã©ãŒã å ã®äžæã®ãšã³ãã£ãã£ã§ãããèå¥åãã€ãã³ãã®ãªã¹ã圢åŒã®ããŒã¿ã»ãããããã³ã¿ã€ããŒã§æ§æãããŸãã ãªãŒãããã³ã®æçµç¶æ ã¯ã察å¿ããç¶æ ãžã®é·ç§»ãéå§ãããã¹ãŠã®ã€ãã³ãã®åŠçããèšç®ãããŸãã ãã®ã¢ãããŒãã䜿çšããŠãããžãã¹ãšã³ãã£ãã£ãåŠçããããããæéç¶æ ãã·ã³ãšããŠèª¬æããŸãã å®éã販売è ãäœæãããã¹ãŠã®è«æ±æžãšãã®æ¯æãã¯ãç¶æ éã®é·ç§»ã®ç¬èªã®ããžãã¯ãåããæéç¶æ ãã·ã³ã§ãã
Machinegunã§ã¿ã€ããŒãæäœããããã®ã€ã³ã¿ãŒãã§ã€ã¹ã䜿çšãããšãã15幎以å ã«ãã®ãã·ã³ã®åŠçãç¶ç¶ãããããšãã圢åŒã®ãªã¯ãšã¹ãããèšé²çšã®ã€ãã³ããšãšãã«å¥ã®ãµãŒãã¹ããåä¿¡ã§ããŸãã ãã®ãããªä¿çäžã®ã¿ã¹ã¯ã¯ãçµã¿èŸŒã¿ã¿ã€ããŒã«å®è£ ãããŠããŸãã å®éã«ã¯ããããã¯éåžžã«é »ç¹ã«äœ¿çšãããŸã-éè¡ãžã®å®æçãªåŒã³åºããé·æéã®éã¢ã¯ãã£ãã«ããæ¯æãã䌎ãèªåã¢ã¯ã·ã§ã³ãªã©ã
ãšããã§ãMachinegunã®ãœãŒã¹ã³ãŒãã¯ã å ¬éãªããžããªã® Apache 2.0ã©ã€ã»ã³ã¹ã§å ¬éãããŠããŸã ã ãã®ãµãŒãã¹ãã³ãã¥ããã£ã«åœ¹ç«ã€ããšãé¡ã£ãŠããŸãã
Machinegunã®äœæ¥ã®è©³çŽ°ãªèª¬æãšãäžè¬ã«é åžã·ã¹ãã ãæºåããæ¹æ³ã«ã€ããŠã¯ãå¥ã®å€§ããªæçš¿ã«ãŸãšããããŠããã®ã§ãããã§è©³ãã説æããããšã¯ããŸããã
å€éšã¯ã©ã€ã¢ã³ãã®èªå¯ã®ãã¥ã¢ã³ã¹
ä¿åã«æåãããšãHellgateã¯ããŒã¿ãCAPIã«è¿ãããã€ããªããªããæ§é ãçŸãããã¶ã€ã³ãããJSONã«å€æããããŒãã£ã³ãããã¯ãšã³ãã«éä¿¡ã§ããç¶æ ã«ããŸãã
{ "invoice": { "amount": 6000, "cart": [ { "cost": 5000, "price": 5000, "product": "Sandwich", "quantity": 1, "taxMode": { "rate": "10%", "type": "InvoiceLineTaxVAT" } }, { "cost": 1000, "price": 1000, "product": "Cola", "quantity": 1, "taxMode": { "rate": "18%", "type": "InvoiceLineTaxVAT" } } ], "createdAt": "2019-04-04T23:00:31.565518Z", "currency": "RUB", "description": "Delicious meals", "dueDate": "2019-04-05T00:00:30.889000Z", "id": "18xtygvzFaa", "metadata": { "order_id": "Internal order num 13123298761" }, "product": "Order num 12345", "shopID": "TEST", "status": "unpaid" }, "invoiceAccessToken": { "payload": "{JWT}" } }
ãã©ãŠã¶ã§æ¯æ人ã«ã³ã³ãã³ããéä¿¡ããŠæ¯æãããã»ã¹ãéå§ã§ããããã«æããŸãããããã§ã¯ããã¹ãŠã®ããŒãã£ã³ããã¯ã©ã€ã¢ã³ãåŽã§ç¬ç«ããŠæ¿èªãå®è£ ããæºåãã§ããŠããããã§ã¯ãªãã®ã§ãèªåã§å®è£ ããŸããã ã¢ãããŒãã¯ãCAPIãå¥ã®JWTãçæããããšã§ãã«ãŒãããŒã¯ã³åããã»ã¹ãéå§ããç¹å®ã®è«æ±æžã管çããŠãè¿ãããè«æ±æžæ§é ã«è¿œå ã§ããããã«ããŸãã
åæ§ã®JWTå ã§èª¬æãããŠããããŒã«ã®äŸïŒ
"resource_access": { "common-api": { "roles": [ "invoices.18xtygvzFaa.payments:read", "invoices.18xtygvzFaa.payments:write", "invoices.18xtygvzFaa:read", "payment_resources:write" ] } }
ãã®JWTã®äœ¿çšè©Šè¡åæ°ã¯å¶éãããŠãããæå¹æéãèšå®ãããŠãããããæ¯æ人ã®ãã©ãŠã¶ã§å
¬éã§ããŸãã ååããããšããŠããæ»æè
ãã§ããæ倧ã®ããšã¯ã誰ãã®è«æ±æžã®ä»£éãæ¯æãããããŒã¿ãèªã¿åãããšã§ãã ããã«ã決æžãã·ã³ã¯ãªãŒãã³ã«ãŒãããŒã¿ã§ã¯åäœããªããããæ»æè
ãèŠãããšãã§ããæ倧å€ã¯ãã¿ã€ã4242 42** **** 4242
ãã¹ã¯ãããã«ãŒãçªå·ãæ¯æãéé¡ãããã³ãªãã·ã§ã³ã§ååã®ãã¹ã±ããã§ãã
äœæãããè«æ±æžãšãã®è«æ±æžãžã®ã¢ã¯ã»ã¹ããŒã«ãããæ¯æãããžãã¹ããã»ã¹ãéå§ã§ããŸãã è«æ±æžIDãšãã®JWTãæ¯æ人ã®ãã©ãŠã¶ã«æž¡ããJSã¢ããªã±ãŒã·ã§ã³ã«å¶åŸ¡ãæž¡ããŸãã
Checkout JSã¢ããªã±ãŒã·ã§ã³ã¯ãæ¯æè ãšããŠããªããšå¯Ÿè©±ããããã®ã€ã³ã¿ãŒãã§ãŒã¹ãå®è£ ããŸã-æ¯æããŒã¿å ¥åãã©ãŒã ãæç»ããæ¯æãéå§ããæçµã¹ããŒã¿ã¹ãåãåããé¢çœããŸãã¯æ²ãããã€ã³ãã衚瀺ããŸãã
ããŒã¯ã³åãšã«ãŒãããŒã¿
ãã ããCheckoutã¯ã«ãŒãããŒã¿ã§ã¯æ©èœããŸããã åè¿°ã®ããã«ãæ©å¯ããŒã¿ãã§ããã ãå°ãªãå Žæã«ã«ãŒãäŒå¡ããŒã¿ã®åœ¢åŒã§ä¿åããå¿ èŠããããŸãã ãããè¡ãã«ã¯ãããŒã¯ã³åãå®è£ ããŸãã
ããããTokenizer JSã©ã€ãã©ãªãŒã®åºçªã§ãã å ¥åãã£ãŒã«ãã«ã«ãŒããå ¥åããŠ[Pay]ãã¯ãªãã¯ãããšããã®ããŒã¿ãã€ã³ã¿ãŒã»ããããã createPaymentResourceïŒïŒã¡ãœãããåŒã³åºããŠéåæçã«åŠçã®ããã«éä¿¡ãããŸãã
ãã®ãªã¯ãšã¹ãã¯åã ã®CAPI-DSSã¢ããªã±ãŒã·ã§ã³ã®ãã©ã³ã¹ãåããŠãããè«æ±æžJWTã確èªããŠããŒã¿ãæ€èšŒããã«ãŒãããŒã¿ã¹ãã¬ãŒãžãµãŒãã¹ã«äºçŽ°ãªããšãéä¿¡ããã ãã§ãªã¯ãšã¹ããæ¿èªããŸãã å³ã§ã¯ãCDS-Card Data StorageãšããŠç€ºãããŠããŸãã
ãã®ãµãŒãã¹ã®äž»ãªç®çïŒ
- ç§ãã¡ã®å Žåãå ¥åã§æ©å¯ããŒã¿ãåãåããŸã-ããªãã®ã«ãŒãã®ããŒã¿;
- ãã®ããŒã¿ãããŒã¿æå·åããŒã§æå·åããŸãã
- ããŒãšããŠäœ¿çšãããã©ã³ãã ãªå€ãçæããŸãã
- Riakã¯ã©ã¹ã¿ãŒã®ãã®ããŒã«æå·åãããããŒã¿ãä¿åããŸãã
- æ¯æãããŒã¿ããŒã¯ã³ã®åœ¢åŒã§ããŒãCAPI-DSSãµãŒãã¹ã«è¿ããŸãã
éäžã§ããã®ãµãŒãã¹ã¯ãããŒãæå·åããããã®ããŒãçæããããããã®ããŒãå®å šã«å ¥åãããããŒã¿ãåæå·åãããæ¯æãåŸã®CVVã®æ¶å»ãå¶åŸ¡ãããªã©ãéèŠãªã¿ã¹ã¯ã解決ããŸãããããã¯ãã®æçš¿ã®ç¯å²å€ã§ãã
足å ã§èªåãæã€å¯èœæ§ããã®ä¿è·ããªãã£ãããã§ã¯ãããŸããã ããã¯ãšã³ãããã®ãªã¯ãšã¹ããèš±å¯ããããã«èšèšããããã©ã€ããŒãJWTãWebäžã§ã¯ã©ã€ã¢ã³ãã®ãã©ãŠã¶ã«å ¬éãããå¯èœæ§ã¯ãŒãã§ã¯ãããŸããã ãããé²ãããã«ãä¿è·æ©èœãçµã¿èŸŒãŸããŠããŸããcreatePaymentResourceïŒïŒã¡ãœãããåŒã³åºãããšãã§ããã®ã¯ãè«æ±æžã®èªèšŒããŒã®ã¿ã§ãã ãã©ã€ããŒãJWTãã©ãããã©ãŒã ã䜿çšããããšãããšãHTTP / 401ãšã©ãŒãè¿ãããŸãã
ããŒã¯ãã€ãŒãŒã·ã§ã³ãªã¯ãšã¹ãã®å®äºåŸãããŒã¯ãã€ã¶ãŒã¯åä¿¡ããããŒã¯ã³ãCheckoutã«è¿ãããã®äœæ¥ãçµäºããŸãã
æ¯ææ©ã®ããžãã¹ããã»ã¹
Checkoutã¯æ¯æãããã»ã¹ãéå§ããŸããã€ãŸãã createPaymentïŒïŒã¡ãœãããåŒã³åºãã以åã«åãåã£ãã«ãŒãããŒã¯ã³ãåŒæ°ãšããŠæž¡ããããŒãªã³ã°ã€ãã³ãã®ããã»ã¹ãéå§ããŸããå®éã«ã¯ã getInvoiceEventsïŒïŒ APIã¡ãœããã1ç§ã«1ååŒã³åºããŸãã
CAPIãä»ãããããã®èŠæ±ã¯Hellgateã«åé¡ãããã«ãŒãããŒã¿ã䜿çšããã«æ¯æãããžãã¹ããã»ã¹ã®å®è£ ãéå§ãããŸãã
- ãŸããHellgateã¯æ§æ管çãµãŒãã¹-Dominantã«ç§»åãããã¡ã€ã³æ§æã®çŸåšã®ãªããžã§ã³ãåãåããŸãã ããã«ã¯ããã®æ¯æããè¡ããããã¹ãŠã®ã«ãŒã«ãã©ã®éè¡ãæ¿èªã®ããã«è¡ãããã©ã®ååŒææ°æãèšé²ãããããªã©ãå«ãŸããŠããŸãã
- ã¡ã³ããŒç®¡çãµãŒãã¹ãããHGã®äžéšãšãªããæ¯æããè¡ãããããšã«è³åãã販売è ã®ã¢ã«ãŠã³ãã®å éšçªå·ã«ã€ããŠåŠç¿ããæéãé©çšããæçš¿èšç»ãæºåãããããShumwayãµãŒãã¹ã«å ¥ããŸãã ãã®ãµãŒãã¹ã¯ãæ¯æããè¡ãéã«ãååŒã®åå è ã®å£åº§ã®ãéã®åãã«é¢ããæ å ±ã管çãã責任ããããŸãã 転èšèšç»ã«ã¯ããèšç»ã§æå®ãããååŒã®åå è ã®å£åº§ã§å¯èœãªè³é移åãåçµããããšããæ瀺ãå«ãŸããŠããŸãã
- ã«ãŒããçºè¡ããçºè¡éè¡ã®åœãšãã®çš®é¡ïŒããŽãŒã«ããã¯ã¬ãžããããªã©ïŒã確èªããããã«ãããšãã°Binbaseã®è¿œå ãµãŒãã¹ãåç §ããããšã«ãããæ¯æãããŒã¿ãå å®ãããŸãã
- ååãšããŠãæ¯æãã¹ã³ã¢ãªã³ã°ãåãåããã¹ã³ã¢ãªã³ã°ã«ãã£ãŠçºè¡ããããªã¹ã¯ã¬ãã«ãã«ããŒãã端æ«ã®éžæã決å®ããããã«ãããã¯äžæ£è¡çºã§ãã ããšãã°ã3D-SecureãæèŒãããŠããªã端æ«ã¯äœãªã¹ã¯ã®æ¯æãã«äœ¿çšã§ããèŽåœçãªãªã¹ã¯ã¬ãã«ãåãåã£ãæ¯æãã¯ããã§å¯¿åœãè¿ããŸãã
- ãšã©ãŒæ€åºãµãŒãã¹ãFaultdetectorãåŒã³åºããããããåä¿¡ããããŒã¿ã«åºã¥ããŠãæ¯æãã«ãŒããéžæããŸããçŸåšããšã©ãŒãæãå°ãªããæ¯æããæåããå¯èœæ§ãæãé«ãéè¡ã®ãããã³ã«ã¢ããã¿ã§ãã
- éžæãããéè¡ãããã³ã«ã¢ããã¿ãŒã«ãªã¯ãšã¹ããéä¿¡ããYellowBankã¢ããã¿ãŒãšããŸãããã®å Žåãããã®ããŒã¯ã³ããæå®ãããéé¡ãæ¿èªããŸããã
åä¿¡ããããŒã¯ã³ã®ãããã³ã«ã¢ããã¿ãŒã¯CDSã«ç§»åãã埩å·åãããã«ãŒãããŒã¿ãåä¿¡ããéè¡åºæã®ãããã³ã«ã«è»¢éããäžè¬ã«æ¿èªãååŸããŸã-æå®ãããéé¡ãæ¯æ人ã®å£åº§ã§åçµãããŠããããšãååŸéè¡ãã確èªããŸãã
ãã®æç¹ã§ãéè¡ããã«ãŒãããã®åŒãèœãšãã«é¢ããã¡ãã»ãŒãžãèšèŒãããSMSãåãåããŸãããå®éã«ã¯ãå®éã«ã¯è³éã¯å£åº§ã§åçµãããŠããã ãã§ãã
ã¢ããã¿ãŒã¯HGã«æ¿èªã®æåãéç¥ããCVVã³ãŒããCDSãµãŒãã¹ããåé€ãããŸããããã§ã察話ãã§ãŒãºãçµäºããŸãã çµå¶é£ã¯HGã«æ»ããŸãã
æ¯æãããžãã¹ããã»ã¹ã®ããŒãã£ã³ãã«ããcreatePaymentïŒïŒåŒã³åºãã§æå®ãããæ¯æãããã»ã¹ã«å¿ããŠãHGã¯å€éšAPIããèªèšŒååŸã¡ãœãããžã®åŒã³åºããã€ãŸããã«ãŒãããã®ãéã®åŒãåºãã®ç¢ºèªããŸãã¯ããŒãã£ã³ããã¹ããŒã ãéžæããå ŽåãçŽã¡ã«ãããè¡ããŸãã·ã³ã°ã«ã¹ããŒãžæ¯æãã
ååãšããŠãã»ãšãã©ã®å人ã¯äžæ®µéã®æ¯æãã䜿çšããŸãããæ¿èªã®æç¹ã§ãåŒãèœãšãããåèšéé¡ããŸã ããããªãããžãã¹ã«ããŽãªããããŸãã ããã¯ãæ è¡æ¥çã§1ã€ã®éé¡ã®ãã¢ãŒãäºçŽãããšãã«ããçºçããŸããäºçŽã確èªããåŸããã®éé¡ã¯æå®ãããæåã«æ¿èªãããéé¡ãšç°ãªãå ŽåããããŸãã
確èªã®éã¯æä»çã«æ¿èªã®é以äžã§ãããšããäºå®ã«ãããããããããã«ã¯èœãšãç©ŽããããŸãã ã«ãŒãããªã³ã¯ãããŠããéè¡å£åº§ã®é貚ãšã¯ç°ãªãé貚ã§ã«ãŒããã補åãŸãã¯ãµãŒãã¹ã®æéãæ¯æãããšãæ³åããŠãã ããã
æ¿èªæã«ãæ¿èªæ¥ã®çºæ¿ã¬ãŒãã«åºã¥ããŠã¢ã«ãŠã³ãã§ãããã¯ãããéé¡ã æ¯æãã¯æ°æ¥éãæ¿èªæžã¿ãã®ç¶æ ã«ãªãå¯èœæ§ãããããïŒééçã¯æ倧æéã®æšå¥šäºé ããããçŸåšã¯3æ¥éã§ãïŒãæ¿èªã®ååŸã¯ãæ¿èªãããæ¥ã®ã¬ãŒãã§å®è¡ãããŸãã
ãããã£ãŠãããªãã¯é貚ãªã¹ã¯ãè² ããŸããããã¯ãç¹ã«é貚åžå Žã®ãã©ãã£ãªãã£ãé«ãç¶æ³ã§ã¯ãããªãã«ãšã£ãŠæå©ãªããšãšããªãã«ãšã£ãŠäžå©ã«ãªãããšããããŸãã
æ¿èªãååŸããããã«ããããã³ã«ã¢ããã¿ãšã®éä¿¡ããã»ã¹ãåä¿¡ãšåãããã»ã¹ã§è¡ãããæåããå ŽåãHGã¯Shumwayå ã®ã¢ã«ãŠã³ãæçš¿ãã©ã³ãé©çšããæ¯æãããæ¯æãæžã¿ãã¹ããŒã¿ã¹ã«ç§»è¡ããŸãã çŸæç¹ã§ã¯ãæ¯æãã·ã¹ãã ãšããŠãååŒã®åå è ã«ééç矩åãè² ã£ãŠããŸãã
ãŸããæ¯æãããã»ã¹ãå«ãã€ã³ãã€ã¹ãã·ã³ã®ç¶æ ã®å€åã¯Machinegunã®Hellgateã«ãã£ãŠèšé²ãããããŒã¿ã®æ°žç¶æ§ã確ä¿ããæ°ããã€ãã³ãã§ã€ã³ãã€ã¹ãå å®ãããããšã泚ç®ã«å€ããŸãã
æ¯æãæ©ãšUIã®ç¶æ ã®åæ
ãã©ãããã©ãŒã å ã§æ¯æãã®ããã¯ã°ã©ãŠã³ãããã»ã¹ãè¡ãããŠããéãCheckoutã¯åŠçã泚ããã€ãã³ããèŠæ±ããŸãã ç¹å®ã®ã€ãã³ããåä¿¡ãããšã圌ã¯çŸåšã®æ¯æãã®ç¶æ ã人ãç解ã§ãã圢åŒã§æç»ããŸã-ããªããŒããŒãæç»ãããæ¯æããæ£åžžã«åŠçãããŸããããŸãã¯ãæ¯æããåä¿¡ã§ããŸããã§ãããç»é¢ã衚瀺ãããããã©ãŠã¶ãçºè¡éè¡ã®ããŒãžã«ãªãã€ã¬ã¯ãããŠ3D-Secureãã¹ã¯ãŒããå ¥åããŸã;
倱æããå ŽåãCheckoutã¯å¥ã®æ¯æãæ¹æ³ãéžæãããåè©Šè¡ããããææ¡ããŸãããããã£ãŠãè«æ±æžã®äžéšãšããŠæ°ããæ¯æããéå§ããŸãã
ã€ãã³ãã®ããŒãªã³ã°ã䌎ããã®ãããªã¹ããŒã ã«ããããã©ãŠã¶ãŒã®ã¿ããéããåŸã§ãç¶æ ã埩å ã§ããŸã-ç¹°ãè¿ãèµ·åããå ŽåãCheckoutã¯çŸåšã®ã€ãã³ãã®ãªã¹ããåãåãã3D-Secureã³ãŒããå ¥åããããæ¯æããæ¢ã«æ£åžžã«å®äºããããšã瀺ããªã©ããŠãŒã¶ãŒãšã®å¯Ÿè©±ã®çŸåšã®ã·ããªãªãæç»ããŸã
ãªãã©ã€ã³ãŸãŒã³ã§ã®ã€ãã³ãã®è€è£œ
ãã·ã³å¶åŸ¡ã€ã³ã¿ãŒãã§ã€ã¹ãšåæã«ãMachinegunã¯ãã€ãã³ãã®ãããŒããã©ãããã©ãŒã ã®ãªã³ã©ã€ã³ã§ã¯ãªãä»ã®ã¿ã¹ã¯ãæ åœãããµãŒãã¹ã«ãªãŒããŒãããŒããããµãŒãã¹ãå®è£ ããŸãã
決åæŠã®ãã¥ãŒãããŒã«ãŒãšããŠãKafkaã«æ±ºããŸãããã以åã¯Machinegunèªäœã䜿çšããŠãã®æ©èœãå®è£ ããŠããŸããã äžè¬ã«ããã®ãµãŒãã¹ã¯ãã€ãã³ãã®ä¿èšŒãããé åºä»ãã¹ããªãŒã ã®ä¿åããŸãã¯ä»ã®ã³ã³ã·ã¥ãŒããŒãžã®èŠæ±ã«å¿ããã€ãã³ãã®ç¹å®ã®ãªã¹ãã®çºè¡ã§ãã
ãŸããæåã«ã€ãã³ãéè€æé€ã¹ããŒã ãå®è£ ããåãã€ãã³ãã2åã¬ããªã±ãŒããããªãããšãä¿èšŒããŸãããããã®ã¢ãããŒããçæããRiakã®è² è·ã«ããç Žæ£ãããŸãã-çµå±ãã€ã³ããã¯ã¹æ€çŽ¢ã¯æè¯ã®ãã®ã§ã¯ãããŸããKVã¹ãã¬ãŒãžå¯Ÿå¿ã çŸåšãåãµãŒãã¹ã³ã³ã·ã¥ãŒãã¯ãã€ãã³ãã®éè€æé€ãåå¥ã«æ åœããŠããŸãã
äžè¬ã«ãMachinegunã«ããã€ãã³ãã®ã¬ããªã±ãŒã·ã§ã³ã¯ãããŒã¿ãKafkaã«ä¿åãããããšã確èªããããšã§çµäºããæ¶è²»è ã¯ãã§ã«Kafkaãããã¯ã«æ¥ç¶ãããé¢å¿ã®ããã€ãã³ãã®ãªã¹ããããŠã³ããŒãããŸãã
å žåçãªãªãã©ã€ã³ãŸãŒã³ã¢ããªã±ãŒã·ã§ã³ãã³ãã¬ãŒã
ããšãã°ãDudoserãµãŒãã¹ã¯ãæ¯æããæåããããšãéç¥ããã¡ãŒã«ãéä¿¡ããŸãã èµ·åæã«ãæåããæ¯æãã®ã€ãã³ãã®ãªã¹ãããã³ãã§éãåºããããããäœæãšéé¡ã«é¢ããæ å ±ãååŸããããŒã«ã«ã®PostgreSQLã€ã³ã¹ã¿ã³ã¹ã«ä¿åããŠãããžãã¹ããžãã¯ã®ãããªãåŠçã«äœ¿çšããŸãã
ä»ã®ãã¹ãŠã®åæ§ã®ãµãŒãã¹ã¯åãããžãã¯ã«åŸã£ãŠåäœããŸããããšãã°ãMagistaãµãŒãã¹ã¯è²©å£²è ã®å人ã¢ã«ãŠã³ãã§è«æ±æžãšæ¯æããæ€çŽ¢ããHookerãµãŒãã¹ã¯ããã¯ãšã³ãã«éåæã³ãŒã«ããã¯ãéä¿¡ããŸããåŠçAPIã«çŽæ¥ã
ãã®ã¢ãããŒãã«ãããåŠçã®è² æ ã解ãæŸã¡ãæ倧ã®ãªãœãŒã¹ãå²ãåœãŠãæ¯æãåŠçã®é«éæ§ãšå¯çšæ§ãæäŸããé«ãå€æãå®çŸã§ããŸãã ãããžãã¹é¡§å®¢ãéå»1幎éã®æ¯æãã«é¢ããçµ±èšãèŠããããªã©ã®å€§éã®ã¯ãšãªã¯ããªã³ã©ã€ã³åŠçéšåã®çŸåšã®è² è·ã«åœ±é¿ãäžããªããµãŒãã¹ã«ãã£ãŠåŠçããããããæ¯æ人ãå人ãšããŠã®é¡§å®¢ã«ã¯åœ±é¿ããŸããã
ãããããæçš¿ãé·ãããããªãããã«ãããã§åæ¢ããŸãã å°æ¥ã®èšäºã§ã¯ãMachinegunãBenderãCAPIãããã³HellgateãäŸãšããŠäœ¿çšããããŒããããåæ£ã·ã¹ãã ã§å€æŽãä¿èšŒãé åºã®ã¢ãããã¯æ§ã確ä¿ããããšã®åŸ®åŠãªéãã«ã€ããŠç¢ºå®ã«èª¬æããŸãã
ããŠã次åãœã«ãã¹ã¿ãã¯ã«ã€ããŠÂ¯\_(ã)_/¯