Habrãããã¯ã¢ã¹ã¯ã¯ã§éå¬ãããMoscow Python Conf ++ 2018ã«ã³ãã¡ã¬ã³ã¹ã§ã®ãœãããŠã§ã¢ãšã³ãžãã¢Alexei Starkovã«ããã¬ããŒãã§ãã æçš¿ã®æåŸã®ãããªã
ã¿ãªããããã«ã¡ã¯ïŒ ç§ã®ååã¯ã¢ã¬ã¯ã»ã€ã»ã¹ã¿ãŒã³ãã§ããããã¯ç§ã§ããç§ã®æé«ã®å¹Žã«ãç§ã¯å·¥å Žã§åããŠããŸãã
çŸåšãQrator Labsã§åããŠããŸãã åºæ¬çã«ãç§ã¯äžçãCãšC ++ãå匷ããŸãã-AlexandrescuãThe Gang of FourãSOLIDã®ååã倧奜ãã§ã-ããã ãã§ãã ç§ã¯å»ºç¯ã®å®å®é£è¡å£«ã«ãªããŸãã ç§ã¯æ°ã«å
¥ã£ãŠããã®ã§ãããæ°å¹ŽPythonãæžããŠããŸãã
å®éãã建ç¯ã®å®å®é£è¡å£«ããšã¯èª°ã§ããïŒ ãžã§ãšã«ã»ã¹ãã«ã¹ããŒãšãã®èšèã«åããŠäŒã£ããšããããªãã¯ãããããããèªãã ã§ãããã 圌ã¯ããå®å®é£è¡å£«ããå®ç§ãªã¢ãŒããã¯ãã£ãæ§ç¯ããããæœè±¡åãæœè±¡åãæœè±¡åã«ããã人ã
ãããŸããŸãäžè¬çã«ãªã£ãŠãããšèª¬æããŠããŸãã æçµçã«ããããã®ã¬ãã«ã¯ãã¹ãŠã®å¯èœãªããã°ã©ã ã説æããã»ã©é«ããªããŸãããå®éçãªåé¡ã¯è§£æ±ºããŸããã ãã®ç¬éããå®å®é£è¡å£«ãïŒãã®çšèªãåŒçšç¬Šã§å²ãŸããã®ã¯ãããæåŸã§ãïŒã空äžã§ãªããªãã圌ã¯æ»ã«ãŸãã
ãŸãã建ç¯ç©ºéã®æ¢çŽ¢ã«åããåŸåããããŸããããã®ã¬ããŒãã§ã¯ããããã©ã®ããã«ç§ãèŠãããå¿
èŠãªããã©ãŒãã³ã¹ãåããã·ã¹ãã ãæ§ç¯ã§ããªãã£ããã«ã€ããŠå°ãã話ãããŸãã äž»ãªãã®ã¯ãç§ããããã©ã®ããã«å
æãããã§ãã
ç§ã®ã¬ããŒãã®èŠçŽïŒã ã£ã/ã ã£ãã
æ°åããã³æ°çŸäžåã®å¢å ã ãã®ã¹ã©ã€ããäœæãããšããç§ãèããŠããã®ã¯ãæ¹æ³ãã ãã§ããã
ã©ãã§ãããªã«æ¿ããå°ç¡ãã«ã§ããŸããïŒ ããªãã¯ç§ã®ããã«å°ç¡ãã«ããããªãå Žå-èªãã§ãã ããã
æ§æã·ã¹ãã ã«ã€ããŠã話ããŸãã æ§æã·ã¹ãã ã¯ãQrator Labsã®å
éšããŒã«ã§ããããã£ã«ã¿ãªã³ã°ãããã¯ãŒã¯ã§ããSoftware Defined NetworkïŒSDNïŒã®æ§æãä¿åããŸãã ã³ã³ããŒãã³ãéã®æ§æã®åæãšãã®ã¹ããŒã¿ã¹ã®ç£èŠã«åãçµãã§ããŸãã
èŠããã«ãäœã§æ§æãããŠããã®ã§ããããïŒ ãããã¯ãŒã¯å
šäœã®æ§æã®ã¹ãããã·ã§ãããä¿åããããŒã¿ããŒã¹ããããããã«æ¥ãã³ãã³ããåŠçããäœããã®åœ¢ã§æ§æãå€æŽãããµãŒããŒããããŸãã
æè¡ç®¡çè
ãšã¯ã©ã€ã¢ã³ãããã®ãµãŒããŒã«ã¢ã¯ã»ã¹ãããšã³ããã€ã³ãAPIãREST APIãJSON RPCãªã©ãä»ããŠã³ã³ãœãŒã«ã䜿çšããŠãµãŒããŒã«ã³ãã³ããçºè¡ãããã®çµæãæ§æãå€æŽãããŸãã
ããŒã ã¯éåžžã«åçŽãªå Žåãããã°ãããè€éãªå ŽåããããŸãã 次ã«ãSDNãæ§æããã¬ã·ãŒããŒã®ç¹å®ã®ã»ãããããããµãŒããŒã¯ãããã®ã¬ã·ãŒããŒã«æ§æãããã·ã¥ããŸãã ãšãŠãç°¡åã«èãããŸãã åºæ¬çã«ããã®éšåã«ã€ããŠèª¬æããŸãã
ããŒã¿ããŒã¹ãšé¬éè¡ã«é¢ä¿ããŠããã®ã¯åœŒå¥³ã ããã§ãã
ãã®ã·ã¹ãã ã®ç¹åŸŽã¯äœã§ããïŒ ããã¯ããªãå°ãã-å¹³å¡ã§ãã ãã®ããŒã¿ããŒã¹ã«ã¯ãæ°åäžããæ°çŸäžãã®ãšã³ãã£ãã£ãä¿åãããŠããŸãã ç¹åŸŽã¯ããšã³ãã£ãã£éã®é¢ä¿ã®ã°ã©ããéåžžã«è€éã§ããããšã§ãã ãšã³ãã£ãã£éã«ããã€ãã®ç¶æ¿éå±€ããããå
å«ãããããããã®éã«ã¯åçŽã«äŸåé¢ä¿ããããŸãã ãããã®ãã¹ãŠã®å¶éã¯ããžãã¹ããžãã¯ã«ãã£ãŠæ±ºå®ããããããã«åŸãå¿
èŠããããŸãã
æžã蟌ã¿èŠæ±ãšèªã¿åãèŠæ±ã®æ¯çã¯çŽ15ïŒ1ã§ãã ããã§æãããªããã«ãæ§æãå€æŽããããã®ã³ãã³ãããããããããç¹å®ã®é·æéã«äžåºŠããšã³ããã€ã³ãã«æ§æãããã·ã¥ããŸãã
MySQLã¯ç€Ÿå
ã§äœ¿çšãããŸã-åœç€Ÿã®ä»ã®è£œåã§ã䜿çšã§ããŸãããã®ããŒã¿ããŒã¹ã«ã¯éåžžã«çå£ãªå°éç¥èããããããŒã¿ã¹ããŒã ã®æ§ç¯ãã¯ãšãªã®èšèšããã®ä»ãã¹ãŠã®äœæ¥ãè¡ãããšãã§ããŸãã ãã®ãããMySQLããŠãããŒãµã«ãªã¬ãŒã·ã§ãã«ããŒã¿ããŒã¹ãšããŠæ¡çšããŸããã
ãã®ã·ã¹ãã ãèšèšããåŸãåé¡ã¯äœã§ãããïŒ 1ã€ã®ã³ãã³ãã®å®è¡ã«ã¯ãããŒã ã®è€éãã«å¿ããŠ1ã30ç§ããããŸããã ãããã£ãŠãå®è¡ã®é
延ã¯5åã«éããŸããã 1ã€ã®ããŒã ãå°çããŸãã-30ç§ã2çªç®ãªã©ã5åã®é
延ã
æ§æã®é©çšã®é
延ã¯æ倧10åã§ãã ããã§ã¯ååã§ã¯ãªããæé©åãå¿
èŠã§ãããšå€æãããŸããã
ãŸããæé©åãå®è¡ããåã«ã調æ»ãå®æœããå®éã«äœãåé¡ãªã®ãã調ã¹ãå¿
èŠããããŸãã
å€æããããã«ã調æ»ã«æãéèŠãªã³ã³ããŒãã³ãããããŸããã§ãã-ãã¬ã¡ããªãŒããããŸããã§ããã ãããã£ãŠãäœããã®ã·ã¹ãã ãèšèšããå Žåã¯ãæåã«èšèšæ®µéã§ãã¬ã¡ããªãå°å
¥ããŸãã ã·ã¹ãã ãæåã¯å°ãããŠããããããããå°ããããã«ã¯ãã£ãšå°ãããŠããæçµçã«ã¯èª°ãããã©ãã¯ãèŠãå¿
èŠãããç¶æ³ã«ãªããŸããããã¬ã¡ããªã¯ãããŸããã
ãã¬ã¡ããªãŒããªãå Žåã次ã«äœãã§ããŸããïŒ ãã°ãåæã§ããŸãã ããã§ã¯ãããªãåçŽãªã¹ã¯ãªããããã°ã調ã¹ãŠããã®ãããªããŒãã«ã«å€æããæéãæäœãå¹³åã®ã³ãã³ãå®è¡æéã瀺ããŸãã ããããå§ããŠãã®ã£ã°ãããå Žæãã€ãŸãå®è¡ããã®ã«æéããããããŒã ãéããªãããŒã ã確èªããŠããŸãã
å¯äžæ³šæãã¹ãããšã¯ããã°ãåæãããšãããµãŒããŒã§ã®ãããã®ã³ãã³ãã®å®è¡æéã®ã¿ãèæ
®ããããšã§ãã ããã¯æåã®æ®µéã§ã-t2ãšããŠããŒã¯ãããŠããŸãã t1ã¯ãã¯ã©ã€ã¢ã³ããã³ãã³ãã®å®è¡æéã確èªããæ¹æ³ã§ããã€ãŸãããã¥ãŒã«å
¥ããåŸ
æ©ããããµãŒããŒã§ã®å®è¡ã§ãã ãã®æéã¯é·ããªããããæét2ãæé©åããæét1ã䜿çšããŠç®æšã«å°éãããã©ãããå€æããŸãã
t1ã¯ãããã©ãŒãã³ã¹ã®å質ææšã§ãã
ãããã£ãŠãããããã¹ãŠã®ããŒã ã®ãããã¡ã€ãªã³ã°æ¹æ³ã§ããã€ãŸãããµãŒããŒãããã°ãååŸããã¹ã¯ãªãããä»ããŠå®è¡ããæãäœéã«åäœããã³ã³ããŒãã³ããæ¢ããŠæããã«ããŸããã ãµãŒããŒã¯éåžžã«ã¢ãžã¥ãŒã«åŒã«æ§ç¯ãããŠãããã³ãã³ãããšã«åå¥ã®ã³ã³ããŒãã³ããæ
åœããŸããã³ã³ããŒãã³ããåå¥ã«ãããã¡ã€ã«ãããããã®ãã³ãããŒã¯ãäœæã§ããŸãã ãã®ãããããã«ã¯ã©ã¹ããããŸãã-äœæããåé¡ã®ããã³ã³ããŒãã³ãããšã«ãcode_under_testïŒïŒã§ã³ã³ããŒãã³ãã®æŠé䜿çšã瀺ãã¢ã¯ãã£ããã£ãè¡ããŸããã ãããŠã2ã€ã®æ¹æ³ããããŸããïŒãããã¡ã€ã«ïŒïŒãšãã³ãïŒïŒã æåã¯cProfileãåŒã³åºããäœååŒã³åºãããããããã«ããã¯ã¯ã©ãã«ãããã瀺ããŸãã
benchïŒïŒãæ°åå®è¡ãããç°ãªãã¡ããªãã¯ãèæ
®ãããŸãã-ãããããã©ãŒãã³ã¹ã®è©äŸ¡æ¹æ³ã§ãã
ããããããã¯åé¡ã§ã¯ãªãããšãå€æããŸããïŒ
äž»ãªåé¡ã¯ãããŒã¿ããŒã¹ãžã®ã¯ãšãªã®æ°ã§ããã ããããã®ãªã¯ãšã¹ãããããŸãããããªããããªã«ãããããã£ãã®ããç解ããããã«ããã¹ãŠãã©ã®ããã«æ§æãããŠããããèŠãŠã¿ãŸãããã
åä¿¡è
ãè¡šãç°¡åãªåè·¯ã®äžéšããRecieverã¯ã©ã¹ã®åœ¢åŒã§è¡šç€ºãããŸãã 圌ãã¯ããã€ãã®ã°ã«ãŒãã«çµ±åãããŠããŸã-åä¿¡è
ã°ã«ãŒãã ãŸããããã«å¿ããŠãããã€ãã®æ§æãã¬ãŒã³ããããŸããæ§æã®ã¹ã©ã€ã¹ã¯ããã®ã¬ã·ãŒããŒã®1ã€ã®ã圹å²ããæ
åœããæ§æã®ãµãã»ããã§ãã ããšãã°ãã«ãŒãã£ã³ã°ã®å Žå-ã«ãŒãã£ã³ã°ãã¬ãŒã³ã ã¬ã·ãŒããŒã®ãããã¬ãŒã³ã¯ä»»æã®é åºã§æ¥ç¶ã§ããŸã-ã€ãŸããããã¯å€å¯Ÿå€ã®é¢ä¿ã§ãã
ããã¯ãäŸãããã«èª¬æããããã«ããã§æ瀺ãã倧ããªæŠèŠã®äžéšã§ãã
ãã¹ãŠã®å»ºç¯ã®å®å®é£è¡å£«ã¯ãä»ã®èª°ãã®APIãèŠããšãã«äœããããã®ã§ããããïŒ åœŒã¯ããã®APIãåé€ã§ããããã«ããããã«ããããé衚瀺ã«ããæœè±¡åããã€ã³ã¿ãŒãã§ãŒã¹ãäœæãããããããé衚瀺ã«ããããšèããŠããŸãã
ãããã£ãŠãé¬éè¡ã®ãããŒãã£ãªãAPIããããŸããå®éã«ã¯ãããããŒãšãçŽç²ãªãã¯ã©ã¹ããããŸããã¬ã·ãŒãã«ã¯ãããã€ãã®èšå®ãä¿åãããã¡ãœããããããŸãïŒloadïŒïŒãsaveïŒïŒãdeleteïŒïŒ ãããŠãããã«é¢é£ããä»ã®ãã¹ãŠã®ã¯ã©ã¹ã äœããã®æ¹æ³ã§çžäºã«æ¥ç¶ãããPythonãªããžã§ã¯ãã®ã°ã©ããååŸããŸã-ããããã«loadïŒïŒãsaveïŒïŒãdeleteïŒïŒã¡ãœããããããé¬éããããŒãåç
§ããAPIãåŒã³åºããŸãã
ããã§ã®å®è£
ã¯éåžžã«ç°¡åã§ãã loadã¡ãœããããããããŒã¿ããŒã¹ãžã®ã¯ãšãªãäœæããåãåã£ããªããžã§ã¯ãããšã«ç¬èªã®Pythonãªããžã§ã¯ããäœæããŸãã å察ã®æäœãè¡ãsaveã¡ãœããããããŸã-äž»ããŒã䜿çšããŠããŒã¿ããŒã¹ã«ãªããžã§ã¯ãããããã©ããã調ã¹ããªãå Žåã¯äœæããè¿œå ããŠããããã®ãªããžã§ã¯ãã®ç¶æ
ãä¿åããŸãã äž»ããŒã®åé€ã¯ãããŒã¿ããŒã¹ãããªããžã§ã¯ããåä¿¡ããŠââåé€ããŸãã
äž»ãªåé¡ã¯ããã«æããã«ãªããŸã-ããã¯ãããã³ã°ã§ãã æåã«Pythonãªããžã§ã¯ãããããããŒãŸã§äžåºŠå®è¡ãã次ã«ããããŒããããŒã¹ãŸã§å®è¡ããŸãã è¿œå ã®ãããã³ã°ã¯1ã€ãŸãã¯2ã€ã®èª²é¡ã§ããããŸã ããã»ã©æããªããããããŸããã äž»ãªåé¡ã¯æååæã§ããã ãã¯ãªãŒã³ãªãã€ã³ã¿ãŒãã§ãŒã¹ã®2ã€ã®ãªããžã§ã¯ããããããã®ãã¡ã®1ã€ãå±æ§ãå€æŽããŸãããã1ã€ã®å±æ§ãå€æŽãããããšã確èªããã«ã¯ã©ãããã°ããã§ããïŒ ãŸããã å€æŽãããŒã¿ããŒã¹ã«ããŒãžããå¥ã®ãªããžã§ã¯ãã®å±æ§ãååŸããå¿
èŠããããŸãã ãã¡ããããªããžã§ã¯ããåãã³ã³ããã¹ãã«ååšããããšãããã£ãŠããå Žåã¯ãäœããã®æ¹æ³ã§ããã远跡ã§ããŸãã ããããç°ãªãå Žæã«2ã€ã®ã»ãã·ã§ã³ãããå Žå-ããŒã¹ã®ã¿ã䜿çšããããã¡ã¢ãªå
ã®ããŒã¹ããããã¯ããŸãããããã¯è¡ããŸããã§ããã
ãã®ããŒã/ä¿å/åé€ã¯ãé¬éè¡ã®å
éšãå®å
šã«è€è£œããå¥ã®ããããŒã§ãããããèšè¿°ããããã¹ããããŠããŸãã ãã®ããŒã«ã¯äœå¹Žãåã®ãã®ã§ãããã€ã³ã¿ãŒãããäžã§å€ãã®å©ããããããããè€è£œããããšãããŸãè¯ããããŸããã
å³äžé
ã®ã¢ã€ã³ã³ãåç
§ããŠãã ããïŒ ããã§ããçŽåºŠãã®ããã«äœããè¡ãããã¹ã©ã€ãã«å°ãä»ãã建ç¯ã®å€©æåŠã®ããã«ãæœè±¡åã®ã¬ãã«ãäžããŸãã ã€ãŸãããã®ã¢ã€ã³ã³ã®ãªãã¹ã©ã€ãã¯å®çšçã§éå±ã§é¢çœããèªãããšãã§ããŸããã
å€ãã®ã¯ãšãªãé
ãå Žåã®å¯ŸåŠæ¹æ³ã ããã€ïŒ å®ã¯ããããã ç¶æ¿ãã§ãŒã³ãæ³åããŠãã ããã1ã€ã®ãªããžã§ã¯ãã1ã€ã®èŠªããã1ã€ã®èŠªããããŸãã åãªããžã§ã¯ããåæããŸã-ãããè¡ãã«ã¯ããŸã芪ãåæããå¿
èŠããããŸãã 芪ãåæããã«ã¯ããã®èŠªãåæããå¿
èŠããããŸãã ããŠãå
šå¡ãåæãããŸããã å®éãã°ã©ãã®äœææ¹æ³ã«ããããŸãããããããã¹ãŠã®ãªããžã§ã¯ãã100ååæããŠãã€ãŸãå€æ°ã®ãªã¯ãšã¹ããåæãããããšãã§ããŸããã
ç§ãã¡ã¯äœãããŸãããïŒ ãã¹ãŠã®ããžãã¹ããžãã¯ãååŸããããããŒã«è²Œãä»ããŸããã ããã®ä»ã®ãã¹ãŠã®ãªããžã§ã¯ããããããŒãšããŒãžãããAPIå
šäœïŒããŒã¿æœè±¡åã¬ã€ã€ãŒå
šäœïŒãããŒãã£ã§ããããšãå€æããŸããã
Pythonã§ã®è¡šç€ºã¯æ¬¡ã®ãšããã§ããããããŒã«ã¯äœããã®ããžãã¹ããžãã¯ãããããã®ãã¬ãŒãã®å®£èšçãªèª¬æãããã«ãããŸãã åããªã¹ããããŸããé¢ä¿ã ããã«ãã®ãããªã¯ã©ã¹ããããŸãã
ãã¡ãããå®å®é£è¡å£«ã®èŠ³ç¹ããèŠããšãæ±ããAPIã¯æ¬ ç¹ã§ãã ããŒã¹ã®å®£èšçèšè¿°ã«ãããããžãã¹ããžãã¯ã ã¹ããŒã ã¯ããžãã¹ããžãã¯ãšæ··åšããŠããŸãã ãµãã glyãã
åè·¯ã®èª¬æã¯ä¹±éã§ãã ããã¯å®éã«ã¯åé¡ã§ããããžãã¹ããžãã¯ã«2è¡ããªããããªã¥ãŒã ã倧ããå Žåããã®ã¯ã©ã¹ã§ã¯ãç¹å®ã®èª¬æã«å°éããããã«éåžžã«é·ãæéã¹ã¯ããŒã«ãŸãã¯æ€çŽ¢ããå¿
èŠããããŸãã ãã以åã¯ããã¹ãŠãçŸãããã®ã§ãããããå Žæã§ã¯ãããŒã¹ã®èª¬æã宣èšãã¹ããŒã ã®èª¬æãå¥ã®å Žæã§ã¯ããžãã¹ããžãã¯ã§ãã ãããŠãåè·¯ãä¹±éã«ãªããŸãã
ããããäžæ¹ã§ãé¬éè¡ã®ã¡ã«ããºã ã¯ããã«åŸãããŸããäœæ¥åäœãã©ã®ãªããžã§ã¯ããæ±ããŠããããã©ã®ãªã¬ãŒãæŽæ°ããå¿
èŠããããã远跡ã§ããŸãã é¢é£ããã³ã¬ã¯ã·ã§ã³ãæºããããŠããããšã確èªããã«ãããŒã¿ããŒã¹å
ã®è¿œå ã®è³ªåãåãé€ãããšãã§ããé¢ä¿ãååŸããŸãã ãããŠãç§ãã¡ãæãå©ããŠãããã¢ã€ãã³ãã£ãã£ãããã ã¢ã€ãã³ãã£ãã£ãããã¯ã2ã€ã®Pythonãªããžã§ã¯ããåãäž»ããŒãæã€å ŽåãåãPythonãªããžã§ã¯ãã«ãªãããã«ããŸãã
ãããã£ãŠãããã«è€éããç·åœ¢ã«æžãããŸããã
ãããã¯äžéçµæã§ãã ããã©ãŒãã³ã¹ã¯ããã«10åã«ãªããããŒã¿ããŒã¹ãžã®ã¯ãšãªã®æ°ã¯çŽ40ã80åã«æžå°ããRPSã¯1ã5ã«å¢å ããŸããã ããã§ãã ããããAPIã¯æ±ããŠããŸãã ã©ããã
ããã¯ã¹ã€ã³ã ããžãã¹ããžãã¯ã䜿çšããåã³ããããŒããåé€ããŸãããå床ãããã³ã°ãè¡ãããªãããã«ãé¬éè¡å
éšã®ããããŒãmixinããç¶æ¿ããŸãã ãªãéã«ããªãã®ã§ããïŒ ããã¯é¬éè¡ã§ã¯æ©èœããŸããã圌女ã¯èªããšèšããŸãïŒã1ã€ã®ã¿ãã¬ãããåç
§ãã2ã€ã®ç°ãªãã¯ã©ã¹ããããå€åœ¢æ§ã¯ãããŸãã-ããããè¡ããŸããã ãããŠ-ããã¯å¯èœã§ãã
ãããã£ãŠãMixinããç¶æ¿ããããã¹ãŠã®ããžãã¹ããžãã¯ãåãåã宣èšçãªèšè¿°ãããããŒã«ãããŸãã ãšãŠãå¿«é©ã§ãã ãããŠãæ®ãã®ã¯ã©ã¹ã¯ãŸã£ããåãã§ãã ããã¯æããŸã-ã¯ãŒã«ããã¹ãŠããããã§ãã ãã ãã泚æç¹ã1ã€ãããŸããæ¥ç¶ãšãªã¬ãŒã¯é¬éè¡ã®äžã«æ®ããããšãã°ãäžéãã¬ãŒãã®ã»ã«ã³ããªããŒãã«ãä»ããŠçµåãããšããã®ãã¬ãŒãã®ããããŒãã¯ã©ã€ã¢ã³ãã³ãŒãã«äœããã®åœ¢ã§ååšããããšã«ãªããŸãã
é¬éè¡ã¯ãç§ã«ãããšæŠãæ©äŒãäžããªãã£ãããããã»ã©è¯ããæåãªãã¬ãŒã ã¯ãŒã¯ã§ã¯ãªãã£ãã§ãããã
ããã¯ã¹ã€ã³ã¯ã©ã®ããã«èŠããŸããã 圌ã¯ãããžãã¹ããžãã¯ãããããŒãåå¥ã«ããã¬ãŒãã®å®£èšçãªèª¬æãæã£ãŠããŸãã æ¥ç¶ã¯é¬éè¡å
ã«æ®ããŸãããããžãã¹ããžãã¯ã¯å¥ã§ãã
äžè¬çãªã¢ãŠãã©ã€ã³ã¯ã©ã®ããã«èŠããŸããïŒ
ãã¹ãŠã®å®£èšã¯ã©ã¹ãåéãããã¹ããŒã ãæã€ãã¡ã€ã«ããããŸã-schema.pyãšåŒã³ãŸãããã ãŸããããžãã¹ããžãã¯ã«ã¯åå¥ã«ãšã³ãã£ãã£ããããŸãã ãŸãããããã®ãšã³ãã£ãã£ã¯ã¹ããŒããã¡ã€ã«å
ã§ç¶æ¿ãããŸããåãšã³ãã£ãã£ã«åå¥ã®ã¯ã©ã¹ãäœæããã¹ããŒãã§ç¶æ¿ããŸãã ãããã£ãŠãããžãã¹ããžãã¯ã¯1ã€ã®ããŒãã«ãããã¹ããŒã ã¯å¥ã®ããŒãã«ãããç¬ç«ããŠå€æŽã§ããŸãã
æ¹åã®äŸãšããŠãã¬ã·ãŒããŒïŒReceiverããŒãã«ïŒãšæ§æã®ã¹ã©ã€ã¹ïŒReceiverPlanesããŒãã«ïŒã®2ã€ã®ã©ãã«ã®åçŽãªã¹ããŒã ãæ€èšããŸãã æ§æã®å€å¯Ÿ1ã¹ã©ã€ã¹ã¯ãã¬ã·ãŒãã©ãã«ã«é¢é£ä»ããããŠããŸãã ç¹ã«è€éãªããšã¯ãããŸããã
é¬éè¡ã®ãæ±ããã€ã³ã¿ãŒãã§ãŒã¹å
ã«é¢ä¿ãé ãããã«ãé¢ä¿ãšã³ã¬ã¯ã·ã§ã³ã䜿çšããŸãã
ããã«ãããããããŒãã¯ã©ã€ã¢ã³ãã³ãŒãããé ãããšãã§ããŸãã
ç¹ã«ãéåžžã«äŸ¿å©ãª2ã€ã®ã³ã¬ã¯ã·ã§ã³ã¯association_proxyãšattribute_mapped_collectionã§ãã ããããäžç·ã«äœ¿çšããŸãã é¬éè¡ã«ãããå€å
žçãªé¢ä¿ã®ä»çµã¿ïŒé¢ä¿ããããŸã-ããã¯ç¹å®ã®ã³ã¬ã¯ã·ã§ã³ããªã¹ããããããŒã§ãã ããããŒã¯é 端ã®é¢ä¿ãªããžã§ã¯ãã§ãã Attribute_mapped_collectionã䜿çšãããšããã®ãªã¹ããèŸæžãããããŒã®å±æ§ã®äžéšãšãªãããŒãå€ã¯ããããŒèªäœã«çœ®ãæããããšãã§ããŸãã
ãããæåã®ã¹ãããã§ãã
2çªç®ã®ã¹ãããã§ã¯ããã®é¢ä¿ã«å¯ŸããŠassociation_proxyãå®è¡ããŸãã ããããŒãã³ã¬ã¯ã·ã§ã³ã«æž¡ãã®ã§ã¯ãªããåŸã§ããããŒã®ReceiverPlanesãåæåããããã«äœ¿çšãããå€ãæž¡ãããšãã§ããŸãã
ããã«ããŒãšå€ãæž¡ãã©ã ãããããŸãã ããŒã¯æ§æã¹ã©ã€ã¹ã®ååã«å€ãããå€ã¯æ§æã¹ã©ã€ã¹ã®å€ã«å€ãããŸãã ãã®çµæãã¯ã©ã€ã¢ã³ãã³ãŒãã§ã¯ããã¹ãŠã次ã®ããã«ãªããŸãã
ããçš®ã®ãã£ã¯ããŒã·ã§ã³ãããçš®ã®èŸæžã«å
¥ããã ãã§ãã ããããŒãé¬éè¡ãããŒã¿ããŒã¹ããããŸããã
確ãã«ãèœãšãç©ŽããããŸãã
åãããŒã«ç°ãªãå€ãŸãã¯1ã€ã®å€ã2åå²ãåœãŠããšããã®ãããªã»ããé
ç®ããšã«lambdaãåŒã³åºããããªããžã§ã¯ããäœæãããŸã-ããããŒã ãŸããã¹ããŒã ã®æ§é ã«å¿ããŠããå®æ°ã®åãªãéåãããäºæž¬äžå¯èœãªçµæãŸã§ãããŸããŸãªçµæã«ã€ãªããå¯èœæ§ããããŸãã ããšãã°ãã³ã¬ã¯ã·ã§ã³ãããªããžã§ã¯ããåé€ããŸãããããªããžã§ã¯ãã¯ãŸã æ®ã£ãŠããŸãã1ã€ã ãåé€ããŸããã ç§ãæåã«å§ãããšããç§ã¯ãã®ãããªããšã§å€ãã®æéã殺ããŸããã
å°ãæé»çãªåæã Association_proxyãšattribute_mapped_collectionã¯å°ãé
ããå ŽåããããŸããããããŒãªããžã§ã¯ããäœæãããšãããŒã¿ããŒã¹ã«è¿œå ãããŸãããã³ã¬ã¯ã·ã§ã³å±æ§ã«ã¯ãŸã ååšããŸããã ãã®ã»ãã·ã§ã³ã§å±æ§ã®æå¹æéãåããå Žåã«ã®ã¿è¡šç€ºãããŸãã æå¹æéãåãããšãããŒã¿ããŒã¹ãšã®æ°ããåæãçºçããããã«å°éããŸãã
ãããå
æããããã«ãç§ãã¡ã¯ç¬èªã®èªå·±èšè¿°ã³ã¬ã¯ã·ã§ã³ã䜿çšããŸããã ããã¯é¬éè¡ã§ãããããŸãã-ããããã¹ãŠå
æããããã«ããªãèªèº«ã®ã³ã¬ã¯ã·ã§ã³ãäœæããããšãã§ããŸãã
ããã«ã³ãŒãããããæãéèŠãªé åã匷調衚瀺ãããŠããŸãã ãã¥ãŒãå¯èœãªãããã³ã°ããç¶æ¿ããç¹å®ã®ã³ã¬ã¯ã·ã§ã³ããããŸããããã¯ããŒã§å€ãå€æŽã§ããèŸæžã§ãã ãããŠã_get_plane_objã¡ãœããããããŸã-æ§æã¹ã©ã€ã¹ãªããžã§ã¯ããååŸããŸãã
ããã§ã¯ãåçŽãªããšãè¡ããŸããååãäž»ããŒã«ãã£ãŠååŸããããã§ãªãå Žåã¯ããã®ãªããžã§ã¯ããäœæããŠè¿ããŸãã
次ã«ã2ã€ã®ã¡ãœãã__setitem__ãš__getitem__ã®ã¿ãåå®çŸ©ããŸã
__setitem__ã§ã¯ããããã®ãªããžã§ã¯ããã³ã¬ã¯ã·ã§ã³å
ã®é¢ä¿ã«é
眮ããŸãã å¯äžã®ããšã¯ãæåŸã«å€ãå²ãåœãŠãããšã§ãã ãããã£ãŠãassociation_proxyãšåãã¡ã«ããºã ãå®è£
ããŸããå€dictãæž¡ãã察å¿ããå±æ§ã«å²ãåœãŠãŸãã
__getitem__ã¯éã®æäœãè¡ããŸãã ããŒã«ãã£ãŠãªã¬ãŒãããªããžã§ã¯ããåãåãããã®å±æ§ãè¿ããŸãã ããã«ãå°ããªèœãšãç©ŽããããŸã-ãããã³ã°å
ã§ã³ã¬ã¯ã·ã§ã³ããã£ãã·ã¥ãããšãå°ãåæãåããªããªãå¯èœæ§ããããŸãã ã³ã¬ã¯ã·ã§ã³ã®å±æ§ãé¬éè¡ã§æéåãã«ãªããšãã³ã¬ã¯ã·ã§ã³ã¯æéåãåŸã«å¥ã®ã³ã¬ã¯ã·ã§ã³ã«çœ®ãæããããããã§ãã ãããã£ãŠãå€ãã³ã¬ã¯ã·ã§ã³ãžã®åç
§ãä¿æããå€ãã³ã¬ã¯ã·ã§ã³ã®æå¹æéãåããŠæ°ããã³ã¬ã¯ã·ã§ã³ããã§ã«åºçŸããŠããããšãç¥ãããšã¯ã§ããŸããã ãããã£ãŠãæåŸã®éšåã§ã¯ãé¬éè¡ã®ã€ã³ã¹ã¿ã³ã¹ã«çŽæ¥ç§»åããåã³__getattr__ãä»ããŠã³ã¬ã¯ã·ã§ã³ãååŸããããã䜿çšããŠ__getitem__ãå®è¡ããŸãã ã€ãŸããããã§Planesã³ã¬ã¯ã·ã§ã³ããã£ãã·ã¥ããããšã¯ã§ããŸããã
ãã®ã³ã¬ã¯ã·ã§ã³ã¯ãããã¯ã¹ã€ã³ã§ã©ã®ããã«å¹³ææã¡ãããŸããïŒ ãã€ãã®ããã«-ã³ã¬ã¯ã·ã§ã³ã®å±æ§ãéå§ããŸãã å¯äžã®èå³æ·±ãå Žæã¯ãããŒã¿ããŒã¹ããã€ã³ã¹ã¿ã³ã¹ãããŒããããšãã«__init__ã¡ãœãããåŒã³åºãããªãããšã§ãã ãã¹ãŠã®å±æ§ã¯äºåŸçã«çœ®æãããŸãã
Alchemyã¯æšæºã®åæ§ç¯ãã³ã¬ãŒã¿ãæäŸããŸãããã®ãã³ã¬ãŒã¿ã䜿çšãããšãããŒã¿ããŒã¹ãããªããžã§ã¯ããããŒãããåŸã«ã¡ãœãããåŒã³åºãããããã«ããŒã¯ã§ããŸãã ãããŠãèµ·åæã«ã³ã¬ã¯ã·ã§ã³ãåæåããå¿
èŠããããŸãã Selfã¯ãŸãã«ãã®ã€ã³ã¹ã¿ã³ã¹ã§ãã 䜿çšæ¹æ³ã¯ãåã®äŸãšãŸã£ããåãã§ãã
ãããããã®ã¹ããŒã ã§ã¯ãããŒã¿ããŒã¹ã®è³ã¯ãŸã èŠããŠããŸã-ãããèšå®ã§ãã ã©ã®ã¿ã€ãã®æ§æã§ããïŒ ããã¯varcharã§ããããããšãblobã§ããïŒ å®éãã¯ã©ã€ã¢ã³ãã¯èå³ããããŸããã 圌ã¯èªåã®ã¬ãã«ã®æœè±¡çãªãšã³ãã£ãã£ã§äœæ¥ããå¿
èŠããããŸãã ãã®ããã«ãé¬éè¡ã¯åã®è£
食ãæäŸããŸãã
ç°¡åãªäŸã ããŒã¿ããŒã¹ã¯ãIPAddressãvarcharãšããŠä¿åããŸãã
é¬éè¡ã®äžéšã§ããTypeDecoratorã¯ã©ã¹ã䜿çšããŸããããã¯ããŸãããã®ã¿ã€ãã«äœ¿çšããåºã«ãªãããŒã¿ããŒã¹ã¿ã€ããæå®ãã次ã«ãå€ãããŒã¿ããŒã¹ã¿ã€ãã«å€æããprocess_bind_paramãšå€ãæå®ãããšãã«process_result_valueãå®çŸ©ããŸãããŒã¿ããŒã¹ã®ã¿ã€ããããPythonãªããžã§ã¯ãã«å€æããŸããã¢ãã¬ã¹ããã®å±æ§ã¯ãPythonã¿ã€ãIPAddressãåããŸãããããŠããã®ã¿ã€ãã®ã¡ãœãããåŒã³åºãããšãããã®ã¿ã€ãã®ãªããžã§ã¯ããããã«å²ãåœãŠãããšãã§ãããã¹ãŠãæ©èœããŸãããããŠãããã¯ããŒã¿ããŒã¹ã«ä¿åãããŸã...äœãä¿åãããŠããã®ãããããŸããããvarcharïŒ45ïŒã§ããããã®è¡ã眮ãæãããšblobãä¿åãããŸãããŸãã¯ãäžéšã®ãã€ãã£ãã¿ã€ããIPã¢ãã¬ã¹ããµããŒãããŠããå Žåã¯ãããã䜿çšã§ããŸããã¯ã©ã€ã¢ã³ãã³ãŒãã¯ããã«äŸåãããæžãæããå¿
èŠã¯ãããŸããããã1ã€ã®èå³æ·±ãç¹ã¯ãããŒãžã§ã³ãããããšã§ãããªããžã§ã¯ããå€æŽãããšããã«ãããŒãžã§ã³ãããã«å¢å ããããã«ããŸããããŒãžã§ã³ã«ãŠã³ã¿ãŒãããããªããžã§ã¯ããå€æŽããŸãããå€æŽãããããŒãžã§ã³ãå¢å ããŸãããå¿ããªãããã«ãããèªåçã«è¡ããŸãããã®ããã«ãã€ãã³ãã䜿çšããŸãããã€ãã³ãã¯ãããããŒã®äººçã®ããŸããŸãªæ®µéã§çºçããã€ãã³ãã§ãããå±æ§ãå€åãããšãã«ããªã¬ãŒã§ããŸããããšãã°ããäœææžã¿ãããããŒã¿ããŒã¹ã«ä¿åæžã¿ãããããŒã¿ããŒã¹ããããŒãæžã¿ãããåé€æžã¿ããŸããã»ãã·ã§ã³ã¬ãã«ã®ã€ãã³ãã§ãSQLã³ãŒããããŒã¿ããŒã¹ã«çºè¡ãããåãã³ãããåãã³ãããåŸãããŒã«ããã¯åŸãAlchemyã§ã¯ãããããã¹ãŠã®ã€ãã³ãã«ãã³ãã©ãŒãå²ãåœãŠãããšãã§ããŸãããåãã€ãã³ãã«å¯ŸããŠãã³ãã©ãŒãå®è¡ãããé åºã¯ä¿èšŒãããŸãããã€ãŸããããã¯å
·äœçã§ãããã©ããããã£ãŠããã®ãã¯ããããŸããããããã£ãŠãå®è¡é åºãéèŠãªå Žåã¯ãç»é²ã¡ã«ããºã ãå®è¡ããå¿
èŠããããŸãã以äžã«äŸã瀺ããŸãã
ããã§ã¯3ã€ã®ã€ãã³ãã䜿çšãããŸããon_before_flush-SQLã³ãŒããããŒã¿ããŒã¹ã«éä¿¡ãããåã«ããã®ã»ãã·ã§ã³ã§é¬éè¡ãããŒãã£ãšããŒã¯ãããã¹ãŠã®ãªããžã§ã¯ãã調ã¹ããã®ãªããžã§ã¯ããå€æŽãããŠãããã©ããã確èªããŸããé¬éè¡ããã§ã«ãã¹ãŠãããŒã¯ããŠããã®ã«ããªããããå¿
èŠãªã®ã§ããïŒ Alchemyã¯ãäœããã®å±æ§ãå€æŽããããšããã«ãªããžã§ã¯ããããŒãã£ããŒã¯ããŸãããã®å±æ§ã«åãå€ãå²ãåœãŠãå ŽåãããŒãã£ãšããŠããŒã¯ãããŸãããã®ããã®is_modifiedã»ãã·ã§ã³ã¡ãœããããããŸã-å
éšã§äœ¿çšããããããæç»ããŸããã§ãããããã«ãã»ãã³ãã£ã¯ã¹ã®èŠ³ç¹ãããããžãã¹ããžãã¯ã®èŠ³ç¹ãããå±æ§ãå€æŽãããå Žåã§ãããªããžã§ã¯ãã¯å€æŽãããªããŸãŸã§ããããšãã°ã2ã€ã®èŠçŽ ã亀æãããç¹å®ã®ãªã¹ãããããŸããé¬éè¡ã®èŠ³ç¹ãããå±æ§ãå€æŽãããŸããããããžãã¹ããžãã¯ã«ãšã£ãŠã¯ãããšãã°ããçš®ããããŠæåŸã«ãåãªããžã§ã¯ãã«åºæã®å¥ã®ã¡ãœãããåŒã³åºããŠããªããžã§ã¯ããå€æŽãããŠãããã©ãããç解ããŸãããããŠãç§ãã¡ãèªåã§ç«ã¡äžããã»ãã·ã§ã³ã«é¢é£ä»ããããç¹å®ã®å€æ°ã«ããããè¿œå ããŸã-ããã¯ããã®ãªããžã§ã¯ããè¿œå ããdirty_instanceså€æ°ã§ãã次ã®ã€ãã³ãã¯ãã³ãããã®åã«çºçããŸã-before_commitãããã«ãå°ããªèœãšãç©ŽããããŸãïŒãã©ã³ã¶ã¯ã·ã§ã³å
šäœã§åäžã®ãã©ãã·ã¥ããªãå Žåããã©ãã·ã¥ã¯ã³ãããã®åã«åŒã³åºãããŸã-ç§ã®å Žåããã³ãã©ã¯ãã©ãã·ã¥ã®åã«ã³ãããã®åã«åŒã³åºãããŸãããã芧ã®ãšãããåã®æ®µèœã§è¡ã£ãããšã¯åœ¹ã«ç«ããªãå¯èœæ§ããããsession.dirty_instancesã¯ç©ºã«ãªããŸãããã®ããããã³ãã©ãŒå
ã§å床ãã©ãã·ã¥ãå®è¡ãããã¹ãŠã®ãã³ãã©ãŒããã©ãã·ã¥ã®åã«åŒã³åºãããããŒãžã§ã³ã1ãã€ã€ã³ã¯ãªã¡ã³ãããã ãã§ããafter_commitãafter_soft_rollback-ã³ãããåŸã次åã®è¶
éãçºçããªãããã«ã¯ãªãŒã³ã¢ããããŸãããããã£ãŠããã®install_handlerã¡ãœããã¯3ã€ã®ã€ãã³ãã®ãã³ãã©ãŒãäžåºŠã«ã€ã³ã¹ããŒã«ããŸããããã¯ã¯ã©ã¹ã®ã€ãã³ãã§ãããããã¯ã©ã¹ãšããŠãããã§ã»ãã·ã§ã³ãæž¡ããŸããããããã«ã
ç§ãã¡ãéæããããšãæãåºããŠãã ãã-è€éã§å€§èŠæš¡ãªããŒã ã®å Žåã¯30ã40ç§ã®é床ããã¹ãŠã§ã¯ãããŸããããRPSã§ç¢ºèªã§ããããã«ã1ç§ã§å®äºãããã®ãããã°ã200ããªç§ã§å®äºãããã®ããããŸããããŒã¿ããŒã¹ã¯ãšãªã¯æ°çŸã«ã«ãŠã³ãããå§ããŸãããçµæã¯ãããªããã©ã³ã¹ã®åããã·ã¹ãã ã§ãããã ããèŠåã1ã€ãããŸãããç§ãã¡ã®ãªã¯ãšã¹ãã®ããã€ãã¯ããããã§æåºãããŸããã€ãŸããçŽ30ã®ãªã¯ãšã¹ããå°çããããããããã®ãããªãã®ã§ãïŒ ïŒè©±è
ã¯èŠªæã瀺ããŸãïŒäžåºŠã«1ç§ãã€åŠçãããšããã¥ãŒå
ã®æåŸã®èŠæ±ã¯30ç§éæ©èœããŸããæåã®ãã®ã2çªç®ã®ãã®ããªã©ããããã£ãŠããŸã å éããå¿
èŠããããŸããã©ãããïŒå®éãé¬éè¡ã«ã¯2ã€ã®éšåããããŸãã 1ã€ç®ã¯ãSQLAlchemy CoreãšåŒã°ããsqlããŒã¿ããŒã¹ã®æœè±¡åã§ãã 2çªç®ã¯ORMã§ããããã¯ããªã¬ãŒã·ã§ãã«ããŒã¿ããŒã¹ãšãªããžã§ã¯ãè¡šçŸã®éã®å®éã®ãããã³ã°ã§ãããããã£ãŠãé¬éè¡ã®ã³ã¢ã¯sqlãšã»ãŒ1察1ã§äžèŽããŸããåŸè
ãç¥ã£ãŠããã°ãã³ã¢ã«åé¡ã¯ãããŸããã SQLãããããªãå Žåã¯ãSQLãåŠãã§ãã ãããããã«ãã³ã¢ã¯æå°ã®ãªãŒããŒããããè¡šããŸãããã³ãã³ã°ã¯å®è³ªçã«ãããŸãããã¯ãšãªã¯ã¯ãšãªãžã§ãã¬ãŒã¿ã䜿çšããŠçæãããå®è¡ãããŸãã dbapiã®ãªãŒããŒãããã¯æå°éã§ããã©ããªè€éãªãªã¯ãšã¹ãã§ããã©ããªã¿ã€ãã§ãäœæã§ããã¿ã¹ã¯ã«åãããŠæé©åã§ããŸããã€ãŸããäžè¬çãªå ŽåãããŒã¿ããŒã¹ã¹ããŒãã®æ§ç¯æ¹æ³ãORMãæ°ã«ããªãå ŽåãããŒãã«ã®èª¬æãããã€ãããå Žåãã¯ãšãªãçæããŸãããã®å Žåãããšãã°ããããããå¥ã®å Žæãããããããéžæããã®ãæé©ã§ããããšãç¥ããŸãããã£ã«ã¿ãŒãé©çšãããšãå¥ã®ãã£ã«ã¿ãŒããããããã§ã¿ã¹ã¯ã®ãªã¯ãšã¹ããäœæã§ããŸããæ¬ ç¹ã¯ãæåã§ã®åæã«æ»ã£ãããšã§ãããã¹ãŠã®ã€ãã³ãããªã¬ãŒ-ã³ã¢å
ã®ãã¹ãŠãæ©èœããŸãããç§ãã¡ã¯éžæãè¡ãããªããžã§ã¯ããæ¥ãŠããããã䜿ã£ãŠäœããããŠãããæŽæ°ãæ¿å
¥...ããªãã¯èªåã®æã§ããŒãžã§ã³ãå¢ãããå®æ°ããã§ãã¯ããå¿
èŠããããŸããã³ã¢ã§ã¯ãããããã¹ãŠãé«ã¬ãã«ã§äŸ¿å©ã«è¡ãããšã¯ã§ããŸããããŸããç§ãã¡ã¯æåã®æ¥ã¯çããŠããŸãããã·ã³ãã«ãªãŠãŒã¹ã±ãŒã¹ãåããããŒã«ã¯ãã³ã¢ã§äœ¿çšããã__table__ãªããžã§ã¯ããå
éšçã«å«ãŸããŠããŸãã次ã«ãéåžžã®éžæãè¡ããåããªã¹ããã2ã€ã®ãã¬ãŒããçµåããå·Šå³ã瀺ããã©ã®æ¡ä»¶ã§çµåãããã瀺ããŸãã次ã«ããã®çæããããªã¯ãšã¹ããã»ãã·ã§ã³ã«éããå埩å¯èœãªãªããžã§ã¯ããè¿ããŸããã¿ããå¯èœãªãªããžã§ã¯ãã«ã¯ãååãšçªå·ã®äž¡æ¹ã§ã€ã³ããã¯ã¹ãä»ããããŸããçªå·ã¯ãéžæã«ãªã¹ããããŠããé åºã«å¯Ÿå¿ããŠããŸãããã£ãšè¯ããªããŸãããææªã®å Žåã®ããã©ãŒãã³ã¹ã¯2ã4ç§ã«äœäžããæãè€éã§é·ãèŠæ±ã«ã¯14åã®ã³ãã³ããšRPS 10ã15ãå«ãŸããŠããŸããããã£ããããŠããŸããçµè«ãšããŠç§ãèšãããããšãå¿
èŠã®ãªãå Žæã§ã¯ãšã³ãã£ãã£ãäœæããªãã§ãã ãããæºåãæŽã£ãŠããå Žæã§ãšã³ãã£ãã£ãå°ç¡ãã«ããªãã§ãã ãããSQLA ORMã䜿çšãã-ããã¯éåžžã«äŸ¿å©ãªããŒã«ã§ãã€ãã³ããé«ã¬ãã«ã§è¿œè·¡ããããŒã¿ããŒã¹ã«é¢é£ä»ããããããŸããŸãªã€ãã³ãã«å¿çããé¬éè¡ã®è³ããã¹ãŠé ãããšãã§ããŸããä»ã®ãã¹ãŠã倱æããå Žåãããã©ãŒãã³ã¹ã¯ååã§ã¯ãããŸãã-SQLA Coreã䜿çšããŠãã ãããããã¯ãããŒã¿ããŒã¹ã«å¯Ÿãããªã¬ãŒã·ã§ãã«æœè±¡åãæäŸãããããçŽç²ãªçSQLã䜿çšãããããåªããŠããŸãããã©ã¡ãŒã¿ãèªåçã«ãšã¹ã±ãŒããããã€ã³ããŒãæ£ããå®è¡ããŸããã©ã®ããŒã¿ããŒã¹ããã®äžã«ãããã¯é¢ä¿ãããŸãããå€æŽããããšãã§ããCoreã¯ããŸããŸãªæ¹èšããµããŒãããŠããŸãããšãŠã䟿å©ã§ããä»æ¥ã¯ããã ããäŒãããã£ãã®ã§ãã