2021-09-01ãã1ã¶æéã®è¨äºä¸è¦§
ãã¼ã¿ãã¼ã¹ãµã¼ãã®éåæã¬ããªã±ã¼ã·ã§ã³æ©è½ãå®è£ ãããããã®ãããã³ã«ã¨å®è£ ã®è©³ç´°ã«ã¤ãã¦è¿°ã¹ã¤ã¤ã妥å½æ§ã«ã¤ãã¦æ¤è¨¼ããããé常ã«ç´°ããã¦éç®±ãã¤ã¤ã話ã«ãªãããç¥ã¯å§ç´°ã«å®¿ãã¨ãè¨ããããªããããã«ã§ããªããã¨ã°ããã ã
ã¤ãã«ããã¼ã¿ãã¼ã¹ãµã¼ãTkrzw-RPCã«éåæã¬ããªã±ã¼ã·ã§ã³æ©è½ãã¤ããããã¹ã¿ã»ã¹ã¬ã¼ãæ§æã ãã§ãªãããã¥ã¢ã«ãã¹ã¿æ§æããµãã¼ããã¦ããªã³ã©ã¤ã³ã·ã¹ãã ã®ããã¯ã¨ã³ãã¨ãã¦å©ç¨ã§ããé«å¯ç¨æ§ãåããã·ã¹ãã ã«ãªã£ããTkrzw-RPC-0.9.0ãâ¦
Tkrzw-RPCã®ã¬ããªã±ã¼ã·ã§ã³æ©è½ãå®ç¾ããããã«ãTkrzwæ¬ä½ã«æ´æ°ãã°æ©è½ãã¤ãããæ´æ°ãã°æ©è½ã¯ä»»æã®ã³ã¼ã«ããã¯ãå¼ã³åºãå®è£ ã«ãªã£ã¦ãã¦ãããã«ã¡ãã»ã¼ã¸ãã¥ã¼ãæ¥ç¶ããã¨ããã«ããªã¼ãã§ä»»æã®å¾å¦çãã§ããããã«ãªããä»åã¯ãã¡ãã»â¦
ååã®è¨äºã§ãã¬ããªã±ã¼ã·ã§ã³æ©è½ã®å®è£ ãè¦è¶ãã¦ããã¼ã¿ãã¼ã¹ã®æ´æ°ãã°æ©è½ãè¨è¨ãããå®è£ ãé²ããªããæã£ãã®ã¯ããã¼ã¿ãã¼ã¹ã«æ´æ°ããã£ãæ¨ããã°ã¨ãã¦è¨é²ãã¦ãã¾ããããå¤é¨ã«éç¥ããã¨ããåä½ã¯ãã¡ãã»ã¼ã¸ãã¥ã¼ã¨åãè¦ä»¶ãæã¤â¦
ãã¼ã¿ãã¼ã¹ã®å ç¢æ§ãé«ããããã«ããã¼ã¿ãã¼ã¹æ¬ä½ã¨ã¯å¥ã«æ´æ°å 容ãä¿åãããæ´æ°ãã°ã¨ããææ³ããããããã«ãæ´æ°ãã°ãé次å¥ãµã¼ãã«è»¢éãã¦é©ç¨ããã°ãã¬ããªã±ã¼ã·ã§ã³ãæç«ããããã®è¨äºã§ã¯ãã¬ããªã±ã¼ã·ã§ã³ã«ã使ããæ´æ°ãã°ã®è¦â¦
ã·ã£ã¼ãã£ã³ã°ã«ãã£ã¦ãã¼ã¿ãã¼ã¹ãåå²ãããã¨ã§ãé常éç¨ã®ä¸¦åå¦çæ§è½ãåä¸ããããã¨ãã§ãããããã ãã§ãªããããã¯ã¢ããä½æãªã©ã®ãä»ã®ã¹ã¬ããããããã¯ããããæä½ã®å½±é¿ãæå°éã«çãããã¨ãã§ããããã®éç¨æ¹æ³ã«ã¤ãã¦èª¬æããã
GCCã®ä¸å¯è§£ãªæåã«æ©ã¾ããã¦ããã以ä¸ã®ã³ã¼ãã¯ãè² æ°ãåºåããªããã¨ãæå¾ ããããã-O2以ä¸ã®æé©åãããã¨è² æ°ãåºåããã¦ãã¾ãã #include <cstdint> #include <cstdio> int main(int argc, char** argv) { constexpr uint32_t modulo = 2039; for (int32_t i =</cstdio></cstdint>â¦
ååã®è¨äºã«ã¦ããããåã¨ã¹ããªã¼ã åã«ãã£ã¦gRPCã®æ§è½ãåä¸ãããã¨ã示ãããæ®ãé«éåã®æ段ã¯ãéåæAPIãå©ç¨ãããã¨ã§ãããçµè«ã¨ãã¦ã¯ããµã¼ãå´ã§ã¯éåæAPIãå©ç¨ããã¨æ§è½ãããªãåä¸ããããããå®è£ ããTkrzw-RPC 0.7.1ããªãªã¼ã¹â¦
ååã®è¨äºã§è¿°ã¹ãæ§è½è©ä¾¡ã«ãã£ã¦ãgRPCã«ããæä½ãåä¸ãã·ã³ä¸ãªã2ä¸QPSã®ã¹ã«ã¼ãããã§å®è¡ã§ãããã¨ãåãã£ããããã¯ãã¼ã¿ãã¼ã¹èªä½ã®æ§è½ã«æ¯ã¹ãã¨é ãããã®ã§ãããé«ãã¹ã«ã¼ããããåºããããã«gRPCã®ä½¿ãæ¹ã工夫ããããªããä»åã¯â¦
Tkrzw-RPCã®åºæ¬æ©è½ãå®è£ ããã®ã§ããã¼ã¸ã§ã³0.5.0ããªãªã¼ã¹ãããç°¡æçãªæ§è½æ¸¬å®ããã¦ãgRPCã®ãªã¼ãã¼ãããã«ã¤ãã¦èãã¦ã¿ãã