Database
æ°åãã§å®è£ ãã©ããããããã§ãã ãã®è¨äºã¯ Rust Advent Calendar 2023 ã®6æ¥ç® å ¼ æ å ±æ¤ç´¢ã»æ¤ç´¢æè¡ Advent Calendar 2023 ã® 6 æ¥ç®ã§ãã Rust 㧠SQLite ããã«ã¹ã¯ã©ããã§å®è£ ãã¦ãã¾ãã github.com ãªã SQLite ã Rust ã§åå®è£ ãããã¨æâ¦
å¾æ¹äºææ§ã£ã¦è¾ãããã©ããããããã§ãã æè¿ Rust 㧠SQLite ããã«ã¹ã¯ã©ããã§åå®è£ ãã¦ãã¾ãã github.com åå®è£ ããããã« SQLite ã®å ¬å¼ããã¥ã¡ã³ããã½ã¼ã¹ã³ã¼ããèªã¿è¾¼ãã§ããããã§ããããã®éç¨ã§æ°ä»ãããããããã¤ã³ããå ±æããâ¦
åã¯åãã©ããããããã§ããSQLite ã§ã¯åã¯çµ¶å¯¾ã§ã¯ãªããããã¾ã§ãå°éã§ããä¿¡ç¨ããããã¨è£åããã¾ãã æè¿ Rust 㧠SQLite ããã«ã¹ã¯ã©ããã§åå®è£ ãã¦ãã¾ãã github.com ãªãã¹ãæ¬å®¶ã® SQLite 㨠compatible ã«ããããã« SQLite ã®ããã¥â¦
å°ã£ãæã¯ããã¥ã¡ã³ããã©ããããããã§ããæè¿ã諸äºæ 㧠SQLite ã®ããã¥ã¡ã³ããèªãã§ãã¾ãã ååã®è¨äº ã§ç´¹ä»ããéã SQLite ã Rust ã§åå®è£ ãã¦ãã¾ããããããã¾ã§ 300 ãè¶ ãã Github Star ãããã ãå¬ããã§ãã github.com SQLite ã¯â¦
ã»ãã¥ãªãã£ãç¾ã«ä¸ç¹çªç ´ãã©ããããããã§ããæè¿ Rust 㧠SQLite ãå®è£ ãã¦ã¾ãã 以åã®è¨äºã§ HTTP Parser ã Rust ã§å®è£ ãããã¨ãããã®ã®ããã§ã«å®è£ ããã¦ããã®ã§æ念ãã¾ããããããé¡æãè¦ã¤ãã¾ãããSQLite ã§ããéçºä¸ã®ãªãã¸ããªâ¦
ä¸æ©ãã¤ä¸æ©ãã¤åã¸é²ãã§ããã確å®ã«ãã©ãããããããã§ãã å°åº 1 è¨äºã«åã¾ããããªå 容ã§ã¯ãªãé·ãã®ã§ããã©ã³ã¶ã¯ã·ã§ã³ã®ä½ãæ¹ã«èå³ã®ãªãæ¹ã¯éä¸ã®ããªã Go ãªã®ããã¾ã§èªãã§ããã ããã°å¬ããã§ãã ãã®è¨äºã¯ãGo2 Advent Calendaâ¦
é çªã¯å®ãã¾ããããã©ãããããããã§ãããã©ã³ã¶ã¯ã·ã§ã³ãå®è£ ä¸ã§ãã ãã¦ãå æ¥ãã©ã³ã¶ã¯ã·ã§ã³ã®ä¸¦è¡å¶å¾¡ã¢ã«ã´ãªãºã ã§ãããS2PL (Strict Two Phase Lock)ããå®è£ ãã 1 ã®ã§ãããRead ãªãã¬ã¼ã·ã§ã³ã§ã¯ Read Lock ãåã£ãå¾ã«ããã«è§£æ¾â¦
ãã©ã³ã¶ã¯ã·ã§ã³ã¯æ éã«ãã©ãããããããã§ããä»ãã©ã³ã¶ã¯ã·ã§ã³ãå®è£ ãã¦ãã¾ãã ã¿ã¤ãã«ã¯é£ãã§ããMySQL ã®ããã©ã«ãã®ãã©ã³ã¶ã¯ã·ã§ã³åé¢ã¬ãã«ã§ãã REPEATABLE READ ã§ã®è©±ã§ããå¾ã確ããã訳ã§ã¯ãªãã§ãã MySQL ã«éã£ã話ã§ã¯ãªãâ¦