{"id":47013,"date":"2023-12-11T03:29:18","date_gmt":"2024-01-30T02:20:41","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/gearpump%e7%9a%84%e5%ae%9e%e6%97%b6%e5%a4%84%e7%90%86%e5%9f%ba%e7%a1%80%e6%9e%b6%e6%9e%84%e6%98%af%e5%a6%82%e4%bd%95%e7%bb%84%e6%88%90%e7%9a%84%ef%bc%9f\/"},"modified":"2024-05-04T13:02:31","modified_gmt":"2024-05-04T05:02:31","slug":"gearpump%e7%9a%84%e5%ae%9e%e6%97%b6%e5%a4%84%e7%90%86%e5%9f%ba%e7%a1%80%e6%9e%b6%e6%9e%84%e6%98%af%e5%a6%82%e4%bd%95%e7%bb%84%e6%88%90%e7%9a%84%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/gearpump%e7%9a%84%e5%ae%9e%e6%97%b6%e5%a4%84%e7%90%86%e5%9f%ba%e7%a1%80%e6%9e%b6%e6%9e%84%e6%98%af%e5%a6%82%e4%bd%95%e7%bb%84%e6%88%90%e7%9a%84%ef%bc%9f\/","title":{"rendered":"Gearpump\u7684\u5b9e\u65f6\u5904\u7406\u57fa\u7840\u67b6\u6784\u662f\u5982\u4f55\u7ec4\u6210\u7684\uff1f"},"content":{"rendered":"<p>\u4f60\u597d\u3002<\/p>\n<p>\u7531\u4e8e\u6211\u5df2\u7ecf\u4e86\u89e3\u4e86Gearpump\u7684\u6982\u8981\uff0c\u6240\u4ee5\u8fd9\u6b21\u6211\u6253\u7b97\u770b\u4e00\u4e0b\u5176\u7ec4\u6210\u6982\u89c8\u3002\u6211\u53c2\u8003\u7684\u662fGearpump\u5b98\u7f51\uff0c\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\u89c2\u770b\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Gearpump Basic Concepts<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Gearpump Technical Highlights<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Reliable Message Delivery<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Gearpump Performance Report<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Gearpump Internals<\/ul>\n<p>\u8bf7\u53c2\u8003\u4ee5\u4e0b\u94fe\u63a5\uff1a<br \/>\nhttp:\/\/www.gearpump.io\/<\/p>\n<h1>Gearpump \u57fa\u672c\u6982\u5ff5<\/h1>\n<h3>\u7cfb\u7edf\u65f6\u95f4\u6233\u548c\u5e94\u7528\u7a0b\u5e8f\u65f6\u95f4\u6233<\/h3>\n<p>\u7cfb\u7edf\u65f6\u95f4\u6233\u8868\u793a\u540e\u7aef\u96c6\u7fa4\u7684\u65f6\u95f4\u3002\u5e94\u7528\u7a0b\u5e8f\u65f6\u95f4\u6233\u8868\u793a\u6d88\u606f\u751f\u6210\u7684\u65f6\u95f4\u3002<br \/>\n\u4f8b\u5982\uff0c\u5728\u7269\u8054\u7f51\u8fb9\u7f18\u8bbe\u5907\u4e2d\uff0c\u8bbe\u5907\u751f\u6210\u6d88\u606f\u7684\u65f6\u95f4\u88ab\u79f0\u4e3a\u5e94\u7528\u7a0b\u5e8f\u65f6\u95f4\u6233\u3002<br \/>\n\u540e\u7aef\u5728\u63a5\u6536\u6d88\u606f\u7684\u65f6\u95f4\u5206\u914d\u7684\u65f6\u95f4\u88ab\u79f0\u4e3a\u7cfb\u7edf\u65f6\u95f4\u6233\u3002<\/p>\n<h3>\u5e08\u5085\uff0c\u548c\u5de5\u4eba<\/h3>\n<p>Gearpump\u7531\u4e3b\u4ece\u67b6\u6784\u6784\u6210\u3002\u6bcf\u4e2a\u96c6\u7fa4\u7531\u4e00\u4e2a\u6216\u591a\u4e2a\u4e3b\u8282\u70b9\u548c\u82e5\u5e72\u4e2a\u5de5\u4f5c\u8282\u70b9\u7ec4\u6210\u3002\u5de5\u4f5c\u8282\u70b9\u8d1f\u8d23\u5728\u67d0\u53f0\u673a\u5668\u4e0a\u8fdb\u884c\u8d44\u6e90\u7ba1\u7406\uff0c\u800c\u4e3b\u8282\u70b9\u8d1f\u8d23\u6574\u4e2a\u96c6\u7fa4\u7684\u8d44\u6e90\u7ba1\u7406\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/9-0.png\" alt=\"actor_hierarchy.png\" \/><\/div>\n<h3>\u5e94\u7528\u7a0b\u5e8f<\/h3>\n<p>Application\u5728\u96c6\u7fa4\u4e0a\u4f5c\u4e3a\u5e76\u884c\u6267\u884c\u7684\u5355\u4f4d\u3002\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u6709\u4e0d\u540c\u7684\u7c7b\u578b\u3002\u4f8b\u5982\uff0cMapReduce\u5e94\u7528\u7a0b\u5e8f\u548cStreaming\u5e94\u7528\u7a0b\u5e8f\u90fd\u662f\u4e0d\u540c\u7c7b\u578b\u7684\u5e94\u7528\u7a0b\u5e8f\u3002Gearpump\u4e3b\u8981\u652f\u6301Streaming\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u63d0\u4f9b\u4e86\u521b\u5efa\u7c7b\u4f3cdistributedShell\u8fd9\u6837\u7684\u81ea\u5b9a\u4e49\u7c7b\u578b\u5e94\u7528\u7a0b\u5e8f\u7684\u6a21\u677f\u3002<\/p>\n<h3>\u5e94\u7528\u4e3b\u7ba1\u548c\u6267\u884c\u5668<\/h3>\n<p>\u5728\u5e94\u7528\u7a0b\u5e8f\u5b9e\u4f8b\u7684\u8fd0\u884c\u72b6\u6001\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e2aAppMaster\u548c\u4e00\u4e2aExecutor\u7684\u5217\u8868\u6765\u8868\u793a\u3002AppMaster\u53ef\u4ee5\u4f5c\u4e3a\u547d\u4ee4\u548c\u5e94\u7528\u7a0b\u5e8f\u5b9e\u4f8b\u7684\u63a7\u5236\u4e2d\u5fc3\u3002AppMaster\u4f1a\u4e0e\u7528\u6237\u3001Master\u8282\u70b9\u3001Worker\u8282\u70b9\u548cExecutor\u8fdb\u884c\u901a\u4fe1\u4ee5\u6267\u884c\u5404\u79cd\u547d\u4ee4\u3002\u6bcf\u4e2aExecutor\u90fd\u662f\u6267\u884c\u5206\u5e03\u5f0f\u5e94\u7528\u7a0b\u5e8f\u7684\u5e76\u884c\u5355\u4f4d\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0cAppMaster\u548cExecutor\u4f1a\u4f5c\u4e3a\u5728Worker\u8282\u70b9\u4e0a\u542f\u52a8\u7684JVM\u8fdb\u7a0b\u3002<\/p>\n<h3>\u5e94\u7528\u63d0\u4ea4\u6d41\u7a0b<\/h3>\n<p>\u5f53\u7528\u6237\u5c06\u5e94\u7528\u7a0b\u5e8f\u6295\u5165\u5230\u4e3b\u8282\u70b9\u65f6\uff0c\u4e3b\u8282\u70b9\u4f1a\u67e5\u627e\u53ef\u7528\u7684\u5de5\u4f5c\u8282\u70b9\u5e76\u542f\u52a8\u5e94\u7528\u4e3b\u7ba1\u3002\u5e94\u7528\u4e3b\u7ba1\u542f\u52a8\u540e\uff0c\u4f1a\u5411\u4e3b\u8282\u70b9\u53d1\u51fa\u8bf7\u6c42\uff0c\u8981\u6c42\u542f\u52a8\u6267\u884c\u5668\u4ee5\u83b7\u5f97\u8d44\u6e90\uff08\u5373\u5de5\u4f5c\u8282\u70b9\uff09\u3002\u6b64\u65f6\uff0c\u6267\u884c\u5668\u53ea\u662f\u4ee5\u7a7a\u5bb9\u5668\u7684\u72b6\u6001\u542f\u52a8\u3002\u6267\u884c\u5668\u542f\u52a8\u540e\uff0c\u5e94\u7528\u4e3b\u7ba1\u4f1a\u5c06\u5b9e\u9645\u7684\u8ba1\u7b97\u4efb\u52a1\u5206\u914d\u7ed9\u6267\u884c\u5668\u5e76\u8fdb\u884c\u5e76\u884c\u6267\u884c\u3002<\/p>\n<p>\u5728\u5e94\u7528\u6295\u5165\u65f6\uff0cGearpump\u5ba2\u6237\u7aef\u9700\u8981\u6307\u5b9a\u5728DAG\u4e2d\u5b9a\u4e49\u7684\u8ba1\u7b97\uff0c\u5e76\u5c06\u5176\u63d0\u4ea4\u5230\u6d3b\u52a8\u7684\u4e3b\u8282\u70b9\u4e0a\u3002SubmitApplication\u6d88\u606f\u53d1\u9001\u7ed9\u4e3b\u8282\u70b9\u540e\uff0c\u4f1a\u88ab\u8f6c\u53d1\u7ed9AppManager\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/17-0.png\" alt=\"submit.png\" \/><\/div>\n<p>AppManager\u4f1a\u67e5\u627e\u53ef\u7528\u7684\u5de5\u4f5c\u8282\u70b9\uff0c\u5e76\u5c06AppMaster\u4f5c\u4e3aWorker\u8282\u70b9\u4e0a\u7684JVM\u5b50\u8fdb\u7a0b\u542f\u52a8\u3002AppMaster\u4e0eMaster\u8fdb\u884c\u901a\u4fe1\uff0c\u4ee5\u5206\u914d\u8d44\u6e90\u6765\u6267\u884c\u5e94\u7528\u7a0b\u5e8f\u4e2d\u5b9a\u4e49\u7684DAG\u3002\u5206\u914d\u7684Worker\u8282\u70b9\u5c06\u4f5c\u4e3a\u65b0\u7684JVM\u8fdb\u7a0b\u542f\u52a8\u6267\u884c\u5668\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/19-0.png\" alt=\"submit2.png\" \/><\/div>\n<h3>\u6d41\u5904\u7406\u62d3\u6251\u3001\u5904\u7406\u5668\u548c\u4efb\u52a1<\/h3>\n<p>\u5728\u6d41\u5a92\u4f53\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u6bcf\u4e2a\u5e94\u7528\u7a0b\u5e8f\u90fd\u5305\u542b\u4e00\u4e2a\u62d3\u6251\uff08\u4ee5DAG\u5f62\u5f0f\u63cf\u8ff0\u7684\u6570\u636e\u6d41\uff09\u3002\u62d3\u6251\u4e2d\u7684\u6bcf\u4e2a\u8282\u70b9\u90fd\u662f\u4e00\u4e2a\u5904\u7406\u5668\u3002\u4ee5WordCount\u4e3a\u4f8b\uff0cWordCount\u7531\u4e24\u4e2a\u5904\u7406\u5668Split\u548cSum\u7ec4\u6210\u3002Split\u5904\u7406\u5668\u5c06\u6bcf\u884c\u5206\u5272\u6210\u5355\u8bcd\u5217\u8868\uff0cSum\u5904\u7406\u5668\u5c06\u6bcf\u4e2a\u5355\u8bcd\u7684\u51fa\u73b0\u9891\u7387\u6c47\u603b\u3002<\/p>\n<p>\u5e94\u7528\u7a0b\u5e8f\u662f\u7531\u5904\u7406\u5668\u7684DAG\u7ec4\u6210\u7684\uff0c\u6bcf\u4e2a\u5904\u7406\u5668\u90fd\u5904\u7406\u6d88\u606f\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/22-0.png\" alt=\"dag.png\" \/><\/div>\n<h3>\u6d41\u5f0f\u4efb\u52a1\u548c\u5206\u533a\u5668<\/h3>\n<p>\u5728\u6d41\u5a92\u4f53\u5e94\u7528\u4e2d\uff0c\u4efb\u52a1\u662f\u5e76\u884c\u6267\u884c\u7684\u6700\u5c0f\u5355\u4f4d\u3002\u5728\u6267\u884c\u8fc7\u7a0b\u4e2d\uff0c\u6bcf\u4e2a\u5904\u7406\u5668\u90fd\u88ab\u5e76\u884c\u5316\u4e3a\u4efb\u52a1\u5217\u8868\uff0c\u5e76\u4e14\u4e0d\u540c\u7684\u4efb\u52a1\u4f1a\u5728\u4e0d\u540c\u7684\u6267\u884c\u5668\u4e0a\u6267\u884c\u3002\u540c\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u5b9a\u4e49\u5206\u533a\u5668\u6765\u6307\u5b9a\u4ece\u4e0a\u6e38\u5904\u7406\u5668\u7684\u4efb\u52a1\u53d1\u9001\u6d88\u606f\u5230\u4e0b\u6e38\u5904\u7406\u5668\u7684\u4efb\u52a1\u7684\u5206\u914d\u89c4\u5219\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/25-0.png\" alt=\"shuffle.png\" \/><\/div>\n<h1>Gearpump\u6280\u672f\u4eae\u70b9<\/h1>\n<h3>\u5230\u5904\u90fd\u662f\u6f14\u5458 sh\u00ec<\/h3>\n<p>Actor\u6a21\u578b\u662f\u7531Carl Hewitt\u63d0\u51fa\u7684\u5e76\u53d1\u6a21\u578b\u3002Actor\u6a21\u578b\u4ee5Actor\u4e3a\u5355\u4f4d\u8fdb\u884c\u805a\u5408\uff0c\u5e76\u8868\u73b0\u5f97\u50cf\u88ab\u5916\u90e8Actor\u9694\u79bb\u7684\u5fae\u670d\u52a1\u4e00\u6837\u3002Actor\u662fGearpump\u7684\u57fa\u7840\uff0c\u63d0\u4f9b\u6d88\u606f\u53d1\u9001\u548c\u63a5\u6536\u3001\u9519\u8bef\u5904\u7406\u3001\u5b58\u6d3b\u68c0\u67e5\u7b49\u529f\u80fd\u3002Gearpump\u5728\u5404\u79cd\u529f\u80fd\u4e2d\u4f7f\u7528Actor\uff0c\u4f7f\u96c6\u7fa4\u5185\u7684\u6240\u6709\u5b9e\u4f53\u90fd\u53ef\u4ee5\u4f5c\u4e3a\u670d\u52a1\u6765\u4f7f\u7528\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/29-0.png\" alt=\"actor_hierarchy.png\" \/><\/div>\n<h3>\u7cbe\u786e\u4e00\u6b21\u6d88\u606f\u5904\u7406<\/h3>\n<p>&#8220;Exactly once&#8221;\u5728\u4e2d\u6587\u4e2d\u7684\u5b9a\u4e49\u5982\u4e0b\uff1a<br \/>\n\u5f53\u968f\u6d88\u606f\u800c\u6765\u7684\u64cd\u4f5c\u5728\u8f93\u51fa\u76ee\u6807\u6216\u5c65\u5386\u4e2d\u4ec5\u5904\u7406\u4e00\u6b21\uff0c\u4e14\u4e0d\u4f1a\u5bf9\u540e\u7eed\u7684\u5904\u7406\u4ea7\u751f\u4efb\u4f55\u5f71\u54cd\u3002<br \/>\n\u66f4\u8be6\u7ec6\u7684\u4fe1\u606f\u5c06\u5728\u540e\u6587\u4e2d\u63d0\u53ca\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/32-0.png\" alt=\"exact.png\" \/><\/div>\n<h3>\u62d3\u6251\u56fe\u6709\u5411\u65e0\u73af\u56fe\u9886\u57df\u4e13\u7528\u8bed\u8a00 (Topology DAG DSL)<\/h3>\n<p>\u7528\u6237\u53ef\u4ee5\u5c06\u8ba1\u7b97DAG\u6295\u5165\u5230Gearpump\u4e2d\uff0c\u8ba1\u7b97DAG\u5305\u542b\u8282\u70b9\u548c\u8fb9\u7684\u5217\u8868\uff0c\u8282\u70b9\u4ee5\u4efb\u52a1\u7684\u96c6\u5408\u5f62\u5f0f\u5e76\u884c\u6267\u884c\u3002Gearpump\u4f1a\u81ea\u52a8\u5c06\u5404\u4e2a\u4efb\u52a1\u7ec4\u5206\u914d\u7ed9\u5404\u4e2a\u673a\u5668\u3002\u6bcf\u4e2a\u4efb\u52a1\u4f5c\u4e3aActor\u542f\u52a8\uff0c\u5e76\u5145\u5f53\u957f\u671f\u8fd0\u884c\u7684\u5fae\u670d\u52a1\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/35-0.png\" alt=\"dag.png\" \/><\/div>\n<h3>\u6d41\u91cf\u63a7\u5236<\/h3>\n<p>Gearpump\u5185\u7f6e\u4e86\u6d41\u63a7\u5236\u529f\u80fd\uff0c\u786e\u4fdd\u4e0a\u6e38\u4efb\u52a1\u4e0d\u4f1a\u5411\u4e0b\u6e38\u4efb\u52a1\u53d1\u9001\u8d85\u51fa\u5176\u627f\u8f7d\u80fd\u529b\u7684\u6d88\u606f\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/38-0.png\" alt=\"flowcontrol.png\" \/><\/div>\n<h3>\u6ca1\u6709\u56fa\u6709\u7684\u7aef\u5230\u7aef\u5ef6\u8fdf<\/h3>\n<p>Gearpump\u662f\u4e00\u79cd\u57fa\u4e8e\u6d88\u606f\u7684\u6d41\u5f0f\u5f15\u64ce\uff0c\u5b83\u8868\u793a\u5728DAG\u4e2d\u7684\u6240\u6709\u4efb\u52a1\u5728\u63a5\u6536\u5230\u6d88\u606f\u65f6\u7acb\u5373\u5904\u7406\uff0c\u5e76\u5728\u5904\u7406\u5b8c\u6bd5\u540e\u7acb\u5373\u5c06\u6d88\u606f\u53d1\u9001\u5230\u4e0b\u6e38\u3002Gearpump\u4e0d\u8fdb\u884c\u6279\u5904\u7406\uff0c\u5373\u4f7f\u6570\u636e\u5df2\u7ecf\u5b58\u50a8\u3002<\/p>\n<h3>\u9ad8\u6027\u80fd\u6d88\u606f\u4f20\u9012<\/h3>\n<p>\u901a\u8fc7\u4f7f\u7528\u667a\u80fd\u6279\u5904\u7406\u7b56\u7565\uff0cGearpump\u53d8\u5f97\u975e\u5e38\u9ad8\u6548\uff0c\u53ef\u4ee5\u53d1\u9001\u548c\u63a5\u6536\u5c0f\u5c3a\u5bf8\u7684\u6d88\u606f\u3002\u5728\u8fdb\u884c\u4e86\u4e00\u4e2a\u6d89\u53ca4\u53f0\u673a\u5668\u7684\u6d4b\u8bd5\u4e2d\uff0c\u6574\u4e2a\u96c6\u7fa4\u7684\u541e\u5410\u91cf\u8fbe\u5230\u4e86\u6bcf\u79d21800\u4e07\u6761100\u5b57\u8282\u7684\u6d88\u606f\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/43-0.png\" alt=\"dashboard.png\" \/><\/div>\n<h3>\u9ad8\u53ef\u7528\u6027\uff0c\u65e0\u5355\u70b9\u6545\u969c\u3002<\/h3>\n<p>Gearpump\u7684\u8bbe\u8ba1\u8003\u8651\u4e86\u9ad8\u53ef\u7528\u6027\u3002\u5b83\u9488\u5bf9\u6d88\u606f\u4e22\u5931\u3001Worker\u8282\u70b9\u5d29\u6e83\u3001\u5e94\u7528\u7a0b\u5e8f\u5d29\u6e83\u3001Master\u8282\u70b9\u5d29\u6e83\u548c\u8111\u88c2\u7b49\u6545\u969c\u8fdb\u884c\u4e86\u8003\u8651\uff0c\u5e76\u914d\u5907\u4e86\u5728\u8fd9\u4e9b\u6545\u969c\u53d1\u751f\u65f6\u8fdb\u884c\u6062\u590d\u7684\u673a\u5236\u3002<br \/>\n&#8211; \u5982\u679c\u53d1\u751f\u6d88\u606f\u4e22\u5931\uff0c\u5b83\u4f1a\u91cd\u65b0\u6267\u884c<br \/>\n&#8211; \u5982\u679cWorker\u8282\u70b9\u6216\u5e94\u7528\u7a0b\u5e8f\u5d29\u6e83\uff0c\u5b83\u4f1a\u5728\u65b0\u673a\u5668\u4e0a\u91cd\u65b0\u8c03\u5ea6<\/p>\n<p>\u4e3a\u4e86\u5b9e\u73b0Master\u7684\u9ad8\u53ef\u7528\u6027\uff0c\u6211\u4eec\u4f7f\u7528\u4e86Akka\u96c6\u7fa4\u548cCRDTs\uff08\u51b2\u7a81\u81ea\u7531\u6570\u636e\u7c7b\u578b\uff09\u6765\u8fdb\u884c\u72b6\u6001\u540c\u6b65\uff0c\u5e76\u4f7f\u7528\u591a\u4e2aMaster\u8282\u70b9\u3002\u901a\u8fc7\u8fd9\u79cd\u673a\u5236\uff0c\u5373\u4f7f\u53d1\u751f\u6545\u969c\uff0c\u4ecd\u7136\u80fd\u4fdd\u6301Quorum\u7684\u5b58\u5728\uff0c\u5e76\u4fdd\u6301Master\u7684\u529f\u80fd\u3002\u5f53\u4e00\u4e2aMaster\u8282\u70b9\u53d1\u751f\u6545\u969c\u65f6\uff0cAkka\u96c6\u7fa4\u4e2d\u7684\u5176\u4ed6Master\u8282\u70b9\u4f1a\u63a5\u7ba1\uff0c\u5e76\u6062\u590d\u72b6\u6001\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/47-0.png\" alt=\"ha.png\" \/><\/div>\n<h3>\u52a8\u6001\u8ba1\u7b97 DAG<\/h3>\n<p>Gearpump\u63d0\u4f9b\u4e86\u4e00\u9879\u529f\u80fd\uff0c\u5373\u4f7f\u5728\u8fd0\u884c\u65f6\u4e5f\u80fd\u52a8\u6001\u5730\u6dfb\u52a0\u3001\u5220\u9664\u3001\u66f4\u65b0DAG\u4e2d\u7684\u5b50\u56fe\uff0c\u800c\u4e0d\u9700\u8981\u91cd\u65b0\u542f\u52a8\u6574\u4e2aTopology\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/50-0.png\" alt=\"dynamic.png\" \/><\/div>\n<h3>\u80fd\u591f\u5904\u7406\u4e71\u5e8f\u6d88\u606f<\/h3>\n<p>\u7c7b\u4f3c\u6ed1\u52a8\u7a97\u53e3\u7684\u7a97\u53e3\u64cd\u4f5c\u5728\u65f6\u95f4\u7a97\u53e3\u5185\u83b7\u53d6\u5230\u7684\u6240\u6709\u6d88\u606f\u7684\u51c6\u786e\u7ed3\u679c\u4e2d\u8d77\u5230\u4e86\u91cd\u8981\u4f5c\u7528\u3002\u4f46\u662f\uff0c\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5982\u4f55\u5904\u7406\u5ef6\u8fdf\u5230\u8fbe\u7684\u6d88\u606f\u5462\uff1fGearpump\u901a\u8fc7\u59cb\u7ec8\u8ffd\u8e2a\u6240\u6709\u6d88\u606f\u7684\u65f6\u95f4\u6233\u7684\u6700\u5c0f\u503c\u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u4ece\u800c\u53ef\u4ee5\u77e5\u9053\u67d0\u4e2a\u65f6\u95f4\u7a97\u53e3\u5185\u7684\u5904\u7406\u6d88\u606f\u662f\u5426\u5168\u90e8\u5b8c\u6210\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/53-0.png\" alt=\"clock.png\" \/><\/div>\n<h3>\u53ef\u5b9a\u5236\u5316\u7684\u5e73\u53f0<\/h3>\n<p>\u4e0d\u540c\u7684\u5e94\u7528\u7a0b\u5e8f\u9700\u8981\u4e0d\u540c\u7684\u6027\u80fd\u6307\u6807\uff08\u4f8b\u5982\uff1a\u541e\u5410\u91cf\u3001\u5f3a\u4e00\u81f4\u6027\u7b49\uff09\uff0c\u5e76\u4e14\u4e5f\u9700\u8981\u4e0d\u540c\u7684\u8d44\u6e90\uff08\u4f8b\u5982\uff1aCPU\u8d44\u6e90\u3001\u6570\u636e\u5c40\u90e8\u6027\uff09\u3002Gearpump\u901a\u8fc7\u81ea\u5b9a\u4e49\u6027\u80fd\u6307\u6807\u548c\u8d44\u6e90\u8c03\u5ea6\u7b56\u7565\u80fd\u591f\u6ee1\u8db3\u8fd9\u4e9b\u9700\u6c42\u3002<\/p>\n<h3>\u5185\u7f6e\u4eea\u8868\u677f\u7528\u6237\u754c\u9762<\/h3>\n<p>Gearpump\u5177\u6709\u7528\u4e8e\u96c6\u7fa4\u7ba1\u7406\u548c\u53ef\u89c6\u5316\u7684\u4eea\u8868\u677fUI\u3002<br \/>\n\u7531\u4e8e\u4eea\u8868\u677fUI\u4e0e\u540e\u7aef\u901a\u8fc7REST\u901a\u4fe1\u8fdb\u884c\u4fe1\u606f\u4ea4\u6362\uff0c\u56e0\u6b64\u53ef\u4ee5\u521b\u5efa\u65b0\u7684\u4e0d\u540c\u4eea\u8868\u677f\u5e76\u5728\u5176\u4e0a\u4f7f\u7528\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/58-0.gif\" alt=\"dashboard.gif\" \/><\/div>\n<h3>Kafka\u548cHDFS\u7684\u6570\u636e\u8fde\u63a5\u5668<\/h3>\n<p>Gearpump\u5177\u5907\u4e0eKafka\u548cHDFS\u7684\u6570\u636e\u8fde\u63a5\u5668\u3002<br \/>\n\u5bf9\u4e8eKafka\u8fde\u63a5\u5668\uff0c\u53ef\u4ee5\u91cd\u65b0\u83b7\u53d6\u7279\u5b9a\u65f6\u95f4\u6233\u4e4b\u540e\u7684\u6d88\u606f\u3002<\/p>\n<h1>\u53ef\u9760\u7684\u4fe1\u606f\u4f20\u9012<\/h1>\n<h2>\u81f3\u5c11\u4e00\u6b21\u6d88\u606f\u4f20\u9012\u662f\u4ec0\u4e48\u610f\u601d\uff1f<\/h2>\n<p>\u6d88\u606f\u53ef\u80fd\u4f1a\u56e0\u4e3a\u7f51\u7edc\u5206\u88c2\u7b49\u539f\u56e0\u800c\u4e22\u5931\u3002<br \/>\n\u201c\u81f3\u5c11\u4f20\u9012\u4e00\u6b21\u201d\u6d88\u606f\u4f20\u9012\uff08\u81f3\u5c11\u4f20\u9012\u4e00\u6b21\uff09\u4f1a\u5bf9\u4e22\u5931\u7684\u6d88\u606f\u8fdb\u884c\u5904\u7406\uff0c\u4ee5\u786e\u4fdd\u81f3\u5c11\u6536\u5230\u4e00\u6b21\u786e\u8ba4\u56de\u590d\u3002<\/p>\n<p>Gearpump\u4fdd\u8bc1\u53ef\u4ee5\u5bf9\u8fc7\u53bb\u65f6\u523b\u7684\u6d88\u606f\u8fdb\u884c\u91cd\u65b0\u83b7\u53d6\u7684DataSource\u53ef\u4ee5\u63d0\u4f9b\u81f3\u5c11\u4e00\u6b21\u7684\u6a21\u578b\u4fdd\u8bc1\u3002\u5728Gearpump\u4e2d\uff0c\u6bcf\u6761\u6d88\u606f\u90fd\u88ab\u6807\u8bb0\u4e86\u65f6\u95f4\u6233\uff0c\u5e76\u4e14\u4f1a\u8ddf\u8e2a\u5f53\u524d\u6b63\u5728\u5904\u7406\u7684\u6d88\u606f\u4e2d\u6700\u5c0f\u7684\u65f6\u95f4\u6233\uff08\u5168\u5c40\u6700\u5c0f\u65f6\u949f\uff09\u3002\u5982\u679c\u6d88\u606f\u4e22\u5931\uff0c\u5e94\u7528\u7a0b\u5e8f\u5c06\u4f7f\u7528\u5168\u5c40\u6700\u5c0f\u65f6\u949f\u7684\u503c\u8fdb\u884c\u91cd\u65b0\u542f\u52a8\u3002\u7531\u4e8eDataSource\u53ef\u4ee5\u4f7f\u7528\u5168\u5c40\u6700\u5c0f\u65f6\u949f\u91cd\u65b0\u83b7\u53d6\u6d88\u606f\uff0c\u56e0\u6b64\u5728\u91cd\u65b0\u542f\u52a8\u4e4b\u524d\u6b63\u5728\u5904\u7406\u7684\u6d88\u606f\u5c06\u5168\u90e8\u88ab\u91cd\u65b0\u6267\u884c\u3002\u5728Gearpump\u4e2d\uff0c\u5c06\u8fd9\u79cd\u7c7b\u578b\u7684DataSource\u79f0\u4e3aTimeReplayableSource\u3002\u4f5c\u4e3a\u73b0\u6709\u7684TimeReplayableSource\uff0c\u6709KafkaSource\u3002\u901a\u8fc7\u4f7f\u7528KafkaSource\u5c06\u6d88\u606f\u5bfc\u5165Gearpump\uff0c\u53ef\u4ee5\u5b9e\u73b0\u81f3\u5c11\u4e00\u6b21\u7684\u6d88\u606f\u5904\u7406\u3002<\/p>\n<h2>\u7cbe\u786e\u4e00\u6b21\u6d88\u606f\u4f20\u9012\u662f\u4ec0\u4e48\u610f\u601d\uff1f<\/h2>\n<p>\u81f3\u5c11\u4e00\u6b21\u7684\u6a21\u578b\u65e0\u6cd5\u4fdd\u8bc1\u5e94\u7528\u7a0b\u5e8f\u7684\u6267\u884c\u7ed3\u679c\u7684\u6b63\u786e\u6027\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5b58\u5728\u8bb0\u5f55\u63a5\u6536\u6d88\u606f\u6570\u91cf\u7684\u4efb\u52a1\uff0c\u5f53\u6d88\u606f\u88ab\u91cd\u65b0\u6267\u884c\u65f6\uff0c\u4f1a\u5bfc\u81f4\u91cd\u590d\u5904\u7406\uff0c\u5982\u679c\u4efb\u52a1\u53d1\u751f\u6545\u969c\uff0c\u63a5\u6536\u6d88\u606f\u6570\u91cf\u4e5f\u4f1a\u4e22\u5931\u3002<br \/>\n\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u9700\u8981\u4e00\u4e2a\u6a21\u578b\u6765\u786e\u4fdd\u6d88\u606f\u4ec5\u901a\u8fc7\u4e00\u6b21\u66f4\u65b0\u72b6\u6001\uff0c\u5373\u4ec5\u901a\u8fc7\u4e00\u6b21\u4ea4\u4ed8\uff08exactly once message delivery\uff09\u3002\u6b64\u5916\uff0c\u8fd8\u9700\u8981\u8fc7\u6ee4\u91cd\u590d\u5904\u7406\u7684\u6d88\u606f\u5e76\u5c06\u5185\u5b58\u72b6\u6001\u6301\u4e45\u5316\u3002<\/p>\n<p>\u53ea\u6709\u5728Gearpump\u6ee1\u8db3\u4ee5\u4e0b\u4e24\u4e2a\u6761\u4ef6\u65f6\uff0c\u624d\u80fd\u4f7f\u7528Exactly Once\u6a21\u578b\uff1a<br \/>\n1. \u4f7f\u7528TimeReplayableSource\u8fdb\u884c\u6570\u636e\u83b7\u53d6\u3002<br \/>\n2. \u4f7f\u7528Persistent API\u5728\u5185\u5b58\u4e2d\u7ba1\u7406\u72b6\u6001\u503c\u5e76\u8fdb\u884c\u4fdd\u5b58\u3002<\/p>\n<p>\u901a\u8fc7\u4f7f\u7528Persistent API\uff0c\u7528\u6237\u7684\u72b6\u6001\u503c\u5c06\u7531Gearpump\u5b9a\u671f\u5730\u4e0eCheckpoint\u65f6\u95f4\u4e00\u8d77\u4fdd\u5b58\u5728HDFS\u7b49\u5b58\u50a8\u4e2d\u3002Gearpump\u4f1a\u4fdd\u5b58\u5e76\u6301\u4e45\u5316\u6240\u6709\u5f53\u524d\u5904\u7406\u4e2d\u7684\u72b6\u6001\u503c\u7684\u5168\u5c40\u6700\u5c0f\u7684Checkpoint\u65f6\u95f4\u6233\u3002\u5728\u5e94\u7528\u7a0b\u5e8f\u91cd\u65b0\u542f\u52a8\u65f6\uff0cGearpump\u5c06\u4ece\u5168\u5c40\u6700\u5c0f\u7684Checkpoint\u65f6\u95f4\u6233\u6062\u590d\u72b6\u6001\uff0c\u5e76\u4f7f\u7528\u6062\u590d\u7684\u503c\u91cd\u65b0\u6267\u884c\u6d88\u606f\u3002\u4ece\u800c\u786e\u4fdd\u6240\u6709\u201c\u72b6\u6001\u503c\u201d\u53ea\u4f1a\u88ab\u66f4\u65b0\u4e00\u6b21\u3002<\/p>\n<h3>\u6301\u4e45\u6027API<\/h3>\n<p>\u6301\u4e45\u5316API\u7531PersistentTask\u548cPersistentState\u6784\u6210\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528\u8fd9\u4e9b\u7684\u793a\u4f8b\uff0c\u7528\u4e8e\u4fdd\u5b58\u8f93\u5165\u6d88\u606f\u6570\u91cf\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"k\">class<\/span> <span class=\"nc\">CountProcessor<\/span><span class=\"o\">(<\/span><span class=\"n\">taskContext<\/span><span class=\"k\">:<\/span> <span class=\"kt\">TaskContext<\/span><span class=\"o\">,<\/span> <span class=\"n\">conf<\/span><span class=\"k\">:<\/span> <span class=\"kt\">UserConfig<\/span><span class=\"o\">)<\/span>\r\n  <span class=\"k\">extends<\/span> <span class=\"nc\">PersistentTask<\/span><span class=\"o\">[<\/span><span class=\"kt\">Long<\/span><span class=\"o\">](<\/span><span class=\"n\">taskContext<\/span><span class=\"o\">,<\/span> <span class=\"n\">conf<\/span><span class=\"o\">)<\/span> <span class=\"o\">{<\/span>\r\n\r\n  <span class=\"k\">override<\/span> <span class=\"k\">def<\/span> <span class=\"nf\">persistentState<\/span><span class=\"k\">:<\/span> <span class=\"kt\">PersistentState<\/span><span class=\"o\">[<\/span><span class=\"kt\">Long<\/span><span class=\"o\">]<\/span> <span class=\"k\">=<\/span> <span class=\"o\">{<\/span>\r\n    <span class=\"k\">import<\/span> <span class=\"nn\">com.twitter.algebird.Monoid.longMonoid<\/span>\r\n    <span class=\"k\">new<\/span> <span class=\"nc\">NonWindowState<\/span><span class=\"o\">[<\/span><span class=\"kt\">Long<\/span><span class=\"o\">](<\/span><span class=\"k\">new<\/span> <span class=\"nc\">AlgebirdMonoid<\/span><span class=\"o\">(<\/span><span class=\"n\">longMonoid<\/span><span class=\"o\">),<\/span> <span class=\"k\">new<\/span> <span class=\"nc\">ChillSerializer<\/span><span class=\"o\">[<\/span><span class=\"kt\">Long<\/span><span class=\"o\">])<\/span>\r\n  <span class=\"o\">}<\/span>\r\n\r\n  <span class=\"k\">override<\/span> <span class=\"k\">def<\/span> <span class=\"nf\">processMessage<\/span><span class=\"o\">(<\/span><span class=\"n\">state<\/span><span class=\"k\">:<\/span> <span class=\"kt\">PersistentState<\/span><span class=\"o\">[<\/span><span class=\"kt\">Long<\/span><span class=\"o\">],<\/span> <span class=\"n\">message<\/span><span class=\"k\">:<\/span> <span class=\"kt\">Message<\/span><span class=\"o\">)<\/span><span class=\"k\">:<\/span> <span class=\"kt\">Unit<\/span> <span class=\"o\">=<\/span> <span class=\"o\">{<\/span>\r\n    <span class=\"nv\">state<\/span><span class=\"o\">.<\/span><span class=\"py\">update<\/span><span class=\"o\">(<\/span><span class=\"nv\">message<\/span><span class=\"o\">.<\/span><span class=\"py\">timestamp<\/span><span class=\"o\">,<\/span> <span class=\"mi\">1L<\/span><span class=\"o\">)<\/span>\r\n  <span class=\"o\">}<\/span>\r\n<span class=\"o\">}<\/span>\r\n<\/code><\/pre>\n<p>CountProcessor\u7528\u4e8e\u751f\u6210\u5b9a\u5236\u7684PersistentState\u3002PersistentState\u7531PersistentTask\u8fdb\u884c\u7ba1\u7406\uff0c\u5e76\u7ee7\u627fprocessMessage\u65b9\u6cd5\uff0c\u5b9a\u4e49\u4e86\u901a\u8fc7\u65b0\u6d88\u606f\u66f4\u65b0\u72b6\u6001\u7684\u884c\u4e3a\u3002\uff08\u5728\u4e0a\u8ff0\u793a\u4f8b\u4e2d\uff0c\u65b0\u6d88\u606f\u7684\u8ba1\u6570\u4e3a1\uff0c\u5e76\u5c06\u5176\u6dfb\u52a0\u5230\u73b0\u6709\u503c\u4e2d\u3002\uff09<\/p>\n<p>Gearpump\u63d0\u4f9b\u4e86\u4ee5\u4e0b\u4e24\u79cd\u72b6\u6001\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>NonWindowState &#8211; \u4e0e\u65f6\u95f4\u65e0\u5173\u6216\u4ee5\u975e\u65f6\u95f4\u4e3a\u754c\u9650\u7684\u72b6\u6001<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>WindowState &#8211; \u88ab\u65f6\u95f4\u7a97\u53e3\u5212\u5206\u7684\u72b6\u6001<\/ol>\n<p>\u8fd9\u4e9b\u53ef\u4ee5\u8868\u793a\u4e3a\u6ee1\u8db3\u4e0b\u9762\u7684\u5e7a\u534a\u7fa4\u89c4\u5219\u7684\u72b6\u6001\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u5177\u6709\u7c7b\u4f3c\u4e8e+\u8fd0\u7b97\u7b26\u7684\u7ed3\u5408\u5f8b<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\u5177\u6709\u7c7b\u4f3c\u4e8e0\u7684\u57fa\u51c6\u503c<\/ol>\n<p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u4f7f\u7528\u4e86Twitter\u7684Algebird\u5e93\u63d0\u4f9b\u7684\u65b9\u4fbf\u7684&#8221;longMonoid&#8221;\u3002<\/p>\n<h1>Gearpump\u6027\u80fd\u62a5\u544a<\/h1>\n<h2>\u7ee9\u6548\u8bc4\u4f30<\/h2>\n<p>\u4f7f\u7528Gearpump\u7684\u6027\u80fd\uff0c\u901a\u8fc7\u4f7f\u7528\u79f0\u4e3aSOL\uff08\u53c2\u8003Gearpump\u7684\u793a\u4f8b\u9879\u76ee\uff09\u7684\u6027\u80fd\u7b80\u5355\u7684\u5fae\u57fa\u51c6\u6d4b\u8bd5\u7ed3\u6784\uff0c\u4e3b\u8981\u5173\u6ce8\u541e\u5410\u91cf\u548c\u5ef6\u8fdf\u8fd9\u4e24\u4e2a\u65b9\u9762\u8fdb\u884c\u5c55\u793a\u3002<br \/>\nSOLStreamProducer\u4e0d\u65ad\u5c06\u6d88\u606f\u53d1\u9001\u7ed9SOLStreamProcessor\uff0c\u800cSOLStreamProcessor\u5219\u662f\u4e00\u4e2a\u65e0\u64cd\u4f5c\u7684\u914d\u7f6e\u3002<br \/>\n\u6211\u4eec\u51c6\u5907\u4e86\u4e00\u4e2a\u75314\u4e2a\u8282\u70b9\uff0810GbE\u7f51\u7edc\uff09\u7ec4\u6210\u7684\u96c6\u7fa4\uff0c\u5e76\u8fdb\u884c\u4e86\u786e\u8ba4\u3002<br \/>\n\u6bcf\u4e2a\u8282\u70b9\u7684\u786c\u4ef6\u914d\u7f6e\u5982\u4e0b\u6240\u793a\u3002<\/p>\n<p>\u5904\u7406\u5668\uff1a32\u6838\u82f1\u7279\u5c14\uff08R\uff09\u81f3\u5f3a\uff08R\uff09CPU E5-2690 2.90GHz<br \/>\n\u5185\u5b58\uff1a64GB<\/p>\n<h2>\u541e\u5410\u91cf<\/h2>\n<p>\u5728\u9a8c\u8bc1\u8fc7\u7a0b\u4e2d\uff0c\u5c1d\u8bd5\u786e\u8ba4\u541e\u5410\u91cf\u7684\u4e0a\u9650\uff0c\u542f\u52a8\u4e8648\u4e2aSOLStreamProducer\u548c48\u4e2aSOLStreamProcessor\uff0c\u5982\u4e0b\u6240\u793a\uff0c\u6574\u4e2a\u96c6\u7fa4\u8fbe\u5230\u4e861800\u4e07\u6761\u6d88\u606f\/\u79d2\u3002\uff08\u6bcf\u6761\u6d88\u606f\u4e3a100\u5b57\u8282\uff09<\/p>\n<h2>\u5ef6\u8fdf<\/h2>\n<p>\u5f53\u8fbe\u5230\u6700\u5927\u541e\u5410\u91cf\u72b6\u6001\u65f6\uff0c2\u4e2a\u4efb\u52a1\u4e4b\u95f4\u7684\u5e73\u5747\u5ef6\u8fdf\u4e3a8\u6beb\u79d2\u3002<\/p>\n<h2>\u6545\u969c\u6062\u590d\u65f6\u95f4<\/h2>\n<p>\u5982\u679c\u51fa\u73b0\u6545\u969c\uff0c\u6bd4\u5982\u68c0\u6d4b\u5230Executor\u7684\u5d29\u6e83\uff0cGearpump\u4f1a\u91cd\u65b0\u5206\u914d\u8d44\u6e90\u5e76\u91cd\u65b0\u542f\u52a8\u5e94\u7528\u7a0b\u5e8f\u3002<br \/>\n\u5e94\u7528\u7a0b\u5e8f\u7684\u91cd\u65b0\u542f\u52a8\u9700\u898110\u79d2\u949f\u7684\u65f6\u95f4\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/89-0.png\" alt=\"dashboard.png\" \/><\/div>\n<h2>\u5982\u4f55\u8bbe\u7f6e\u57fa\u51c6\u73af\u5883\uff1f<\/h2>\n<h3>\u51c6\u5907\u73af\u5883<\/h3>\n<p>\u6211\u4eec\u4f7f\u75284\u8282\u70b9\uff0810GbE\u7f51\u7edc\uff09\u7684Gearpump\u96c6\u7fa4\uff0c\u5728\u6bcf\u4e2a\u8282\u70b9\u4e0a\u914d\u7f6e\u4e864\u4e2aWorker\u6765\u6784\u5efa\u3002\u5728\u6d4b\u8bd5\u73af\u5883\u4e2d\uff0c\u6bcf\u53f0\u673a\u5668\u7684\u914d\u7f6e\u4e3a64GB\u5185\u5b58\u548cIntel(R) Xeon(R) 32\u6838\u5fc3\u5904\u7406\u5668E5-2690 2.90GHz\u3002\u5728Gearpump\u4e0a\u542f\u7528\u4e86\u6307\u6807\uff0c\u7136\u540e\u8fdb\u884c\u6d4b\u8bd5\u3002<\/p>\n<p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5c06\u5177\u670948\u4e2aStreamProducers\u548c48\u4e2aStreamProcessors\u7684SOL\u5e94\u7528\u7a0b\u5e8f\u6295\u5165\u3002<\/p>\n<pre class=\"post-pre\"><code>bin\/gear app <span class=\"nt\">-jar<\/span> .\/examples\/sol-<span class=\"nv\">$VERSION<\/span><span class=\"nt\">-assembly<\/span>.jar <span class=\"nt\">-streamProducer<\/span> 48 <span class=\"nt\">-streamProcessor<\/span> 48\r\n<\/code><\/pre>\n<p>3\uff09\u6253\u5f00Gearpump\u7684\u4eea\u8868\u677f\uff0c\u5e76\u8fde\u63a5\u5230http:\/\/\u3010\u542f\u52a8\u4e3b\u673a\u3011:8090\/\u3002\u5207\u6362\u5230\u5e94\u7528\u7a0b\u5e8f\u9009\u9879\u5361\uff0c\u5373\u53ef\u67e5\u770b\u5e94\u7528\u7a0b\u5e8f\u7684\u8be6\u7ec6\u4fe1\u606f\u3002<\/p>\n<h1>Gearpump\u5185\u90e8\u673a\u5236<\/h1>\n<h3>\u6f14\u5458\u7684\u7b49\u7ea7\u4f53\u7cfb\uff1f<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/98-0.png\" alt=\"actor_hierarchy.png\" \/><\/div>\n<p>\u6240\u6709\u56fe\u4e2d\u7684\u5143\u7d20\u90fd\u662fActor\u3002<br \/>\nActor\u53ef\u4ee5\u5206\u4e3a\u4e24\u4e2a\u7c7b\u522b\uff0c\u96c6\u7fa4\u89d2\u8272(Cluster Actors)\u548c\u5e94\u7528\u7a0b\u5e8f\u89d2\u8272(Application Actors)\u3002<\/p>\n<h4>\u805a\u96c6\u6f14\u5458<\/h4>\n<p>\u5de5\u4f5c\u8005: \u5c06\u5206\u914d\u7ed9\u7269\u7406\u5de5\u4f5c\u8005\u673a\u5668\u3002\u5de5\u4f5c\u8005\u8d1f\u8d23\u672c\u5730\u673a\u5668\u7684\u8d44\u6e90\u7ba1\u7406\u548c\u5ea6\u91cf\u62a5\u544a\u3002<\/p>\n<p>\u5927\u5e08\uff1a\u4f4d\u4e8eCluster\u7684\u6838\u5fc3\u90e8\u5206\uff0c\u8d1f\u8d23\u7ba1\u7406Worker\u3001\u8d44\u6e90\u548c\u5e94\u7528\u7a0b\u5e8f\u3002\u4e3b\u8981\u529f\u80fd\u59d4\u6258\u7ed9\u4e09\u4e2a\u5b50Actor\uff0c\u5206\u522b\u662fAppManager\u3001WorkerManager\u548cResourceScheduler\u3002<\/p>\n<h4>\u5e94\u7528\u7a0b\u5e8f\u7684\u6f14\u5458\u4eec<\/h4>\n<p>AppMaster\u8d1f\u8d23\u5c06\u4efb\u52a1\u5206\u914d\u7ed9Worker\uff0c\u7ba1\u7406Application\u7684\u72b6\u6001\u3002\u4e0d\u540c\u7684Application\u62e5\u6709\u4e0d\u540c\u7684AppMaster\uff0c\u5f7c\u6b64\u72ec\u7acb\u3002<\/p>\n<p>\u6267\u884c\u5668\uff1a\u4f5c\u4e3aAppMaster\u7684\u5b50\u8282\u70b9\uff0c\u4ee3\u8868JVM\u8fdb\u7a0b\u3002\u8d1f\u8d23\u7ba1\u7406\u4efb\u52a1\u7684\u751f\u547d\u5468\u671f\u548c\u5728\u4efb\u52a1\u53d1\u751f\u6545\u969c\u65f6\u8fdb\u884c\u6062\u590d\u3002<\/p>\n<p>\u5de5\u4f5c\uff1a\u627f\u62c5Executor\u7684\u89d2\u8272\uff0c\u6267\u884c\u5b9e\u9645\u5904\u7406\u3002\u6240\u6709TaskActor\u90fd\u6301\u6709\u5404\u81ea\u7684\u5168\u5c40\u552f\u4e00\u5730\u5740\u3002\u67d0\u4e2aTask Actor\u53ef\u4ee5\u5411\u5176\u4ed6Task Actor\u53d1\u9001\u6d88\u606f\u3002\u901a\u8fc7\u8be5\u673a\u5236\uff0c\u80fd\u591f\u83b7\u5f97\u5bf9\u8ba1\u7b97DAG\u8fdb\u884c\u5206\u5e03\u5f0f\u5904\u7406\u7684\u9ad8\u5ea6\u7075\u6d3b\u6027\u3002<\/p>\n<p>DAG\u7684\u6240\u6709Actor\u90fd\u4e0e\u5176Supervisor\u4e00\u8d77\u88ab\u7ec4\u5408\u5728\u4e00\u8d77\uff0cSupervisor\u8d1f\u8d23\u76d1\u63a7Actor\u5e76\u6b63\u786e\u5904\u7406\u9519\u8bef\u3002\u5728Master\u4e2d\uff0c\u5177\u6709\u98ce\u9669\u7684\u4f5c\u4e1a\u88ab\u9694\u79bb\u5e76\u59d4\u6258\u7ed9\u5b50Actor\uff0c\u4ee5\u786e\u4fdd\u7cfb\u7edf\u7684\u5065\u58ee\u6027\u3002\u5728\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u521b\u5efa\u4e86\u989d\u5916\u7684\u4e2d\u95f4\u5c42&#8221;Executor&#8221;\uff0c\u8be5\u5c42\u80fd\u591f\u63d0\u4f9b\u7ec6\u7c92\u5ea6\u5904\u7406\u548c\u5728\u4efb\u52a1\u6545\u969c\u65f6\u8fdb\u884c\u65e9\u671f\u6062\u590d\u3002Master\u8d1f\u8d23\u76d1\u89c6AppMaster\u548cWorker\u7684\u751f\u547d\u5468\u671f\u4ee5\u5e94\u5bf9\u6545\u969c\uff0c\u4f46\u8fd9\u4e9b\u751f\u547d\u5468\u671f\u7531Supervisor\u8fdb\u884c\u7ba1\u7406\uff0c\u5e76\u975e\u76f4\u63a5\u4e0eMaster\u5173\u8054\u3002\u56e0\u6b64\uff0c\u5373\u4f7fMaster\u672c\u8eab\u53d1\u751f\u6545\u969c\uff0c\u4e5f\u4e0d\u4f1a\u5bf9\u5176\u4ed6\u90e8\u5206\u4ea7\u751f\u5f71\u54cd\u3002\u591a\u4e2aMaster Actor\u901a\u8fc7Akka\u96c6\u7fa4\u8fdb\u884c\u7ec4\u5408\uff0c\u5e76\u4e14Master\u7684\u72b6\u6001\u901a\u8fc7CRDT\u4f7f\u7528\u516b\u5366\u534f\u8bae\u8fdb\u884c\u540c\u6b65\uff0c\u56e0\u6b64\u4e0d\u5b58\u5728\u5355\u70b9\u6545\u969c\u3002\u901a\u8fc7\u8fd9\u79cd\u5206\u5c42\u8bbe\u8ba1\uff0c\u5b9e\u73b0\u4e86\u9ad8\u53ef\u7528\u6027\u3002<\/p>\n<h3>\u7533\u8bf7\u65f6\u949f\u548c\u5168\u7403\u65f6\u949f\u670d\u52a1<\/h3>\n<p>\u5168\u7403\u65f6\u949f\u670d\u52a1\u662f\u7528\u4e8e\u8ddf\u8e2a\u7cfb\u7edf\u4e2d\u5904\u7406\u4e2d\u6d88\u606f\u7684\u6700\u5c0f\u65f6\u95f4\u6233\u7684\u3002\u6bcf\u4e2a\u4efb\u52a1\u5c06\u901a\u77e5\u5168\u7403\u65f6\u949f\u670d\u52a1\u5176\u81ea\u8eab\u7684\u6700\u5c0f\u65f6\u949f\u3002\u6bcf\u4e2a\u4efb\u52a1\u7684\u6700\u5c0f\u65f6\u949f\u5c06\u4f7f\u7528\u4e0b\u9762\u4e2d\u6700\u5c0f\u7684\u4e00\u4e2a\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Inbox\u4e2d\u306b\u5b58\u5728\u3059\u308b\u51e6\u7406\u5f85\u3061\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u4e2d\u3067\u6700\u5c0f\u306eTimestamp\u3092\u6301\u3064\u30e1\u30c3\u30bb\u30fc\u30b8\u306eTimestamp<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u9001\u4fe1\u3057\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u4e2d\u3067\u3001Ack\u304c\u8fd4\u3063\u3066\u304d\u3066\u3044\u306a\u3044\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u4e2d\u306e\u6700\u5c0f\u306eTimestamp\u3092\u6301\u3064\u30e1\u30c3\u30bb\u30fc\u30b8\u306eTimestamp\u3002\u3082\u3057\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u6b20\u640d\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u3001\u6700\u5c0f\u30af\u30ed\u30c3\u30af\u306f\u9032\u3081\u306a\u3044\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Task\u304c\u4fdd\u6301\u3059\u308b\u300c\u72b6\u614b\u300d\u306e\u4e2d\u3067\u306e\u6700\u5c0f\u30af\u30ed\u30c3\u30af\u3002\u3082\u3057\u72b6\u614b\u304c\u8907\u6570\u306e\u5165\u529b\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u3088\u3063\u3066\u7a4d\u7b97\u3055\u308c\u308b\u5834\u5408\u3001\u6700\u5c0f\u30af\u30ed\u30c3\u30af\u306e\u5024\u306f\u6700\u5f8c\u306b\u7a4d\u7b97\u3055\u308c\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u306etimestamp\u306b\u3088\u3063\u3066\u6c7a\u307e\u308b\u3002\u300c\u72b6\u614b\u300d\u306e\u30af\u30ed\u30c3\u30af\u306f\u72b6\u614b\u3092\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3068\u3057\u3066\u4fdd\u5b58\u3059\u308b\u304b\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u304cTimeWindow\u306e\u7bc4\u56f2\u304b\u3089\u30d5\u30a7\u30fc\u30c9\u30a2\u30a6\u30c8\u3057\u305f\u5834\u5408\u306b\u66f4\u65b0\u3055\u308c\u308b\u3002<\/ul>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/111-0.png\" alt=\"clock.png\" \/><\/div>\n<p>\u5168\u7403\u65f6\u949f\u670d\u52a1\u53ef\u4ee5\u9ad8\u6548\u5730\u8ddf\u8e2a\u6240\u6709\u4efb\u52a1\u7684\u6700\u5c0f\u65f6\u949f\uff0c\u5e76\u4fdd\u6301\u6574\u4f53\u7684\u6700\u5c0f\u65f6\u949f\u3002\u5168\u7403\u6700\u5c0f\u65f6\u949f\u503c\u53ea\u4f1a\u5355\u8c03\u9012\u589e\uff0c\u5b83\u8868\u793a\u6240\u6709\u65e9\u4e8e\u6570\u636e\u6e90\u4e2d\u7684\u8be5\u503c\u7684\u6d88\u606f\u5df2\u7ecf\u5904\u7406\u5b8c\u6210\u3002\u5982\u679c\u53d1\u751f\u6d88\u606f\u4e22\u5931\u6216\u4efb\u52a1\u6545\u969c\uff0c\u5168\u7403\u6700\u5c0f\u65f6\u949f\u5c06\u505c\u6b62\u3002<\/p>\n<h3>\u6211\u4eec\u5982\u4f55\u4f18\u5316\u6d88\u606f\u4f20\u9012\u7684\u6027\u80fd\uff1f<\/h3>\n<p>\u5728\u6d41\u5a92\u4f53\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u6d88\u606f\u7684\u53d1\u9001\u548c\u63a5\u6536\u6027\u80fd\u662f\u975e\u5e38\u91cd\u8981\u7684\u56e0\u7d20\u3002\u4f8b\u5982\uff0c\u8003\u8651\u5230\u67d0\u4e2a\u6d41\u5a92\u4f53\u5e73\u53f0\u6bcf\u79d2\u9700\u8981\u4ee5\u6beb\u79d2\u7ea7\u7684\u5ef6\u8fdf\u5904\u7406\u6570\u767e\u4e07\u6761\u6d88\u606f\u7684\u60c5\u51b5\u3002\u5b9e\u73b0\u9ad8\u541e\u5410\u91cf\u548c\u4f4e\u5ef6\u8fdf\u5e76\u4e0d\u5bb9\u6613\u3002\u8fd9\u5c55\u793a\u4e86Gearpump\u9762\u4e34\u7684\u6311\u6218\u8fc7\u7a0b\u3002<\/p>\n<h4>\u7b2c\u4e00\u4e2a\u6311\u6218\uff1a\u7f51\u7edc\u5bf9\u4e8e\u5c0f\u4fe1\u606f\u4e0d\u591f\u9ad8\u6548<\/h4>\n<p>\u5728\u6d41\u5a92\u4f53\u5904\u7406\u4e2d\uff0c\u5178\u578b\u6d88\u606f\u7684\u5c3a\u5bf8\u975e\u5e38\u5c0f\uff0c\u4f8b\u5982\u4e00\u6761\u6d88\u606f\u7684\u5927\u5c0f\u53ef\u80fd\u4e0d\u5230100\u5b57\u8282\uff0c\u5c31\u50cf\u8f66\u8f86\u7684GPS\u6570\u636e\u4e00\u6837\u3002\u7136\u800c\uff0c\u5728\u53d1\u9001\u5c0f\u5c3a\u5bf8\u6d88\u606f\u65f6\uff0c\u7f51\u7edc\u6548\u7387\u975e\u5e38\u4f4e\u3002\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u5f53\u6d88\u606f\u5927\u5c0f\u4e3a50\u5b57\u8282\u65f6\uff0c\u53ea\u80fd\u5229\u7528\u7f51\u7edc\u5e26\u5bbd\u768420%\u3002<br \/>\n\u5982\u4f55\u6539\u5584\u541e\u5410\u91cf\u5462\uff1f<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/117-0.png\" alt=\"through_vs_message_size.png\" \/><\/div>\n<h4>\u7b2c\u4e8c\u4e2a\u6311\u6218\uff1a\u6d88\u606f\u5f00\u9500\u592a\u5927<\/h4>\n<p>\u5982\u679c\u5728\u4e24\u4e2a Actor \u4e4b\u95f4\u53d1\u9001\u548c\u63a5\u6536\u5404\u79cd\u6d88\u606f\u7684\u8bdd\uff0c\u8fd9\u4e9b\u6d88\u606f\u4e2d\u4f1a\u5305\u542b\u53d1\u9001\u8005\u548c\u63a5\u6536\u8005\u7684\u8def\u5f84\u4fe1\u606f\u3002\u5f53\u901a\u8fc7\u7f51\u7edc\u8fdb\u884c\u4f20\u8f93\u65f6\uff0c\u8fd9\u4e2a ActorPath \u7684\u5f00\u9500\u5c31\u4f1a\u5f88\u5927\u3002\u4f8b\u5982\uff0c\u4e0b\u9762\u7684 ActorPath \u8d85\u8fc7\u4e86 200 \u5b57\u8282\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nx\">akka<\/span><span class=\"p\">.<\/span><span class=\"nx\">tcp<\/span><span class=\"p\">:<\/span><span class=\"c1\">\/\/system1@192.168.1.53:51582\/remote\/akka.tcp\/2120193a-e10b-474e-bccb-8ebc4b3a0247@192.168.1.53:48948\/remote\/akka.tcp\/system2@192.168.1.54:43676\/user\/master\/Worker1\/app_0_executor_0\/group_1_task_0#-768886794<\/span>\r\n<\/code><\/pre>\n<h4>\u6211\u4eec\u5982\u4f55\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff1f<\/h4>\n<p>\u6211\u4eec\u4f7f\u7528Akka Extension\u5728Gearpump\u4e2d\u5b9a\u5236\u4e86Netty\u4f20\u8f93\u5c42\u7684\u5f00\u53d1\u3002\u5982\u4e0b\u56fe\u6240\u793a\uff0cNetty\u5ba2\u6237\u7aef\u5c06ActorPath\u7ffb\u8bd1\u4e3aTaskId\uff0c\u5e76\u5728Netty\u670d\u52a1\u5668\u4e2d\u8fdb\u884c\u8fd8\u539f\u3002\u53ea\u6709TaskId\u5728\u7f51\u7edc\u4e2d\u4f20\u8f93\uff0c\u5927\u5c0f\u7ea6\u4e3a10\u4e2a\u5b57\u8282\uff0c\u4ece\u800c\u6700\u5c0f\u5316\u4e86\u5f00\u9500\u3002\u4e0d\u540c\u7684Netty\u5ba2\u6237\u7aefActor\u5f7c\u6b64\u9694\u79bb\uff0c\u4e0d\u4f1a\u4e92\u76f8\u963b\u585e\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/123-0.png\" alt=\"netty_transport.png\" \/><\/div>\n<p>\u4e3a\u4e86\u63d0\u9ad8\u6027\u80fd\uff0c\u9ad8\u6548\u7684\u6279\u5904\u7406\u662f\u4e00\u4e2a\u91cd\u8981\u7684\u5173\u952e\u56e0\u7d20\u3002\u6211\u4eec\u5c06\u591a\u4e2a\u6d88\u606f\u8fdb\u884c\u6279\u5904\u7406\uff0c\u5e76\u53d1\u9001\u5230\u7f51\u7edc\u4e0a\u3002\u6279\u5904\u7406\u5927\u5c0f\u4e0d\u56fa\u5b9a\uff0c\u4f1a\u6839\u636e\u7f51\u7edc\u72b6\u6001\u52a8\u6001\u8c03\u6574\u3002\u5728\u7f51\u7edc\u53ef\u7528\u7684\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u4f1a\u7acb\u5373\u53d1\u9001\u7b49\u5f85\u53d1\u9001\u7684\u6d88\u606f\u3002\u5426\u5219\uff0c\u6211\u4eec\u4f1a\u5c06\u6d88\u606f\u8fdb\u884c\u6279\u5904\u7406\uff0c\u5e76\u5728\u4e00\u5b9a\u65f6\u95f4\u540e\u89e6\u53d1\u53d1\u9001\u8be5\u6279\u5904\u7406\u3002<\/p>\n<h3>\u6211\u4eec\u5982\u4f55\u8fdb\u884c\u6d41\u91cf\u63a7\u5236\uff1f<\/h3>\n<p>\u5728\u6ca1\u6709\u6d41\u91cf\u63a7\u5236\u7684\u60c5\u51b5\u4e0b\uff0c\u67d0\u4e2a\u4efb\u52a1\u5728\u63a5\u6536\u5230\u5927\u91cf\u6765\u81ea\u5176\u4ed6\u4efb\u52a1\u7684\u6d88\u606f\u65f6\u4f1a\u5bfc\u81f4\u5185\u5b58\u6ea2\u51fa\u9519\u8bef\u3002\u5178\u578b\u7684\u6d41\u91cf\u63a7\u5236\u65b9\u6cd5\u662f\u4f7f\u7528\u7c7b\u4f3cTCP\u7684\u6ed1\u52a8\u7a97\u53e3\uff0c\u53d1\u9001\u65b9\u548c\u63a5\u6536\u65b9\u53ef\u4ee5\u4e92\u76f8\u6267\u884c\u800c\u65e0\u9700\u963b\u585e\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/127-0.png\" alt=\"flow_control.png\" \/><\/div>\n<p>\u5728Gearpump\u4e2d\uff0c\u9762\u4e34\u7684\u56f0\u96be\u662f\u4e00\u4e2a\u4efb\u52a1\u6709\u591a\u4e2a\u8f93\u5165\u4efb\u52a1\u548c\u8f93\u51fa\u4efb\u52a1\u3002\u4e3a\u4e86\u4f20\u64ad\u4e0b\u6e38\u5230\u4e0a\u6e38\u7684\u80cc\u538b\uff0c\u9700\u8981\u5c06\u8f93\u5165\u548c\u8f93\u51fa\u8fdb\u884c\u5173\u8054\u3002\u6b64\u5916\uff0c\u6d41\u91cf\u63a7\u5236\u9700\u8981\u8003\u8651\u6545\u969c\u60c5\u51b5\uff0c\u5e76\u9700\u8981\u673a\u5236\u6765\u6062\u590d\u6d88\u606f\u4e22\u5931\u7684\u60c5\u51b5\u3002\u4f5c\u4e3a\u8fdb\u4e00\u6b65\u7684\u6311\u6218\uff0c\u6d88\u606f\u9a71\u52a8\u7684\u6d41\u91cf\u63a7\u5236\u4f1a\u5bfc\u81f4\u5f00\u9500\u589e\u52a0\u3002\u5982\u679c\u9488\u5bf9\u6bcf\u4e2a\u6d88\u606f\u90fd\u8fd4\u56deAck\uff0c\u7cfb\u7edf\u4e2d\u5c06\u5927\u91cf\u98de\u884c\u7684Ack\u6d88\u606f\uff0c\u4ece\u800c\u964d\u4f4e\u6d41\u5f0f\u5904\u7406\u7684\u6027\u80fd\u3002\u6700\u7ec8\u91c7\u7528\u7684\u65b9\u6cd5\u662f\u4f7f\u7528\u660e\u786e\u7684Ack\u8bf7\u6c42\u6d88\u606f\u3002\u5f53\u76ee\u6807\u4efb\u52a1\u63a5\u6536\u5230Ack\u8bf7\u6c42\u6d88\u606f\u65f6\uff0c\u624d\u4f1a\u8fd4\u56deAck\uff0c\u53d1\u9001\u65b9\u4ec5\u5728\u9700\u8981\u7684\u60c5\u51b5\u4e0b\u53d1\u9001Ack\u8bf7\u6c42\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u6cd5\uff0c\u80fd\u591f\u5927\u5927\u51cf\u5c11\u5f00\u9500\u3002<\/p>\n<h3>\u6211\u4eec\u5982\u4f55\u68c0\u6d4b\u4fe1\u606f\u4e22\u5931\uff1f<\/h3>\n<p>\u4e3e\u4e2a\u4f8b\u5b50\uff0c\u5728\u7f51\u7edc\u5e7f\u544a\u4e2d\uff0c\u9700\u8981\u8ba1\u7b97\u603b\u70b9\u51fb\u6b21\u6570\uff0c\u800c\u4e14\u4e0d\u60f3\u51fa\u73b0\u8bef\u8ba1\u7b97\u7684\u60c5\u51b5\u3002\u5728\u6d41\u5a92\u4f53\u5e73\u53f0\u4e2d\uff0c\u9700\u8981\u6709\u6548\u5730\u8ddf\u8e2a\u4e22\u5931\u7684\u4fe1\u606f\uff0c\u5e76\u5c3d\u5feb\u6062\u590d\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/131-0.png\" alt=\"messageLoss.png\" \/><\/div>\n<p>\u6211\u4eec\u4f7f\u7528\u6d41\u91cf\u63a7\u5236\u6d88\u606f\u4f5c\u4e3aAck\u8bf7\u6c42\u548cAck\uff0c\u5728\u68c0\u6d4b\u6d88\u606f\u4e22\u5931\u65b9\u9762\u8d77\u5230\u4f5c\u7528\u3002\u76ee\u6807\u4efb\u52a1\u4f1a\u8ba1\u7b97\u81ea\u4e0a\u6b21\u63a5\u6536\u5230Ack\u8bf7\u6c42\u540e\u6536\u5230\u4e86\u591a\u5c11\u4e2a\u6d88\u606f\uff0c\u5e76\u5c06\u6b64\u4fe1\u606f\u53d1\u9001\u56de\u53d1\u9001\u8005\u3002\u901a\u8fc7\u786e\u8ba4\u8be5\u503c\uff0c\u53d1\u9001\u8005\u53ef\u4ee5\u68c0\u6d4b\u6d88\u606f\u662f\u5426\u4e22\u5931\u3002<\/p>\n<p>\u4ee5\u4e0a\u662f\u4e00\u4e2a\u7b80\u5316\u7684\u4f8b\u5b50\uff0c\u5b9e\u9645\u60c5\u51b5\u66f4\u4e3a\u590d\u6742\uff0c\u9700\u8981\u5904\u7406\u50f5\u5c38\u4efb\u52a1\u548c\u6b63\u5728\u5904\u7406\u7684\u65e7\u6d88\u606f\u3002<\/p>\n<h3>Gearpump\u5982\u4f55\u77e5\u9053\u8981\u91cd\u65b0\u64ad\u653e\u54ea\u4e9b\u6d88\u606f\uff1f<\/h3>\n<p>\u67d0\u4e9b\u5e94\u7528\u7a0b\u5e8f\u4e0d\u5141\u8bb8\u6d88\u606f\u4e22\u5931\uff0c\u5e76\u4e14\u9700\u8981\u91cd\u65b0\u6267\u884c\u7684\u60c5\u51b5\u5b58\u5728\u3002\u4f8b\u5982\uff0c\u5728\u8f6c\u8d26\u5904\u7406\u4e2d\uff0c\u94f6\u884c\u4f1a\u901a\u8fc7\u77ed\u4fe1\u5411\u7528\u6237\u53d1\u9001\u9a8c\u8bc1\u4ee3\u7801\u3002\u5982\u679c\u8be5\u6d88\u606f\u4e22\u5931\uff0c\u5219\u7cfb\u7edf\u9700\u8981\u91cd\u65b0\u6267\u884c\u4ee5\u7ee7\u7eed\u5b8c\u6210\u8f6c\u8d26\u3002<\/p>\n<p>\u6211\u4eec\u91c7\u7528\u4e86\u6e90\u7aef\u6d88\u606f\u5b58\u50a8\u548c\u57fa\u4e8e\u65f6\u95f4\u6233\u7684\u91cd\u64ad\u65b9\u6cd5\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/135-0.png\" alt=\"replay.png\" \/><\/div>\n<p>\u6240\u6709\u7684\u6d88\u606f\u90fd\u662f\u4e0d\u53ef\u53d8\u7684\uff0c\u5e76\u4e14\u4f1a\u88ab\u6807\u8bb0\u4e0a\u65f6\u95f4\u6233\u3002\u5047\u8bbe\u8fd9\u4e2a\u65f6\u95f4\u6233\u5927\u81f4\u4e0a\u662f\u9012\u589e\u7684\uff08\u5141\u8bb8\u6709\u4e9b\u5fae\u6ce2\u52a8\uff09\u3002<\/p>\n<p>\u5728Gearpump\u4e2d\uff0c\u53ef\u4ee5\u4ece\u53ef\u91cd\u65b0\u83b7\u53d6\u6d88\u606f\u7684\u6570\u636e\u6e90\uff08\u4f8b\u5982\uff1aKafka\uff09\u4e2d\u83b7\u53d6\u6d88\u606f\uff0c\u6216\u8005\u5c06\u6d88\u606f\u4fdd\u5b58\u5728\u53ef\u81ea\u5b9a\u4e49\u7684\u6570\u636e\u6e90\u7684\u6d88\u606f\u5b58\u50a8\u4e2d\uff0c\u4ece\u800c\u4fdd\u8bc1\u6d88\u606f\u7684\u91cd\u65b0\u6267\u884c\u3002\u5f53\u53d1\u9001\u65b9\u4efb\u52a1\u5c06\u6d88\u606f\u53d1\u9001\u5230\u4e0b\u6e38\u65f6\uff0c\u65f6\u95f4\u6233\u548c\u6d88\u606f\u7684\u504f\u79fb\u91cf\u5c06\u5b9a\u671f\u4fdd\u5b58\u5728\u504f\u79fb-\u65f6\u95f4\u6233\u5b58\u50a8\u4e2d\u3002\u5728\u8fdb\u884c\u6062\u590d\u65f6\uff0c\u9996\u5148\u4ece\u504f\u79fb-\u65f6\u95f4\u6233\u5b58\u50a8\u4e2d\u83b7\u53d6\u65f6\u95f4\u6233\u548c\u504f\u79fb\u91cf\u7684\u503c\uff0c\u7136\u540e\u4f7f\u7528\u8fd9\u4e9b\u503c\u4ece\u6d88\u606f\u5b58\u50a8\u4e2d\u83b7\u53d6\u6570\u636e\u6765\u91cd\u65b0\u6267\u884c\u6d88\u606f\u3002\u65f6\u95f4\u6233\u8fc7\u6ee4\u5668\u53ef\u4ee5\u5220\u9664\u524d\u540e\u4e0d\u8fde\u7eed\u7684\u6d88\u606f\uff0c\u9632\u6b62\u4e0d\u5fc5\u8981\u7684\u91cd\u65b0\u6267\u884c\uff0c\u5373\u4f7f\u6d88\u606f\u4e0d\u4e25\u683c\u6309\u7167\u65f6\u95f4\u987a\u5e8f\u6392\u5217\u3002<\/p>\n<h3>\u638c\u63e1\u9ad8\u53ef\u7528\u6027<\/h3>\n<p>\u5728\u5206\u5e03\u5f0f\u6d41\u5a92\u4f53\u7cfb\u7edf\u4e2d\uff0c\u7cfb\u7edf\u7684\u6bcf\u4e2a\u90e8\u5206\u90fd\u6709\u53ef\u80fd\u53d1\u751f\u6545\u969c\u3002\u56e0\u6b64\uff0c\u7cfb\u7edf\u9700\u8981\u5bf9\u5404\u79cd\u9519\u8bef\u60c5\u51b5\u8fdb\u884c\u76f8\u5e94\u5e76\u8fdb\u884c\u6062\u590d\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/140-0.png\" alt=\"ha.png\" \/><\/div>\n<p>\u4e3a\u4e86\u786e\u4fddGearpump\u7684Master\u7684\u9ad8\u53ef\u7528\u6027\uff0c\u5b83\u4f7f\u7528\u4e86Akka clustering\u3002\u8fd9\u4e2a\u96c6\u7fa4\u7531\u51e0\u4e2aMaster\u7ec4\u6210\uff08\u4e0d\u5305\u62ecWorker\uff09\u3002\u901a\u8fc7Clustering\u529f\u80fd\uff0c\u53ef\u4ee5\u8f7b\u677e\u68c0\u6d4b\u5230Master\u7684\u5d29\u6e83\u5e76\u8fdb\u884c\u76f8\u5e94\u7684\u5904\u7406\u3002Master\u7684\u72b6\u6001\u901a\u8fc7akka-data-replication\u590d\u5236\u5230\u6240\u6709Master\u8282\u70b9\u4e0a\uff0c\u5373\u4f7f\u67d0\u4e2aMaster\u5d29\u6e83\uff0c\u5176\u4ed6Master\u4e5f\u53ef\u4ee5\u83b7\u53d6\u72b6\u6001\u5e76\u63a5\u7ba1\u539f\u6765\u7684Master\u3002Master\u7684\u72b6\u6001\u5305\u542b\u6240\u6709\u5e94\u7528\u7a0b\u5e8f\u7684\u8f93\u5165\u4fe1\u606f\u3002\u5982\u679c\u67d0\u4e2a\u5e94\u7528\u7a0b\u5e8f\u505c\u6b62\uff0cMaster\u8282\u70b9\u53ef\u4ee5\u4f7f\u7528\u8f93\u5165\u4fe1\u606f\u6765\u6062\u590d\u5e94\u7528\u7a0b\u5e8f\u3002\u4e3a\u4e86\u8868\u793a\u8fd9\u4e2a\u72b6\u6001\uff0c\u4f7f\u7528\u4e86CRDT LWWMap\uff08\u6700\u540e\u5199\u5165\u8005\u83b7\u80dc\u6620\u5c04\uff09\u3002\u72b6\u6001\u672c\u8eab\u662f\u4e00\u4e2a\u80fd\u591f\u65e0\u51b2\u7a81\u5730\u6db5\u76d6\u5206\u5e03\u5f0f\u8282\u70b9\u4fe1\u606f\u7684HashMap\u3002\u4e3a\u4e86\u786e\u4fdd\u6570\u636e\u7684\u5f3a\u4e00\u81f4\u6027\uff0cMaster\u7684\u72b6\u6001\u8bfb\u5199\u662f\u5728\u83b7\u53d6Master\u8282\u70b9\u4e4b\u95f4\u7684\u6cd5\u5b9a\u4eba\u6570\u540e\u8fdb\u884c\u7684\u3002<\/p>\n<h3>\u6211\u4eec\u5982\u4f55\u5e94\u5bf9\u5931\u8d25\uff1f<\/h3>\n<p>\u7531\u4e8eAkka\u5f3a\u5927\u7684Actor\u7ba1\u7406\u529f\u80fd\uff0c\u6211\u4eec\u80fd\u591f\u8f7b\u677e\u6784\u5efa\u5f39\u6027\u7cfb\u7edf\u3002\u5728Gearpump\u4e2d\uff0c\u6211\u4eec\u4e3a\u6bcf\u4e2a\u5e94\u7528\u7a0b\u5e8f\u4fdd\u7559\u4e00\u4e2aAppMaster\u5b9e\u4f8b\uff0c\u5b83\u4eec\u5f7c\u6b64\u5b8c\u5168\u9694\u79bb\u3002\u6bcf\u4e2a\u5e94\u7528\u7a0b\u5e8f\u90fd\u6709\u4e00\u4e2a\u7ba1\u7406\u6811\uff0c\u6309\u7167AppMaster-&gt;Executor-&gt;Task\u7684\u987a\u5e8f\u6392\u5217\u3002\u901a\u8fc7\u8fd9\u79cd\u7ba1\u7406\u5c42\u6b21\u7ed3\u6784\uff0c\u6211\u4eec\u53ef\u4ee5\u6446\u8131\u50f5\u5c38\u8fdb\u7a0b\u7684\u6050\u60e7\u3002\u4f8b\u5982\uff0c\u505c\u6b62AppMaster\u65f6\uff0c\u4f1a\u5148\u786e\u8ba4\u6574\u4e2a\u7ba1\u7406\u5c42\u6b21\u7ed3\u6784\u90fd\u5df2\u7ed3\u675f\uff0c\u7136\u540e\u518d\u505c\u6b62\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u53ef\u80fd\u53d1\u751f\u7684\u591a\u79cd\u969c\u788d\u60c5\u666f\u7684\u63cf\u8ff0\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/145-0.png\" alt=\"failures.png\" \/><\/div>\n<h4>\u5f53\u4e3b\u5e2d\u53d1\u751f\u4ec0\u4e48\u4e8b\u60c5\u65f6\u4f1a\u53d1\u751f\u4ec0\u4e48\uff1f<\/h4>\n<p>\u5982\u679c\u4e3b\u8282\u70b9\u5d29\u6e83\uff0c\u5c06\u901a\u77e5\u5907\u4efd\u4e3b\u8282\u70b9\uff0c\u5e76\u5728\u6062\u590d\u4e3b\u8282\u70b9\u72b6\u6001\u540e\u63a5\u7ba1\u63a7\u5236\u6743\u3002\u540c\u65f6\uff0c\u8fd8\u4f1a\u901a\u77e5\u5de5\u4f5c\u8282\u70b9\u548c\u5e94\u7528\u4e3b\u8282\u70b9\uff0c\u5f00\u59cb\u641c\u7d22\u65b0\u7684\u6d3b\u8dc3\u4e3b\u8282\u70b9\uff0c\u5e76\u6301\u7eed\u6267\u884c\u8be5\u8fc7\u7a0b\u76f4\u5230\u5b8c\u6210\u89e3\u6790\u3002\u5982\u679c\u5e94\u7528\u4e3b\u8282\u70b9\u548c\u5de5\u4f5c\u8282\u70b9\u65e0\u6cd5\u68c0\u6d4b\u5230\u65b0\u7684\u4e3b\u8282\u70b9\u5e76\u4e14\u8d85\u65f6\uff0c\u5c06\u505c\u6b62\u81ea\u8eab\u3002<\/p>\n<h4>\u5f53\u5de5\u4eba\u53d1\u751f\u4e8b\u6545\u65f6\u4f1a\u53d1\u751f\u4ec0\u4e48\uff1f<\/h4>\n<p>\u5f53\u6267\u884c\u7a0b\u5e8f\u5d29\u6e83\u65f6\u4f1a\u53d1\u751f\u4ec0\u4e48\uff1f\u5982\u679cWorker\u53d1\u751f\u5d29\u6e83\uff0c\u5c06\u901a\u77e5Master\uff0c\u5e76\u505c\u6b62\u4e3a\u8be5Worker\u5206\u914d\u65b0\u7684\u5904\u7406\u4efb\u52a1\u3002\u5d29\u6e83\u7684Worker\u4e0a\u7684\u6267\u884c\u5668\u5c06\u88ab\u505c\u6b62\uff0cAppMaster\u5c06\u91c7\u53d6\u4e0e\u6267\u884c\u5668\u5d29\u6e83\u65f6\u76f8\u540c\u7684\u5904\u7406\u63aa\u65bd\u3002<\/p>\n<h4>\u5f53AppMaster\u5d29\u6e83\u65f6\u4f1a\u53d1\u751f\u4ec0\u4e48\uff1f<\/h4>\n<p>\u5982\u679cAppMaster\u5d29\u6e83\uff0cMaster\u5c06\u4ece\u5176\u4ed6\u5730\u65b9\u83b7\u53d6\u8d44\u6e90\u6765\u751f\u6210\u65b0\u7684AppMaster\u5e76\u542f\u52a8\u3002\u542f\u52a8\u540e\uff0cAppMaster\u5c06\u8fdb\u884c\u5e94\u7528\u7a0b\u5e8f\u7684\u6062\u590d\u5904\u7406\u3002\u5728\u6d41\u5904\u7406\u4e2d\uff0c\u4ece\u78c1\u76d8\u52a0\u8f7d\u6700\u65b0\u7684\u6700\u5c0f\u65f6\u949f\u548c\u5176\u4ed6\u72b6\u6001\uff0c\u5e76\u5411Master\u53d1\u9001\u8d44\u6e90\u8bf7\u6c42\u4ee5\u542f\u52a8Executor\uff0c\u5e76\u4f7f\u7528\u83b7\u53d6\u7684\u8d44\u6e90\u4ee5\u6700\u5c0f\u65f6\u949f\u52a0\u8f7d\u4efb\u52a1\u7ec4\u6765\u8fdb\u884c\u6062\u590d\u3002<\/p>\n<h4>\u5f53\u6267\u884c\u7a0b\u5e8f\u5d29\u6e83\u65f6\u4f1a\u53d1\u751f\u4ec0\u4e48\uff1f<\/h4>\n<p>\u5982\u679c\u6267\u884c\u5668\u5d29\u6e83\uff0c\u5c06\u901a\u77e5\u4e0a\u7ea7AppMaster\uff0c\u5e76\u4eceMaster\u63a5\u6536\u7528\u4e8e\u542f\u52a8\u65b0\u6267\u884c\u5668\u7684\u8d44\u6e90\uff0c\u7136\u540e\u91cd\u65b0\u5206\u914d\u5d29\u6e83\u6267\u884c\u5668\u6b63\u5728\u6267\u884c\u7684\u4efb\u52a1\u3002<\/p>\n<h4>\u4efb\u52a1\u5d29\u6e83\u65f6\u4f1a\u53d1\u751f\u4ec0\u4e48\uff1f<\/h4>\n<p>\u5982\u679c\u4efb\u52a1\u629b\u51fa\u5f02\u5e38\uff0c\u5c06\u901a\u77e5\u4e0a\u4e00\u7ea7\u6267\u884c\u5668\uff0c\u5e76\u91cd\u65b0\u542f\u52a8\u4efb\u52a1\u3002<\/p>\n<p>\u5982\u679c\u542f\u7528\u4e86\u201c\u81f3\u5c11\u4e00\u6b21\u201d\u6a21\u5f0f\uff0c\u90a3\u4e48\u5c06\u542f\u52a8\u7531\u4e8e\u6d88\u606f\u4e22\u5931\u800c\u5bfc\u81f4\u7684\u91cd\u65b0\u6267\u884c\u3002\u9996\u5148\uff0cAppMaster\u4ece\u5168\u5c40\u65f6\u949f\u670d\u52a1\uff08\u5728\u5168\u5c40\u65f6\u949f\u670d\u52a1\u5d29\u6e83\u65f6\u4eceClockStorage\u4e2d\u83b7\u53d6\uff09\u83b7\u53d6\u6700\u65b0\u7684\u6700\u5c0f\u65f6\u949f\uff0c\u5e76\u91cd\u65b0\u542f\u52a8\u6240\u6709\u7684TaskActor\uff0c\u540c\u65f6\u9644\u5e26\u65b0\u7684\u4efb\u52a1\u72b6\u6001\u3002\u7ed3\u679c\u662f\uff0c\u6570\u636e\u6e90\u548c\u4efb\u52a1\u7ec4\u5c06\u4f7f\u7528\u6307\u5b9a\u7684\u6700\u5c0f\u65f6\u949f\u5bf9\u6d88\u606f\u8fdb\u884c\u91cd\u65b0\u5904\u7406\u3002<\/p>\n<p>AppMaster\u6267\u884c\u7684\u91cd\u65b0\u542f\u52a8\u53ef\u80fd\u4f1a\u5bfc\u81f4\u4efb\u52a1\u6545\u969c\uff0c\u4f46\u8fd9\u6837\u505a\u7684\u5f71\u54cd\u4f3c\u4e4e\u5f88\u5927\u3002\u7136\u800c\uff0c\u7531\u4e8e\u5176\u5904\u7406\u901f\u5ea6\u5f88\u5feb\uff0c\u5c3d\u7ba1\u53d1\u751f\u6545\u969c\u4f1a\u4ea7\u751f\u8f83\u5927\u5f71\u54cd\uff0c\u4f46\u91c7\u53d6\u8fc5\u901f\u6062\u590d\u7684\u65b9\u6cd5\u53ef\u80fd\u66f4\u4e3a\u5408\u9002\u3002<\/p>\n<h3>\u5de5\u4f5c\u662f\u5982\u4f55\u8fdb\u884c\u7684\uff1f<\/h3>\n<p>\u5728\u67d0\u4e9b\u5e94\u7528\u4e2d\uff0c\u201c\u4ec5\u5904\u7406\u4e00\u6b21\u201d\u6d88\u606f\u5904\u7406\u6a21\u578b\u975e\u5e38\u91cd\u8981\u3002\u4f8b\u5982\uff0c\u5728\u5b9e\u65f6\u652f\u4ed8\u7cfb\u7edf\u4e2d\uff0c\u4e0d\u53ef\u91cd\u590d\u8fdb\u884c\u652f\u4ed8\u3002 \u201c\u4ec5\u5904\u7406\u4e00\u6b21\u201d\u6d88\u606f\u5904\u7406\u6a21\u578b\u7684\u76ee\u6807\u662f\u786e\u4fdd\u201c\u4e0d\u79ef\u7d2f\u9519\u8bef\uff0c\u4eca\u5929\u7684\u9519\u8bef\u4e5f\u4e0d\u4f1a\u79ef\u7d2f\u5230\u660e\u5929\u3002\u201d<\/p>\n<p>\u5f53\u5411\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u8005\u89e3\u91ca\u65f6\uff0c\u6211\u4eec\u4f7f\u7528\u5168\u5c40\u65f6\u949f\u6765\u540c\u6b65\u5206\u5e03\u5f0f\u4e8b\u52a1\u3002\u6211\u4eec\u786e\u4fdd\u4ece\u6570\u636e\u6e90\u83b7\u53d6\u7684\u6240\u6709\u6d88\u606f\u90fd\u5177\u6709\u552f\u4e00\u7684\u65f6\u95f4\u6233\u3002\u8fd9\u4e2a\u65f6\u95f4\u6233\u8981\u4e48\u4f5c\u4e3a\u6d88\u606f\u6b63\u6587\u7684\u4e00\u90e8\u5206\u4fdd\u5b58\uff0c\u8981\u4e48\u5728\u5c06\u5176\u6295\u5165\u6d41\u5f0f\u5904\u7406\u7cfb\u7edf\u65f6\uff0c\u6839\u636e\u7cfb\u7edf\u65f6\u949f\u6765\u8d4b\u4e88\u5b83\u3002\u901a\u8fc7\u4f7f\u7528\u8fd9\u4e2a\u5168\u5c40\u540c\u6b65\u65f6\u949f\uff0c\u6211\u4eec\u80fd\u591f\u534f\u8c03\u6240\u6709\u4efb\u52a1\u4f7f\u7528\u76f8\u540c\u7684\u65f6\u95f4\u6233\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/161-0.png\" alt=\"checkpointing.png\" \/><\/div>\n<p>\u83b7\u53d6\u72b6\u6001\u68c0\u67e5\u70b9\u7684\u6d41\u7a0b\uff1a<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u534f\u8c03\u5458\u901a\u77e5Streaming\u7cfb\u7edf\uff0c\u5728\u65f6\u95f4\u6233Tc\u5904\u83b7\u53d6\u68c0\u67e5\u70b9\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u6bcf\u4e2a\u4efb\u52a1\u5728\u5e94\u7528\u7a0b\u5e8f\u4e2d\u4fdd\u6301&#8221;\u68c0\u67e5\u70b9\u72b6\u6001&#8221;\u548c&#8221;\u5f53\u524d\u72b6\u6001&#8221;\u8fd9\u4e24\u4e2a\u503c\u3002&#8221;\u68c0\u67e5\u70b9\u72b6\u6001&#8221;\u4ec5\u4fdd\u7559\u4e0a\u4e00\u6b21\u65f6\u95f4\u6233Tc\u7684\u503c\uff0c\u800c&#8221;\u5f53\u524d\u72b6\u6001&#8221;\u5219\u4fdd\u7559\u7740\u6240\u6709\u4fe1\u606f\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u5982\u679c&#8221;\u5168\u5c40\u6700\u5c0f\u65f6\u949f&#8221;\u5927\u4e8eTc\uff0c\u5219\u8868\u793a\u6240\u6709\u5177\u6709\u65e9\u4e8eTc\u503c\u7684\u6d88\u606f\u5df2\u88ab\u5904\u7406\u3002\u7531\u4e8e&#8221;\u68c0\u67e5\u70b9\u72b6\u6001&#8221;\u53d1\u751f\u53d8\u5316\uff0c\u56e0\u6b64\u5728\u4fee\u6539\u540e\u5c06\u5176\u4fdd\u5b58\u5230\u5b58\u50a8\u4e2d\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u5982\u679c\u53d1\u751f\u6d88\u606f\u4e22\u5931\uff0c\u5219\u542f\u52a8\u6062\u590d\u8fc7\u7a0b\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u4e3a\u4e86\u6062\u590d\uff0c\u4ece\u5b58\u50a8\u5668\u4e2d\u8bfb\u53d6\u6700\u65b0\u7684&#8221;\u68c0\u67e5\u70b9\u72b6\u6001&#8221;\u5e76\u8bbe\u7f6e\u4e3a\u5e94\u7528\u7a0b\u5e8f\u7684\u72b6\u6001\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\u6570\u636e\u6e90\u4ece&#8221;\u68c0\u67e5\u70b9\u65f6\u95f4\u6233&#8221;\u91cd\u65b0\u83b7\u53d6\u6d88\u606f\u5e76\u6267\u884c\u3002<\/ol>\n<p>&#8220;\u68c0\u67e5\u70b9\u83b7\u53d6\u95f4\u9694\u7531\u5168\u5c40\u65f6\u949f\u670d\u52a1\u52a8\u6001\u51b3\u5b9a\u3002\u6bcf\u4e2a\u6570\u636e\u6e90\u8bb0\u5f55\u83b7\u53d6\u7684\u6d88\u606f\u7684\u6700\u5927\u65f6\u95f4\u6233\u3002\u5f53\u63a5\u6536\u5230\u6700\u5c0f\u65f6\u949f\u66f4\u65b0\u6d88\u606f\u65f6\uff0c\u6570\u636e\u6e90\u5c06\u4e0e\u6700\u5927\u65f6\u95f4\u6233\u7684\u5dee\u5f02\u8fd4\u56de\u7ed9\u5168\u5c40\u65f6\u949f\u670d\u52a1\u3002\u6700\u5927\u65f6\u95f4\u6233\u5dee\u5f02\u8868\u793a\u5e94\u7528\u7a0b\u5e8f\u72b6\u6001\u95f4\u9694\u7684\u4e0a\u9650\u3002\u68c0\u67e5\u70b9\u83b7\u53d6\u95f4\u9694\u5c06\u5927\u4e8e\u6700\u5927\u65f6\u95f4\u6233\u5dee\u5f02\u3002&#8221;<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/165-0.png\" alt=\"checkpoint_equation.png\" \/><\/div>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/166-0.png\" alt=\"checkpointing_interval.png\" \/><\/div>\n<p>\u5168\u5c40\u65f6\u949f\u670d\u52a1\u5411\u6bcf\u4e2a\u4efb\u52a1\u53d1\u9001\u68c0\u67e5\u70b9\u83b7\u53d6\u95f4\u9694\u901a\u77e5\u540e\uff0c\u6bcf\u4e2a\u4efb\u52a1\u5728\u4e0d\u7b49\u5f85\u6574\u4f53\u540c\u6b65\u7684\u60c5\u51b5\u4e0b\u8ba1\u7b97\u4e0b\u4e00\u4e2a\u68c0\u67e5\u70b9\u7684\u65f6\u95f4\u6233\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/168-0.png\" alt=\"checkpoint_interval_equation.png\" \/><\/div>\n<p>\u6bcf\u4e2a\u4efb\u52a1\u90fd\u4fdd\u6301&#8221;\u68c0\u67e5\u70b9\u72b6\u6001&#8221;\u548c&#8221;\u5f53\u524d\u72b6\u6001&#8221;\uff0c\u4f46\u662f\u72b6\u6001\u503c\u4f1a\u50cf\u4e0b\u9762\u7684\u4ee3\u7801\u4e00\u6837\u88ab\u66f4\u65b0\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"n\">TaskState<\/span><span class=\"p\">(<\/span><span class=\"n\">stateStore<\/span><span class=\"p\">,<\/span> <span class=\"n\">initialTimeStamp<\/span><span class=\"p\">):<\/span>\r\n  <span class=\"n\">currentState<\/span> <span class=\"o\">=<\/span> <span class=\"n\">stateStore<\/span><span class=\"p\">.<\/span><span class=\"n\">load<\/span><span class=\"p\">(<\/span><span class=\"n\">initialTimeStamp<\/span><span class=\"p\">)<\/span>\r\n  <span class=\"n\">checkpointState<\/span> <span class=\"o\">=<\/span> <span class=\"n\">currentState<\/span><span class=\"p\">.<\/span><span class=\"n\">clone<\/span>\r\n  <span class=\"n\">checkpointTimestamp<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nextCheckpointTimeStamp<\/span><span class=\"p\">(<\/span><span class=\"n\">initialTimeStamp<\/span><span class=\"p\">)<\/span>\r\n\r\n<span class=\"n\">onMessage<\/span><span class=\"p\">(<\/span><span class=\"n\">msg<\/span><span class=\"p\">):<\/span>\r\n  <span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"n\">msg<\/span><span class=\"p\">.<\/span><span class=\"n\">timestamp<\/span> <span class=\"o\">&lt;<\/span> <span class=\"n\">checkpointTimestamp<\/span><span class=\"p\">):<\/span>\r\n    <span class=\"n\">checkpointState<\/span><span class=\"p\">.<\/span><span class=\"n\">updateMessage<\/span><span class=\"p\">(<\/span><span class=\"n\">msg<\/span><span class=\"p\">)<\/span>\r\n  <span class=\"n\">currentState<\/span><span class=\"p\">.<\/span><span class=\"n\">updateMessage<\/span><span class=\"p\">(<\/span><span class=\"n\">msg<\/span><span class=\"p\">)<\/span>  \r\n  <span class=\"n\">maxClock<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">max<\/span><span class=\"p\">(<\/span><span class=\"n\">maxClock<\/span><span class=\"p\">,<\/span> <span class=\"n\">msg<\/span><span class=\"p\">.<\/span><span class=\"n\">timeStamp<\/span><span class=\"p\">)<\/span>\r\n\r\n<span class=\"n\">onMinClock<\/span><span class=\"p\">(<\/span><span class=\"n\">minClock<\/span><span class=\"p\">):<\/span>\r\n  <span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"n\">minClock<\/span> <span class=\"o\">&gt;<\/span> <span class=\"n\">checkpointTimestamp<\/span><span class=\"p\">):<\/span>\r\n    <span class=\"n\">stateStore<\/span><span class=\"p\">.<\/span><span class=\"n\">persist<\/span><span class=\"p\">(<\/span><span class=\"n\">checkpointState<\/span><span class=\"p\">)<\/span>\r\n    <span class=\"n\">checkpointTimeStamp<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nextCheckpointTimeStamp<\/span><span class=\"p\">(<\/span><span class=\"n\">maxClock<\/span><span class=\"p\">)<\/span>\r\n    <span class=\"n\">checkpointState<\/span> <span class=\"o\">=<\/span> <span class=\"n\">currentState<\/span><span class=\"p\">.<\/span><span class=\"n\">clone<\/span>\r\n\r\n<span class=\"n\">onNewCheckpointInterval<\/span><span class=\"p\">(<\/span><span class=\"n\">newStep<\/span><span class=\"p\">):<\/span>\r\n  <span class=\"n\">step<\/span> <span class=\"o\">=<\/span> <span class=\"n\">newStep<\/span>  \r\n\r\n<span class=\"n\">nextCheckpointTimeStamp<\/span><span class=\"p\">(<\/span><span class=\"n\">timestamp<\/span><span class=\"p\">):<\/span>\r\n  <span class=\"n\">checkpointTimestamp<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"mi\">1<\/span> <span class=\"o\">+<\/span> <span class=\"n\">timestamp<\/span><span class=\"o\">\/<\/span><span class=\"n\">step<\/span><span class=\"p\">)<\/span> <span class=\"o\">*<\/span> <span class=\"n\">step<\/span>\r\n<\/code><\/pre>\n<p>\u5217\u88681\uff1a\u4efb\u52a1\u4e8b\u52a1\u72b6\u6001\u5b9e\u73b0<\/p>\n<p>\u4ece\u5916\u89c2\u4e0a\u770b\uff0c\u7531\u4e8e\u6d88\u606f\u7684\u65f6\u95f4\u6233\u9650\u5236\u4e86\u6d88\u606f\u7684\u552f\u4e00\u6027\uff0c\u800c\u4e14\u901a\u8fc7\u5b9e\u73b0Monoid\u53ef\u4ee5\u5c06\u72b6\u6001\u6309\u7167\u65f6\u95f4\u6233\u4fdd\u6301\uff0cGearpump\u672c\u8eab\u5c31\u5177\u5907\u4e86\u53bb\u9664\u91cd\u590d\u503c\u7684\u673a\u5236\uff0c\u4ece\u800c\u6ee1\u8db3Exactly once\u7684\u8981\u6c42\u3002\u7136\u800c\uff0cGearpump\u672c\u8eab\u53ea\u662f\u4e00\u4e2a\u6267\u884c\u5f15\u64ce\uff0c\u9700\u8981\u5c06\u7ed3\u679c\u8f93\u51fa\u5230\u5176\u4ed6\u7cfb\u7edf\u3002\u4e00\u65e6\u9700\u8981\u8fd9\u6837\u505a\uff0c\u5c31\u4e0d\u518d\u6ee1\u8db3Exactly once\u7684\u8981\u6c42\u4e86\u3002\u5982\u679c\u5728Interval\u671f\u95f4Executor\u5d29\u6e83\uff0cExecutor\u4e2d\u5df2\u7ecf\u53d1\u9001\u5230\u5916\u90e8\u7684\u4efb\u52a1\u7684\u6d88\u606f\u5c06\u65e0\u6cd5\u8ffd\u8e2a\u3002\u7136\u800c\uff0c\u57fa\u4e8e\u65f6\u95f4\u6233\u7684\u552f\u4e00\u6027\u7279\u6027\uff0c\u53bb\u9664\u91cd\u590d\u6d88\u606f\u5e94\u8be5\u662f\u4e00\u4e2a\u8f83\u5bb9\u6613\u5b9e\u73b0\u7684\u67b6\u6784\u3002<\/p>\n<h3>\u4ec0\u4e48\u662f\u52a8\u6001\u56fe\uff0c\u4ee5\u53ca\u5b83\u7684\u5de5\u4f5c\u539f\u7406\u662f\u4ec0\u4e48\uff1f sh\u00ec t\u00fa, t\u0101 de sh\u00ec ?)<\/h3>\n<p>DAG \u53ef\u4ee5\u8fdb\u884c\u52a8\u6001\u66f4\u65b0\u3002\u53ef\u4ee5\u52a8\u6001\u5730\u6dfb\u52a0\u3001\u5220\u9664\u548c\u66f4\u65b0\u56fe\u5143\u7d20\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/175-0.png\" alt=\"dynamic.png\" \/><\/div>\n<h2>\u81f3\u5c11\u786e\u4fdd\u6d88\u606f\u4f20\u9012\u548cKafka\u6210\u529f\u8fd0\u4f5c\u4e00\u6b21\u3002<\/h2>\n<p>\u60a8\u53ef\u4ee5\u5728\u4ee5\u4e0b\u4f4d\u7f6e\u627e\u5230Kafka\u6e90\u4ee3\u7801\u793a\u4f8b\u9879\u76ee\u548c\u6559\u7a0b\uff1a<br \/>\n&#8211; Kafka\u8fde\u63a5\u5668\u793a\u4f8b\u9879\u76ee<br \/>\n&#8211; \u4e0eKafka\u6e90\u8fdb\u884c\u8fde\u63a5<\/p>\n<p>\u5728\u672c\u6587\u4ef6\u4e2d\uff0c\u6211\u4eec\u5c06\u63cf\u8ff0\u5982\u4f55\u5b9e\u73b0&#8221;\u81f3\u5c11\u4e00\u6b21&#8221;\u6a21\u578b\u3002<\/p>\n<p>\u5982\u679c\u5c06WordCountExample\u8868\u793a\u4e3a\u56fe\u8868\uff0c\u5982\u4e0b\u6240\u793a\u3002\u6e90\u4ee3\u7801\u6811\u3002 (Pinyin: WordCountExample , de . sh\u00f9.)<\/p>\n<h3>\u5361\u592b\u5361\u7684WordCount\u6709\u5411\u65e0\u73af\u56fe\u662f\u4ec0\u4e48\u6837\u5b50\u7684\uff1f<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/181-0.png\" alt=\"kafka_wordcount.png\" \/><\/div>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">KafkaStreamProducer(or KafkaSource)\u304cKafka queue\u304b\u3089\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Split\u304c\u6587\u7ae0\u3092\u5358\u8a9e\u306b\u5206\u5272<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Sum\u304c\u5404\u5358\u8a9e\u306e\u51fa\u73fe\u6570\u3092\u96c6\u8a08<\/ul>\n<h3>\u5982\u4f55\u4eceKafka\u8bfb\u53d6\u6570\u636e<\/h3>\n<p>\u4f7f\u7528KafkaSource\u8fdb\u884c\u8fde\u63a5\u3002\u8fde\u63a5\u65b9\u6cd5\u8bf7\u53c2\u8003\u4e0b\u65b9\u5730\u5740\u3002<\/p>\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5c06StartTimestamp\u8bbe\u7f6e\u4e3aKafkaSource\uff0c\u5e76\u5728\u4eceKafka\u961f\u5217\u4e2d\u83b7\u53d6\u6d88\u606f\u65f6\uff0c\u4ece\u4fdd\u6301\u6b64Timestamp\u503c\u4ee5\u4e0a\u7684\u6700\u5c0fTimestamp\u6d88\u606f\u5f00\u59cb\u83b7\u53d6\u3002<\/p>\n<h3>\u5728\u4efb\u52a1\u5d29\u6e83\u6216\u6d88\u606f\u4e22\u5931\u7684\u60c5\u51b5\u4e0b\u4f1a\u53d1\u751f\u4ec0\u4e48\uff1f<\/h3>\n<p>\u5982\u679c\u53d1\u751f\u4e86\u6d88\u606f\u4e22\u5931\uff0cAppMaster\u4f1a\u505c\u6b62Global Clock Service\uff0c\u5e76\u56fa\u5b9aGlobal minimum timestamp\u3002\u7136\u540e\uff0c\u91cd\u65b0\u542f\u52a8KafkaSource\u4efb\u52a1\u65f6\uff0cKafkaSource\u4f1a\u4eceAppMaster\u83b7\u53d6Global minimum timestamp\uff0c\u5e76\u7528\u4e8e\u5f00\u59cb\u83b7\u53d6\u6d88\u606f\u3002<\/p>\n<h3>KafkaSource \u662f\u5982\u4f55\u4f7f\u7528\u54ea\u79cd\u65b9\u6cd5\u4ece\u8d77\u59cb\u65f6\u95f4\u6233\u8bfb\u53d6\u6d88\u606f\u7684\u5462\uff1f\u6b63\u5982\u6211\u4eec\u6240\u4e86\u89e3\u7684\uff0cKafka\u961f\u5217\u4e0d\u4f1a\u66b4\u9732\u65f6\u95f4\u6233\u4fe1\u606f\u3002<\/h3>\n<p>Kafka\u961f\u5217\u53ea\u516c\u5f00\u4e0e\u6bcf\u4e2aPartition\u76f8\u5173\u7684\u504f\u79fb\u4fe1\u606f\u3002KafkaSource\u4f1a\u5bf9Kafka\u504f\u79fb\u548c\u5e94\u7528\u7a0b\u5e8f\u65f6\u95f4\u6233\u8fdb\u884c\u6620\u5c04\u548c\u4fdd\u5b58\uff0c\u56e0\u6b64\u53ef\u4ee5\u6839\u636e\u65f6\u95f4\u6233\u6307\u5b9aKafka\u504f\u79fb\u6765\u83b7\u53d6\u6d88\u606f\uff0c\u5e76\u4e14\u53ef\u4ee5\u91cd\u65b0\u4eceKafka\u83b7\u53d6\u6d88\u606f\u3002<\/p>\n<p>\u5e94\u7528\u7a0b\u5e8f\u65f6\u95f4\u6233\u548c\u504f\u79fb\u7684\u6620\u5c04\u53ef\u4ee5\u5b58\u50a8\u4e3a\u5206\u5e03\u5f0f\u6587\u4ef6\u7cfb\u7edf\uff0c\u6216\u4f5c\u4e3aKafka\u4e3b\u9898\u8fdb\u884c\u4fdd\u7559\u3002<\/p>\n<h1>\u6700\u540e<\/h1>\n<p>\u6211\u5df2\u7ecf\u9605\u8bfb\u4e86Gearpump\u7684\u6982\u8ff0\u6587\u6863\u5230\u8fd9\u4e2a\u5730\u65b9\uff0c\u5173\u4e8e\u6700\u8ba9\u6211\u5173\u6ce8\u7684Exactly once\u95ee\u9898\uff0c\u6839\u636e\u65f6\u95f4\u6233\u7684\u5206\u914d\u65b9\u5f0f\uff0cGearpump\u5185\u90e8\u4f3c\u4e4e\u53ef\u4ee5\u4fdd\u6301\u72b6\u6001\u5e76\u786e\u8ba4\u8fd9\u4e00\u70b9\u3002\u7136\u800c\uff0c\u7531\u4e8e\u53ef\u80fd\u4f1a\u51fa\u73b0\u91cd\u590d\u5904\u7406\u7684\u60c5\u51b5\uff0c\u9700\u8981\u5728\u7ed3\u679c\u5b58\u50a8\u4f4d\u7f6e\u8fdb\u884c\u4e00\u4e9b\u91cd\u590d\u5220\u9664\u5904\u7406\uff0c\u8fd9\u662f\u76ee\u524d\u7684\u60f3\u6cd5\u3002\u4e0d\u8fc7\uff0c\u7531\u4e8e\u53ef\u4ee5\u4f7f\u7528\u65f6\u95f4\u6233\u6765\u552f\u4e00\u8bc6\u522b\u6d88\u606f\uff0c\u5728\u5b58\u50a8\u4f4d\u7f6e\u4e0a\u4e5f\u53ef\u4ee5\u5f88\u5bb9\u6613\u5730\u521b\u5efa\u91cd\u590d\u5220\u9664\u673a\u5236\u3002<\/p>\n<p>\u56e0\u4e3a\u5728\u8fd9\u91cc\u5df2\u7ecf\u63ed\u793a\u4e86Gearpump\u7684\u6982\u8ff0\uff0c\u6240\u4ee5\u4e0b\u4e00\u6b65\u6211\u4eec\u5c06\u8fdb\u5165\u5b9e\u9645\u64cd\u4f5c\u7684\u6b65\u9aa4\uff0c\u770b\u770b\u5b83\u662f\u4ec0\u4e48\u6837\u5b50\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f60\u597d\u3002 \u7531\u4e8e\u6211\u5df2\u7ecf\u4e86\u89e3\u4e86Gearpump\u7684\u6982\u8981\uff0c\u6240\u4ee5\u8fd9\u6b21\u6211\u6253\u7b97\u770b\u4e00\u4e0b\u5176\u7ec4\u6210\u6982\u89c8\u3002\u6211\u53c2\u8003\u7684\u662fGearpump\u5b98\u7f51 [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-47013","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Gearpump\u7684\u5b9e\u65f6\u5904\u7406\u57fa\u7840\u67b6\u6784\u662f\u5982\u4f55\u7ec4\u6210\u7684\uff1f - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/gearpump\u7684\u5b9e\u65f6\u5904\u7406\u57fa\u7840\u67b6\u6784\u662f\u5982\u4f55\u7ec4\u6210\u7684\uff1f\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Gearpump\u7684\u5b9e\u65f6\u5904\u7406\u57fa\u7840\u67b6\u6784\u662f\u5982\u4f55\u7ec4\u6210\u7684\uff1f\" \/>\n<meta property=\"og:description\" content=\"\u4f60\u597d\u3002 \u7531\u4e8e\u6211\u5df2\u7ecf\u4e86\u89e3\u4e86Gearpump\u7684\u6982\u8981\uff0c\u6240\u4ee5\u8fd9\u6b21\u6211\u6253\u7b97\u770b\u4e00\u4e0b\u5176\u7ec4\u6210\u6982\u89c8\u3002\u6211\u53c2\u8003\u7684\u662fGearpump\u5b98\u7f51 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/gearpump\u7684\u5b9e\u65f6\u5904\u7406\u57fa\u7840\u67b6\u6784\u662f\u5982\u4f55\u7ec4\u6210\u7684\uff1f\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-30T02:20:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-04T05:02:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/9-0.png\" \/>\n<meta name=\"author\" content=\"\u6e05, \u5b87\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u5b87\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/gearpump%e7%9a%84%e5%ae%9e%e6%97%b6%e5%a4%84%e7%90%86%e5%9f%ba%e7%a1%80%e6%9e%b6%e6%9e%84%e6%98%af%e5%a6%82%e4%bd%95%e7%bb%84%e6%88%90%e7%9a%84%ef%bc%9f\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/gearpump%e7%9a%84%e5%ae%9e%e6%97%b6%e5%a4%84%e7%90%86%e5%9f%ba%e7%a1%80%e6%9e%b6%e6%9e%84%e6%98%af%e5%a6%82%e4%bd%95%e7%bb%84%e6%88%90%e7%9a%84%ef%bc%9f\/\",\"name\":\"Gearpump\u7684\u5b9e\u65f6\u5904\u7406\u57fa\u7840\u67b6\u6784\u662f\u5982\u4f55\u7ec4\u6210\u7684\uff1f - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2024-01-30T02:20:41+00:00\",\"dateModified\":\"2024-05-04T05:02:31+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/gearpump%e7%9a%84%e5%ae%9e%e6%97%b6%e5%a4%84%e7%90%86%e5%9f%ba%e7%a1%80%e6%9e%b6%e6%9e%84%e6%98%af%e5%a6%82%e4%bd%95%e7%bb%84%e6%88%90%e7%9a%84%ef%bc%9f\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/gearpump%e7%9a%84%e5%ae%9e%e6%97%b6%e5%a4%84%e7%90%86%e5%9f%ba%e7%a1%80%e6%9e%b6%e6%9e%84%e6%98%af%e5%a6%82%e4%bd%95%e7%bb%84%e6%88%90%e7%9a%84%ef%bc%9f\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/gearpump%e7%9a%84%e5%ae%9e%e6%97%b6%e5%a4%84%e7%90%86%e5%9f%ba%e7%a1%80%e6%9e%b6%e6%9e%84%e6%98%af%e5%a6%82%e4%bd%95%e7%bb%84%e6%88%90%e7%9a%84%ef%bc%9f\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Gearpump\u7684\u5b9e\u65f6\u5904\u7406\u57fa\u7840\u67b6\u6784\u662f\u5982\u4f55\u7ec4\u6210\u7684\uff1f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\",\"name\":\"\u6e05, \u5b87\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u5b87\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/gearpump%e7%9a%84%e5%ae%9e%e6%97%b6%e5%a4%84%e7%90%86%e5%9f%ba%e7%a1%80%e6%9e%b6%e6%9e%84%e6%98%af%e5%a6%82%e4%bd%95%e7%bb%84%e6%88%90%e7%9a%84%ef%bc%9f\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Gearpump\u7684\u5b9e\u65f6\u5904\u7406\u57fa\u7840\u67b6\u6784\u662f\u5982\u4f55\u7ec4\u6210\u7684\uff1f - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/gearpump\u7684\u5b9e\u65f6\u5904\u7406\u57fa\u7840\u67b6\u6784\u662f\u5982\u4f55\u7ec4\u6210\u7684\uff1f\/","og_locale":"zh_CN","og_type":"article","og_title":"Gearpump\u7684\u5b9e\u65f6\u5904\u7406\u57fa\u7840\u67b6\u6784\u662f\u5982\u4f55\u7ec4\u6210\u7684\uff1f","og_description":"\u4f60\u597d\u3002 \u7531\u4e8e\u6211\u5df2\u7ecf\u4e86\u89e3\u4e86Gearpump\u7684\u6982\u8981\uff0c\u6240\u4ee5\u8fd9\u6b21\u6211\u6253\u7b97\u770b\u4e00\u4e0b\u5176\u7ec4\u6210\u6982\u89c8\u3002\u6211\u53c2\u8003\u7684\u662fGearpump\u5b98\u7f51 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/gearpump\u7684\u5b9e\u65f6\u5904\u7406\u57fa\u7840\u67b6\u6784\u662f\u5982\u4f55\u7ec4\u6210\u7684\uff1f\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2024-01-30T02:20:41+00:00","article_modified_time":"2024-05-04T05:02:31+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7c39913a08637a69b9ff\/9-0.png"}],"author":"\u6e05, \u5b87","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u5b87","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/gearpump%e7%9a%84%e5%ae%9e%e6%97%b6%e5%a4%84%e7%90%86%e5%9f%ba%e7%a1%80%e6%9e%b6%e6%9e%84%e6%98%af%e5%a6%82%e4%bd%95%e7%bb%84%e6%88%90%e7%9a%84%ef%bc%9f\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/gearpump%e7%9a%84%e5%ae%9e%e6%97%b6%e5%a4%84%e7%90%86%e5%9f%ba%e7%a1%80%e6%9e%b6%e6%9e%84%e6%98%af%e5%a6%82%e4%bd%95%e7%bb%84%e6%88%90%e7%9a%84%ef%bc%9f\/","name":"Gearpump\u7684\u5b9e\u65f6\u5904\u7406\u57fa\u7840\u67b6\u6784\u662f\u5982\u4f55\u7ec4\u6210\u7684\uff1f - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2024-01-30T02:20:41+00:00","dateModified":"2024-05-04T05:02:31+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/gearpump%e7%9a%84%e5%ae%9e%e6%97%b6%e5%a4%84%e7%90%86%e5%9f%ba%e7%a1%80%e6%9e%b6%e6%9e%84%e6%98%af%e5%a6%82%e4%bd%95%e7%bb%84%e6%88%90%e7%9a%84%ef%bc%9f\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/gearpump%e7%9a%84%e5%ae%9e%e6%97%b6%e5%a4%84%e7%90%86%e5%9f%ba%e7%a1%80%e6%9e%b6%e6%9e%84%e6%98%af%e5%a6%82%e4%bd%95%e7%bb%84%e6%88%90%e7%9a%84%ef%bc%9f\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/gearpump%e7%9a%84%e5%ae%9e%e6%97%b6%e5%a4%84%e7%90%86%e5%9f%ba%e7%a1%80%e6%9e%b6%e6%9e%84%e6%98%af%e5%a6%82%e4%bd%95%e7%bb%84%e6%88%90%e7%9a%84%ef%bc%9f\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"Gearpump\u7684\u5b9e\u65f6\u5904\u7406\u57fa\u7840\u67b6\u6784\u662f\u5982\u4f55\u7ec4\u6210\u7684\uff1f"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e","name":"\u6e05, \u5b87","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","caption":"\u6e05, \u5b87"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/gearpump%e7%9a%84%e5%ae%9e%e6%97%b6%e5%a4%84%e7%90%86%e5%9f%ba%e7%a1%80%e6%9e%b6%e6%9e%84%e6%98%af%e5%a6%82%e4%bd%95%e7%bb%84%e6%88%90%e7%9a%84%ef%bc%9f\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/47013","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=47013"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/47013\/revisions"}],"predecessor-version":[{"id":98477,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/47013\/revisions\/98477"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=47013"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=47013"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=47013"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}