{"id":137556,"date":"2020-07-14T04:00:33","date_gmt":"2020-07-13T20:00:33","guid":{"rendered":"http:\/\/4563.org\/?p=137556"},"modified":"2020-07-14T04:00:33","modified_gmt":"2020-07-13T20:00:33","slug":"protobuf-%e6%88%96%e8%80%85-thrift-%e6%96%87%e4%bb%b6%e7%ad%89%e6%96%87%e4%bb%b6%e5%a6%82%e4%bd%95%e5%9c%a8%e9%a1%b9%e7%9b%ae%e4%b8%ad%e8%bf%9b%e8%a1%8c%e7%ae%a1%e7%90%86%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=137556","title":{"rendered":"protobuf \u6216\u8005 thrift \u6587\u4ef6\u7b49\u6587\u4ef6\u5982\u4f55\u5728\u9879\u76ee\u4e2d\u8fdb\u884c\u7ba1\u7406\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  protobuf \u6216\u8005 thrift \u6587\u4ef6\u7b49\u6587\u4ef6\u5982\u4f55\u5728\u9879\u76ee\u4e2d\u8fdb\u884c\u7ba1\u7406\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jaynos <\/span>  <span><i><\/i> 6<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u95ee\u9898\u80cc\u666f\uff1a\u4e00\u4e2a\u9879\u76ee\u4f1a\u7531\u975e\u5e38\u591a\u5fae\u670d\u52a1\u7ec4\u6210\uff0c\u5176\u4e2d\u90e8\u5206\u5fae\u670d\u52a1\u91c7\u7528 Go \u7f16\u5199\uff0c\u90e8\u5206\u91c7\u7528 Java \u7f16\u5199<\/p>\n<p>\u76ee\u524d\u505a\u6cd5\u548c\u6211\u7684\u601d\u8003\uff1a\u56e0\u4e3a\u4e00\u4e2a\u670d\u52a1\u6709\u5b9e\u73b0\u65b9\u548c\u8c03\u7528\u65b9\uff0c\u6240\u4ee5 idl \u6587\u4ef6\u80af\u5b9a\u662f\u653e\u5728\u5355\u72ec\u4ed3\u5e93\u91cc\u7684\uff0c\u56e0\u4e3a\u76ee\u524d\u6539\u9020\u7684\u670d\u52a1\u53ea\u6d89\u53ca\u5230 Go\uff0c\u6240\u4ee5\u6211\u91c7\u7528\u7684\u65b9\u6cd5\u662f<\/p>\n<p>\u5c06 idl \u5355\u72ec\u7ef4\u62a4\u5728\u4e00\u4e2a repo \u5e76\u4e14\u63d0\u4f9b Makefile \u6587\u4ef6\uff0c\u7136\u540e Server \u548c Client \u4f7f\u7528 submodule \u5f15\u5165 idl \u7684 repo\uff0c\u901a\u8fc7\u5916\u90e8\u7684 Makefile \u6267\u884c<code>$(MAKE) -C \/path\/to\/idl GO_OUT_DIR=$(shell pwd)\/internal\/proto<\/code>\u8fd9\u6837\u7684\u65b9\u5f0f\u7f16\u8bd1\u5230\u5f53\u524d\u9879\u76ee\u4e2d\u3002<\/p>\n<p>\u4f46\u662f\u8003\u8651\u4e86\u4e0b\uff0c\u56e0\u4e3a\u8fd8\u6709 Java \u8c03\u7528 Go \u670d\u52a1\u7684\u9700\u6c42\uff0c\u6240\u4ee5\u6211\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u592a\u5408\u9002\u3002<\/p>\n<p>\u6240\u4ee5\u4ee5\u4e0b\u662f\u6211\u60f3\u8bf7\u6559\u7684\u95ee\u9898\uff0c\u5e0c\u671b\u5927\u4f6c\u4eec\u4e0d\u541d\u8d50\u6559!<\/p>\n<ol>\n<li>\u5bf9\u4e8e idl \u6765\u8bf4\uff0c\u9700\u8981\u8fdb\u884c\u5355\u72ec repo \u7ef4\u62a4\u561b\uff1f<\/li>\n<li>\u5bf9\u4e8e idl \u6765\u8bf4\uff0c\u9700\u8981\u4e00\u4e2a service \u7ef4\u62a4\u4e00\u4e2a repo \u4e48\uff08\u6216\u8005\u662f\u4e00\u7ec4 idl \u7ef4\u62a4\u5728\u4e00\u4e2a repo \u91cc\uff0c\u8fd9\u6837\u4f1a\u4e0d\u4f1a\u4e0d\u5408\u9002\uff1f\u56e0\u4e3a\u4e00\u4e2a\u670d\u52a1\u53ea\u9700\u8981\u4f9d\u8d56\u4e00\u5c0f\u90e8\u5206\u7684\u5b9e\u73b0\uff0c\u4f46\u662f\u5f15\u5165\u4e86\u6240\u6709\u7684 service \uff09\uff1f<\/li>\n<li>idl \u751f\u6210\u7684\u6587\u4ef6\u5982\u4f55\u8fdb\u884c\u7ef4\u62a4\uff08\u5176\u5b9e\u548c idl \u5dee\u4e0d\u591a\uff09\uff1f<\/li>\n<li>idl \u751f\u6210\u7684\u6587\u4ef6\u4e2d\u989d\u5916\u589e\u52a0\u6587\u4ef6\u4e00\u8d77\u7ef4\u62a4\uff08\u5982\u76f4\u63a5\u4ece zk \u91cc\u83b7\u53d6\u670d\u52a1\u5730\u5740\u6784\u9020\u5b8c\u6574\u7684 client \uff09?<\/li>\n<\/ol>\n<p>\u8c22\u8c22\u5927\u4f6c\u4eec~<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>4<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"2586326\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zhanchong316p <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u4eec\u7528\u7684\u662f protobuf\uff0c\u7136\u540e\u5168\u662f java \u9879\u76ee\uff0c\u505a\u6cd5\u662f\u6bcf\u4e2a\u5355\u72ec\u7684\u670d\u52a1\u7ef4\u62a4\u4e00\u4e2a protobuf \u7684 repo\uff0c\u7136\u540e\u4e00\u4e9b\u516c\u5171\u7684\u653e\u5728 proto-base \u91cc\uff0c\u5176\u4ed6\u7684 proto \u9879\u76ee\u53ea\u5141\u8bb8 import base \u3002\u5728 jenkins \u4e0a\u7ef4\u62a4\u6bcf\u4e2a repo \u6253 jar \u5305\uff0c\u9700\u8981\u7528\u5230\u7684\u9879\u76ee\u81ea\u5df1\u7ef4\u62a4\u4f9d\u8d56 jar \u5305\uff0c\u6bd4 submodule \u7684\u65b9\u5f0f\u7a0d\u5fae\u597d\u4e00\u70b9\u3002go \u9879\u76ee\u548b\u7528\u5c31\u4e0d\u592a\u6e05\u695a\u54af                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2586327\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : leishi1313 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             proto \u642d\u914d monorepo \u4f1a\u6bd4\u8f83\u8212\u670d                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2586328\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : jaynos <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zhanchong316p #1<\/p>\n<p>\u6bcf\u4e2a\u670d\u52a1\u5355\u72ec\u7ef4\u62a4\u4e00\u4e2a proto \u7684 repo\uff0c\u751f\u6210\u7684 java \u6587\u4ef6\u4e5f\u4f1a\u653e\u5728\u548c proto \u6587\u4ef6\u4e00\u4e2a repo \u561b\uff1f\u6211\u8fd9\u8fb9\u56e0\u4e3a\u6709\u90e8\u5206\u670d\u52a1\u662f go \u90e8\u5206\u662f java\uff0c\u6240\u4ee5\u600e\u4e48\u7ef4\u62a4 proto \u6587\u4ef6\u662f\u4e2a\u5934\u75bc\u95ee\u9898                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2586329\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : jaynos <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @leishi1313 #2 <\/p>\n<p>\u4e86\u89e3\u4e86\u4e0b mongorepo\uff0c\u6da8\u59ff\u52bf\u4e86\u3002<\/p>\n<p>\u611f\u89c9\u6bd4\u8f83\u9002\u5408\u90fd\u662f\u6280\u672f\u6808\u7684\u9879\u76ee\uff0c\u6211\u8fd9\u8fb9\u90e8\u5206\u670d\u52a1\u662f\u91c7\u7528 go \u5199\u7684\uff0c\u90e8\u5206\u662f java\uff0c\u5728\u4e00\u4e2a repo \u91cc\u7ef4\u62a4\u7684\u8bdd\uff0c\u611f\u89c9\u4e0d\u662f\u975e\u5e38\u5408\u9002\uff0c\u611f\u8c22~                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>protobuf \u6216\u8005 thrif&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/137556"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=137556"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/137556\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=137556"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=137556"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=137556"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}