{"id":2043,"date":"2023-04-01T20:50:27","date_gmt":"2023-04-01T12:50:27","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=2043"},"modified":"2023-04-07T06:11:28","modified_gmt":"2023-04-06T22:11:28","slug":"comparison-between-spring-cloud-and-dubbo","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/04\/01\/comparison-between-spring-cloud-and-dubbo\/","title":{"rendered":"Spring Cloud\u4e0eDubbo\u5bf9\u6bd4"},"content":{"rendered":"<h2>Dubbo\u7b80\u4ecb<\/h2>\n<p>Dubbo \u662f\u963f\u91cc\u5df4\u5df4\u516c\u53f8\u4e00\u4e2a\u5f00\u6e90\u7684\u9ad8\u6027\u80fd\u670d\u52a1\u6846\u67b6\uff0c\u81f4\u529b\u4e8e\u63d0\u4f9b\u9ad8\u6027\u80fd\u548c\u900f\u660e\u5316\u7684 RPC \u8fdc\u7a0b\u670d\u52a1\u8c03\u7528\u65b9\u6848\uff0c\u4ee5\u53ca SOA \u670d\u52a1\u6cbb\u7406\u65b9\u6848\uff0c\u4f7f\u5f97\u5e94\u7528\u53ef\u901a\u8fc7\u9ad8\u6027\u80fd RPC \u5b9e\u73b0\u670d\u52a1\u7684\u8f93\u51fa\u3001\u8f93\u5165\u529f\u80fd\u548c Spring \u6846\u67b6\u65e0\u7f1d\u96c6\u6210\u3002Dubbo \u5305\u542b\u8fdc\u7a0b\u901a\u8baf\u3001\u96c6\u7fa4\u5bb9\u9519\u548c\u81ea\u52a8\u53d1\u73b0\u4e09\u4e2a\u6838\u5fc3\u90e8\u5206\u3002<\/p>\n<p><!-- more --><\/p>\n<p>\u5b83\u63d0\u4f9b\u900f\u660e\u5316\u7684\u8fdc\u7a0b\u65b9\u6cd5\u8c03\u7528\uff0c\u5b9e\u73b0\u50cf\u8c03\u7528\u672c\u5730\u65b9\u6cd5\u4e00\u6837\u8c03\u7528\u8fdc\u7a0b\u65b9\u6cd5\uff0c\u53ea\u9700\u7b80\u5355\u914d\u7f6e\uff0c\u6ca1\u6709\u4efb\u4f55 API \u4fb5\u5165\u3002\u540c\u65f6\u5b83\u5177\u5907\u8f6f\u8d1f\u8f7d\u5747\u8861\u53ca\u5bb9\u9519\u673a\u5236\uff0c\u53ef\u5728\u5185\u7f51\u66ff\u4ee3 F5 \u7b49\u786c\u4ef6\u8d1f\u8f7d\u5747\u8861\u5668\uff0c\u964d\u4f4e\u6210\u672c\uff0c\u51cf\u5c11\u5355\u70b9\u3002\u5b83\u53ef\u4ee5\u5b9e\u73b0\u670d\u52a1\u81ea\u52a8\u6ce8\u518c\u4e0e\u53d1\u73b0\uff0c\u4e0d\u518d\u9700\u8981\u5199\u6b7b\u670d\u52a1\u63d0\u4f9b\u65b9\u5730\u5740\uff0c\u6ce8\u518c\u4e2d\u5fc3\u57fa\u4e8e\u63a5\u53e3\u540d\u67e5\u8be2\u670d\u52a1\u63d0\u4f9b\u8005\u7684 IP \u5730\u5740\uff0c\u5e76\u4e14\u80fd\u591f\u5e73\u6ed1\u6dfb\u52a0\u6216\u5220\u9664\u670d\u52a1\u63d0\u4f9b\u8005\u3002<\/p>\n<p>Dubbo\u6838\u5fc3\u529f\u80fd:<\/p>\n<ul>\n<li>\u8fdc\u7a0b\u901a\u8baf\uff0c\u63d0\u4f9b\u5bf9\u591a\u79cd\u57fa\u4e8e\u957f\u8fde\u63a5\u7684 NIO \u6846\u67b6\u62bd\u8c61\u5c01\u88c5\uff0c\u5305\u62ec\u591a\u79cd\u7ebf\u7a0b\u6a21\u578b\uff0c\u5e8f\u5217\u5316\uff0c\u4ee5\u53ca\u201c\u8bf7\u6c42-\u54cd\u5e94\u201d\u6a21\u5f0f\u7684\u4fe1\u606f\u4ea4\u6362\u65b9\u5f0f\u3002<\/li>\n<li>\u96c6\u7fa4\u5bb9\u9519\uff0c\u63d0\u4f9b\u57fa\u4e8e\u63a5\u53e3\u65b9\u6cd5\u7684\u900f\u660e\u8fdc\u7a0b\u8fc7\u7a0b\u8c03\u7528\uff0c\u5305\u62ec\u591a\u534f\u8bae\u652f\u6301\uff0c\u4ee5\u53ca\u8f6f\u8d1f\u8f7d\u5747\u8861\uff0c\u5931\u8d25\u5bb9\u9519\uff0c\u5730\u5740\u8def\u7531\uff0c\u52a8\u6001\u914d\u7f6e\u7b49\u96c6\u7fa4\u652f\u6301\u3002<\/li>\n<li>\u81ea\u52a8\u53d1\u73b0\uff0c\u57fa\u4e8e\u6ce8\u518c\u4e2d\u5fc3\u76ee\u5f55\u670d\u52a1\uff0c\u4f7f\u670d\u52a1\u6d88\u8d39\u65b9\u80fd\u52a8\u6001\u7684\u67e5\u627e\u670d\u52a1\u63d0\u4f9b\u65b9\uff0c\u4f7f\u5730\u5740\u900f\u660e\uff0c\u4f7f\u670d\u52a1\u63d0\u4f9b\u65b9\u53ef\u4ee5\u5e73\u6ed1\u589e\u52a0\u6216\u51cf\u5c11\u673a\u5668\u3002<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"http:\/\/www.itmind.net\/assets\/images\/2017\/architecture\/dubbo-architecture.png\" alt=\"dubbo architecture\" \/><\/p>\n<h2>Spring Cloud\u4e0eDubbo\u5bf9\u6bd4<\/h2>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\"><\/th>\n<th style=\"text-align: left;\">Dubbo<\/th>\n<th style=\"text-align: left;\">Spring Cloud<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">\u670d\u52a1\u6ce8\u518c\u4e2d\u5fc3<\/td>\n<td style=\"text-align: left;\">Zookeeper<\/td>\n<td style=\"text-align: left;\">Spring Cloud Netflix Eureka<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">\u670d\u52a1\u8c03\u7528\u65b9\u5f0f<\/td>\n<td style=\"text-align: left;\">RPC<\/td>\n<td style=\"text-align: left;\">REST API<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">\u670d\u52a1\u76d1\u63a7<\/td>\n<td style=\"text-align: left;\">Dubbo-monitor<\/td>\n<td style=\"text-align: left;\">Spring Boot Admin<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">\u65ad\u8def\u5668<\/td>\n<td style=\"text-align: left;\">\u4e0d\u5b8c\u5584<\/td>\n<td style=\"text-align: left;\">Spring Cloud Netflix Hystrix<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">\u670d\u52a1\u7f51\u5173<\/td>\n<td style=\"text-align: left;\">\u65e0<\/td>\n<td style=\"text-align: left;\">Spring Cloud Netflix Zuul<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">\u5206\u5e03\u5f0f\u914d\u7f6e<\/td>\n<td style=\"text-align: left;\">\u65e0<\/td>\n<td style=\"text-align: left;\">Spring Cloud Config<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">\u670d\u52a1\u8ddf\u8e2a<\/td>\n<td style=\"text-align: left;\">\u65e0<\/td>\n<td style=\"text-align: left;\">Spring Cloud Sleuth<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">\u6d88\u606f\u603b\u7ebf<\/td>\n<td style=\"text-align: left;\">\u65e0<\/td>\n<td style=\"text-align: left;\">Spring Cloud Bus<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">\u6570\u636e\u6d41<\/td>\n<td style=\"text-align: left;\">\u65e0<\/td>\n<td style=\"text-align: left;\">Spring Cloud Stream<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">\u6279\u91cf\u4efb\u52a1<\/td>\n<td style=\"text-align: left;\">\u65e0<\/td>\n<td style=\"text-align: left;\">Spring Cloud Task<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4ec5\u4ec5\u5173\u6ce8\u4e8e\u670d\u52a1\u6cbb\u7406\u8fd9\u4e2a\u5c42\u9762\uff0cDubbo\u5176\u5b9e\u8fd8\u4f18\u4e8eSpring Cloud\u5f88\u591a\uff1a<\/p>\n<ul>\n<li>Dubbo \u652f\u6301\u66f4\u591a\u7684\u534f\u8bae\uff0c\u5982\uff1armi\u3001hessian\u3001http\u3001webservice\u3001thrift\u3001memcached\u3001redis \u7b49\u3002<\/li>\n<li>Dubbo \u4f7f\u7528 RPC \u534f\u8bae\u6548\u7387\u66f4\u9ad8\uff0c\u5728\u6781\u7aef\u538b\u529b\u6d4b\u8bd5\u4e0b\uff0cDubbo \u7684\u6548\u7387\u4f1a\u9ad8\u4e8e Spring Cloud \u6548\u7387\u4e00\u500d\u591a\u3002<\/li>\n<li>Dubbo \u6709\u66f4\u5f3a\u5927\u7684\u540e\u53f0\u7ba1\u7406\uff0cDubbo \u63d0\u4f9b\u7684\u540e\u53f0\u7ba1\u7406 Dubbo Admin \u529f\u80fd\u5f3a\u5927\uff0c\u63d0\u4f9b\u4e86\u8def\u7531\u89c4\u5219\u3001\u52a8\u6001\u914d\u7f6e\u3001\u8bbf\u95ee\u63a7\u5236\u3001\u6743\u91cd\u8c03\u8282\u3001\u5747\u8861\u8d1f\u8f7d\u7b49\u8bf8\u591a\u5f3a\u5927\u7684\u529f\u80fd\u3002<\/li>\n<li>\u53ef\u4ee5\u9650\u5236\u67d0\u4e2a IP \u6d41\u91cf\u7684\u8bbf\u95ee\u6743\u9650\uff0c\u8bbe\u7f6e\u4e0d\u540c\u670d\u52a1\u5668\u5206\u53d1\u4e0d\u540c\u7684\u6d41\u91cf\u6743\u91cd\uff0c\u5e76\u4e14\u652f\u6301\u591a\u79cd\u7b97\u6cd5\uff0c\u5229\u7528\u8fd9\u4e9b\u529f\u80fd\u6211\u4eec\u53ef\u4ee5\u5728\u7ebf\u4e0a\u505a\u7070\u5ea6\u53d1\u5e03\u3001\u6545\u969c\u8f6c\u79fb\u7b49\uff0cSpring Cloud \u5230\u73b0\u5728\u8fd8\u4e0d\u652f\u6301\u7070\u5ea6\u53d1\u5e03\u3001\u6d41\u91cf\u6743\u91cd\u7b49\u529f\u80fd\u3002<\/li>\n<\/ul>\n<blockquote>\n<p>Dubbo\u4e13\u6ce8\u4e8e\u670d\u52a1\u6cbb\u7406\uff1bSpring Cloud\u5173\u6ce8\u4e8e\u5fae\u670d\u52a1\u67b6\u6784\u751f\u6001<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Dubbo\u7b80\u4ecb Dubbo \u662f\u963f\u91cc\u5df4\u5df4\u516c\u53f8\u4e00\u4e2a\u5f00\u6e90\u7684\u9ad8\u6027\u80fd\u670d\u52a1\u6846\u67b6\uff0c\u81f4\u529b\u4e8e\u63d0\u4f9b\u9ad8\u6027\u80fd\u548c\u900f\u660e\u5316\u7684 RPC \u8fdc\u7a0b\u670d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[196,41],"tags":[],"class_list":["post-2043","post","type-post","status-publish","format-standard","hentry","category-dubbo","category-spring-boot"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/2043","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=2043"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/2043\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=2043"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=2043"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=2043"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}