{"id":300,"date":"2022-02-21T22:10:17","date_gmt":"2022-02-21T22:10:17","guid":{"rendered":"https:\/\/liangqi.org\/?p=300"},"modified":"2022-02-21T22:12:25","modified_gmt":"2022-02-21T22:12:25","slug":"%e4%b8%ba%e4%bb%80%e4%b9%88%e8%bf%81%e7%a7%bbz%e5%85%ac%e5%8f%b8%e7%9a%84monolithic-system%e5%88%b0microservices%e5%a6%82%e6%ad%a4%e5%9b%b0%e9%9a%be","status":"publish","type":"post","link":"https:\/\/liangqi.org\/?p=300","title":{"rendered":"\u4e3a\u4ec0\u4e48\u8fc1\u79fbZ\u516c\u53f8\u7684monolithic system\u5230microservices\u5982\u6b64\u56f0\u96be"},"content":{"rendered":"\n<p>\u6700\u8fd1\u5728\u8bfbDDD (Domain Driven Design)\u7684\u5185\u5bb9\uff0c\u4ee5\u524d\u7684monolithic\u6ca1\u6709\u9075\u5faa\u4e00\u4e9b\u57fa\u672c\u7684DDD\u7684\u539f\u5219\u3002<\/p>\n\n\n\n<p>As a reference \u8fd9\u4e2a\u662f\u53e6\u4e00\u7bc7DDD\u7684\u6587\u7ae0: <a href=\"https:\/\/liangqi.org\/?p=288\">Domain Driven Design<\/a>.<\/p>\n\n\n\n<p>Aggregate\u5fc5\u987b\u9075\u5faa\u7684\u4e09\u4e2arule\u7684\u6700\u540e\u4e00\u4e2a\u5728\u4e00\u822c\u7684\u5e94\u7528\u5f00\u53d1\u4e2d\u5f88\u96be\u9075\u5b88\u3002\u6211\u89c9\u5f97\u57fa\u672c\u4e0a\u6ca1\u6709monolothic\u7684\u7a0b\u5e8f\u5f00\u53d1\u771f\u7684\u9075\u5b88\u3002\u4e00\u822c\u90fd\u662f\u628a\u8de8aggregate\u7684\u64cd\u4f5c\u653e\u5728\u4e00\u4e2a\u4e8b\u52a1\u91cc\u9762\uff0c\u56e0\u4e3a\u5206\u5f00\u7684\u8bdd\u5c31\u592a\u9ebb\u70e6\u4e86\uff0c\u5728\u5199monolithic\u7684\u65f6\u5019\u4e5f\u6ca1\u4eba\u77e5\u9053saga\u7684design pattern\uff0c\u90a3\u5982\u679c\u5206\u5f00\u7684\u8bdd\u5982\u4f55\u4fdd\u8bc1\u4e8b\u7269\u4e00\u81f4\u6027\uff1f\u5f88\u96be\u60f3\u8c61\u6709\u4eba\u4f1a\u81ea\u627e\u9ebb\u70e6\u53bb\u628a\u6bcf\u4e00\u4e2aaggregate\u5206\u5f00\u6210\u4e0d\u540c\u7684\u4e8b\u7269\u3002<\/p>\n\n\n\n<p>\u5206\u62c6microservices\u7684\u65f6\u5019\uff0c\u628a\u4e00\u4e2a\u4e8b\u52a1\u5206\u5f00\u6210\u591a\u4e2a\u4e8b\u52a1\uff0c\u5176\u5b9e\u67d0\u79cd\u7a0b\u5ea6\u4e0a\u4e0d\u53ef\u907f\u514d\u7684\u4f1a\u5f71\u54cd\u7528\u6237\u4f53\u9a8c\u3002\u6bd4\u5982\u8bf4\u4e00\u4e2a\u5927\u7684\u540c\u6b65call\uff0c\u5982\u679c\u5206\u6210\u591a\u4e2a\u4e8b\u52a1\uff0c\u91c7\u7528\u5f02\u6b65\u5904\u7406\uff0c\u90a3\u4e48\u7528\u6237\u4f53\u9a8c\u4f1a\u4e0d\u4e00\u6837\u3002\u5982\u679c\u60f3\u8981\u7528\u6237\u4f53\u9a8c\u4e00\u6837\uff0c\u6240\u6709\u7684microservice\u5176\u5b9e\u6700\u7ec8\u8fd8\u662f\u8981\u91c7\u7528\u540c\u6b65\uff08\u6216\u8005\u5f02\u6b65\u7b49\u5f85\uff09\u7684\u65b9\u5f0f\uff0c\u8fd9\u6837availability\u8fd8\u662f\u4f1a\u53d7\u5f71\u54cd\uff0c\u5404\u4e2amicro service\u6df1\u5ea6\u8026\u5408\u3002<\/p>\n\n\n\n<p>\u8fd9\u79cd\u62c6\u5f00\u5bf9\u4e8e\u9762\u5411\u5ba2\u6237\u7684\u5e94\u7528\u5e94\u8be5\u8fd8\u597d\uff0c\u6bcf\u4e2a\u5ba2\u6237\u9002\u5e94\u65b0\u7684\u6d41\u7a0b\u5c31\u597d\u4e86\u3002\u4f46\u662f\u5bf9\u4e8eB2B\u6765\u8bb2\uff0c\u5ba2\u6237\u7684\u96c6\u6210\u901a\u5e38\u90fd\u662f\u524d\u4e00\u53d1\u52a8\u5168\u8eab\u3002\u800c\u4e14\u62c6\u5206\u8fc7\u540e\u5bf9\u4e8e\u6027\u80fd\u7684\u5f71\u54cd\u4e5f\u662f\u4e0d\u53ef\u5ffd\u7565\u3002\u53ef\u80fd\u89c9\u5f97\u6700\u540e\u98ce\u9669\u592a\u5927\uff0c\u5c31\u53ea\u80fd\u653e\u5f03\u3002<\/p>\n\n\n\n<p>\u6709\u4e00\u4e2a\u53ef\u884c\u7684\u65b9\u6cd5\u53ef\u80fd\u662f\u4fdd\u6301\u8001\u7684\u7cfb\u7edf\u4f7f\u7528\u7684\u540c\u65f6\uff0c\u8ba9\u65b0\u7684\u7528\u6237\u8fc1\u79fb\u5230\u65b0\u7684\u7cfb\u7edf\u91cc\u9762\u3002\u4f46\u662f\u8fd9\u91cc\u53c8\u4f1a\u6709\u65b0\u7684\u95ee\u9898\uff0c\u65b0\u7684\u7cfb\u7edf\u662f\u4e0d\u662f\u5b8c\u5168\u529f\u80fd\u517c\u5bb9\uff0c\u800c\u4e14\u65b0\u7684\u7cfb\u7edf\u4e5f\u5728\u4e0d\u65ad\u6f14\u8fdb\uff0c\u6bd4\u5982\u8bf4\u62c6\u5206\u4e86\u4e00\u90e8\u5206\u5185\u5bb9\uff0c\u8fed\u4ee3\u51fa\u5165\uff0c\u7136\u540e\u518d\u6b21\u62c6\u5206\uff0c\u8fed\u4ee3\u7684\u65f6\u5019\u65b0\u7684\u5ba2\u6237\u7684\u884c\u4e3a\u53c8\u53d8\u4e86\u3002\u6240\u4ee5\u8fd9\u79cd\u4e5f\u53ea\u80fd\u662f\u628a\u6240\u6709\u884c\u4e3a\u6539\u53d8\u7684\u7cfb\u7edf\u4e00\u8d77release\u3002<\/p>\n\n\n\n<p>\u4ed6\u4eec\u66fe\u7ecf\u8bd5\u56fe\u62c6\u5206product catalog\uff0c\u4e5f\u5931\u8d25\u4e86\u3002Notification\u76f8\u5bf9\u6765\u8bb2\u662f\u6210\u529f\u7684\uff0c\u662f\u901a\u8fc7\u65b0\u5ba2\u6237\u7528\u65b0\u7684\u7cfb\u7edf\uff0c\u8001\u5ba2\u6237\u7528\u8001\u7684\u7cfb\u7edf\u7684\u65b9\u5f0f\u6765\u505a\u7684\u3002\u6bd4\u5982\u8bf4Order\u76f8\u5173\u7684notification\u5168\u90e8\u90fd\u662f\u65b0\u7684\u67b6\u6784\u3002\u56e0\u4e3a\u6709\u4e00\u4e9b\u4e1c\u897f\u8fd8\u4e0d\u5b8c\u5168\u517c\u5bb9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u5728\u8bfbDDD (Domain Driven Design)\u7684\u5185\u5bb9\uff0c\u4ee5\u524d\u7684monolithic\u6ca1\u6709\u9075\u5faa\u4e00\u4e9b\u57fa\u672c\u7684DDD\u7684\u539f\u5219\u3002 As a reference \u8fd9\u4e2a\u662f\u53e6\u4e00\u7bc7DDD\u7684\u6587\u7ae0: Domain Driven Design. Aggregate\u5fc5\u987b\u9075\u5faa\u7684\u4e09\u4e2arule\u7684\u6700\u540e\u4e00\u4e2a\u5728\u4e00\u822c\u7684\u5e94\u7528\u5f00\u53d1\u4e2d\u5f88\u96be\u9075\u5b88\u3002\u6211\u89c9\u5f97\u57fa\u672c\u4e0a\u6ca1\u6709monolothic\u7684\u7a0b\u5e8f\u5f00\u53d1\u771f\u7684\u9075\u5b88\u3002\u4e00\u822c\u90fd\u662f\u628a\u8de8aggregate\u7684\u64cd\u4f5c\u653e\u5728\u4e00\u4e2a\u4e8b\u52a1\u91cc\u9762\uff0c\u56e0\u4e3a\u5206\u5f00\u7684\u8bdd\u5c31\u592a\u9ebb\u70e6\u4e86\uff0c\u5728\u5199monolithic\u7684\u65f6\u5019\u4e5f\u6ca1\u4eba\u77e5\u9053saga\u7684design pattern\uff0c\u90a3\u5982\u679c\u5206\u5f00\u7684\u8bdd\u5982\u4f55\u4fdd\u8bc1\u4e8b\u7269\u4e00\u81f4\u6027\uff1f\u5f88\u96be\u60f3\u8c61\u6709\u4eba\u4f1a\u81ea\u627e\u9ebb\u70e6\u53bb\u628a\u6bcf\u4e00\u4e2aaggregate\u5206\u5f00\u6210\u4e0d\u540c\u7684\u4e8b\u7269\u3002 \u5206\u62c6microservices\u7684\u65f6\u5019\uff0c\u628a\u4e00\u4e2a\u4e8b\u52a1\u5206\u5f00\u6210\u591a\u4e2a\u4e8b\u52a1\uff0c\u5176\u5b9e\u67d0\u79cd\u7a0b\u5ea6\u4e0a\u4e0d\u53ef\u907f\u514d\u7684\u4f1a\u5f71\u54cd\u7528\u6237\u4f53\u9a8c\u3002\u6bd4\u5982\u8bf4\u4e00\u4e2a\u5927\u7684\u540c\u6b65call\uff0c\u5982\u679c\u5206\u6210\u591a\u4e2a\u4e8b\u52a1\uff0c\u91c7\u7528\u5f02\u6b65\u5904\u7406\uff0c\u90a3\u4e48\u7528\u6237\u4f53\u9a8c\u4f1a\u4e0d\u4e00\u6837\u3002\u5982\u679c\u60f3\u8981\u7528\u6237\u4f53\u9a8c\u4e00\u6837\uff0c\u6240\u6709\u7684microservice\u5176\u5b9e\u6700\u7ec8\u8fd8\u662f\u8981\u91c7\u7528\u540c\u6b65\uff08\u6216\u8005\u5f02\u6b65\u7b49\u5f85\uff09\u7684\u65b9\u5f0f\uff0c\u8fd9\u6837availability\u8fd8\u662f\u4f1a\u53d7\u5f71\u54cd\uff0c\u5404\u4e2amicro service\u6df1\u5ea6\u8026\u5408\u3002 \u8fd9\u79cd\u62c6\u5f00\u5bf9\u4e8e\u9762\u5411\u5ba2\u6237\u7684\u5e94\u7528\u5e94\u8be5\u8fd8\u597d\uff0c\u6bcf\u4e2a\u5ba2\u6237\u9002\u5e94\u65b0\u7684\u6d41\u7a0b\u5c31\u597d\u4e86\u3002\u4f46\u662f\u5bf9\u4e8eB2B\u6765\u8bb2\uff0c\u5ba2\u6237\u7684\u96c6\u6210\u901a\u5e38\u90fd\u662f\u524d\u4e00\u53d1\u52a8\u5168\u8eab\u3002\u800c\u4e14\u62c6\u5206\u8fc7\u540e\u5bf9\u4e8e\u6027\u80fd\u7684\u5f71\u54cd\u4e5f\u662f\u4e0d\u53ef\u5ffd\u7565\u3002\u53ef\u80fd\u89c9\u5f97\u6700\u540e\u98ce\u9669\u592a\u5927\uff0c\u5c31\u53ea\u80fd\u653e\u5f03\u3002 \u6709\u4e00\u4e2a\u53ef\u884c\u7684\u65b9\u6cd5\u53ef\u80fd\u662f\u4fdd\u6301\u8001\u7684\u7cfb\u7edf\u4f7f\u7528\u7684\u540c\u65f6\uff0c\u8ba9\u65b0\u7684\u7528\u6237\u8fc1\u79fb\u5230\u65b0\u7684\u7cfb\u7edf\u91cc\u9762\u3002\u4f46\u662f\u8fd9\u91cc\u53c8\u4f1a\u6709\u65b0\u7684\u95ee\u9898\uff0c\u65b0\u7684\u7cfb\u7edf\u662f\u4e0d\u662f\u5b8c\u5168\u529f\u80fd\u517c\u5bb9\uff0c\u800c\u4e14\u65b0\u7684\u7cfb\u7edf\u4e5f\u5728\u4e0d\u65ad\u6f14\u8fdb\uff0c\u6bd4\u5982\u8bf4\u62c6\u5206\u4e86\u4e00\u90e8\u5206\u5185\u5bb9\uff0c\u8fed\u4ee3\u51fa\u5165\uff0c\u7136\u540e\u518d\u6b21\u62c6\u5206\uff0c\u8fed\u4ee3\u7684\u65f6\u5019\u65b0\u7684\u5ba2\u6237\u7684\u884c\u4e3a\u53c8\u53d8\u4e86\u3002\u6240\u4ee5\u8fd9\u79cd\u4e5f\u53ea\u80fd\u662f\u628a\u6240\u6709\u884c\u4e3a\u6539\u53d8\u7684\u7cfb\u7edf\u4e00\u8d77release\u3002 \u4ed6\u4eec\u66fe\u7ecf\u8bd5\u56fe\u62c6\u5206product catalog\uff0c\u4e5f\u5931\u8d25\u4e86\u3002Notification\u76f8\u5bf9\u6765\u8bb2\u662f\u6210\u529f\u7684\uff0c\u662f\u901a\u8fc7\u65b0\u5ba2\u6237\u7528\u65b0\u7684\u7cfb\u7edf\uff0c\u8001\u5ba2\u6237\u7528\u8001\u7684\u7cfb\u7edf\u7684\u65b9\u5f0f\u6765\u505a\u7684\u3002\u6bd4\u5982\u8bf4Order\u76f8\u5173\u7684notification\u5168\u90e8\u90fd\u662f\u65b0\u7684\u67b6\u6784\u3002\u56e0\u4e3a\u6709\u4e00\u4e9b\u4e1c\u897f\u8fd8\u4e0d\u5b8c\u5168\u517c\u5bb9\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,16],"tags":[],"class_list":["post-300","post","type-post","status-publish","format-standard","hentry","category-design","category-16"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4e3a\u4ec0\u4e48\u8fc1\u79fbZ\u516c\u53f8\u7684monolithic system\u5230microservices\u5982\u6b64\u56f0\u96be - Liangqi\u2018s Technical Journey<\/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:\/\/liangqi.org\/?p=300\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4e3a\u4ec0\u4e48\u8fc1\u79fbZ\u516c\u53f8\u7684monolithic system\u5230microservices\u5982\u6b64\u56f0\u96be - Liangqi\u2018s Technical Journey\" \/>\n<meta property=\"og:description\" content=\"\u6700\u8fd1\u5728\u8bfbDDD (Domain Driven Design)\u7684\u5185\u5bb9\uff0c\u4ee5\u524d\u7684monolithic\u6ca1\u6709\u9075\u5faa\u4e00\u4e9b\u57fa\u672c\u7684DDD\u7684\u539f\u5219\u3002 As a reference \u8fd9\u4e2a\u662f\u53e6\u4e00\u7bc7DDD\u7684\u6587\u7ae0: Domain Driven Design. Aggregate\u5fc5\u987b\u9075\u5faa\u7684\u4e09\u4e2arule\u7684\u6700\u540e\u4e00\u4e2a\u5728\u4e00\u822c\u7684\u5e94\u7528\u5f00\u53d1\u4e2d\u5f88\u96be\u9075\u5b88\u3002\u6211\u89c9\u5f97\u57fa\u672c\u4e0a\u6ca1\u6709monolothic\u7684\u7a0b\u5e8f\u5f00\u53d1\u771f\u7684\u9075\u5b88\u3002\u4e00\u822c\u90fd\u662f\u628a\u8de8aggregate\u7684\u64cd\u4f5c\u653e\u5728\u4e00\u4e2a\u4e8b\u52a1\u91cc\u9762\uff0c\u56e0\u4e3a\u5206\u5f00\u7684\u8bdd\u5c31\u592a\u9ebb\u70e6\u4e86\uff0c\u5728\u5199monolithic\u7684\u65f6\u5019\u4e5f\u6ca1\u4eba\u77e5\u9053saga\u7684design pattern\uff0c\u90a3\u5982\u679c\u5206\u5f00\u7684\u8bdd\u5982\u4f55\u4fdd\u8bc1\u4e8b\u7269\u4e00\u81f4\u6027\uff1f\u5f88\u96be\u60f3\u8c61\u6709\u4eba\u4f1a\u81ea\u627e\u9ebb\u70e6\u53bb\u628a\u6bcf\u4e00\u4e2aaggregate\u5206\u5f00\u6210\u4e0d\u540c\u7684\u4e8b\u7269\u3002 \u5206\u62c6microservices\u7684\u65f6\u5019\uff0c\u628a\u4e00\u4e2a\u4e8b\u52a1\u5206\u5f00\u6210\u591a\u4e2a\u4e8b\u52a1\uff0c\u5176\u5b9e\u67d0\u79cd\u7a0b\u5ea6\u4e0a\u4e0d\u53ef\u907f\u514d\u7684\u4f1a\u5f71\u54cd\u7528\u6237\u4f53\u9a8c\u3002\u6bd4\u5982\u8bf4\u4e00\u4e2a\u5927\u7684\u540c\u6b65call\uff0c\u5982\u679c\u5206\u6210\u591a\u4e2a\u4e8b\u52a1\uff0c\u91c7\u7528\u5f02\u6b65\u5904\u7406\uff0c\u90a3\u4e48\u7528\u6237\u4f53\u9a8c\u4f1a\u4e0d\u4e00\u6837\u3002\u5982\u679c\u60f3\u8981\u7528\u6237\u4f53\u9a8c\u4e00\u6837\uff0c\u6240\u6709\u7684microservice\u5176\u5b9e\u6700\u7ec8\u8fd8\u662f\u8981\u91c7\u7528\u540c\u6b65\uff08\u6216\u8005\u5f02\u6b65\u7b49\u5f85\uff09\u7684\u65b9\u5f0f\uff0c\u8fd9\u6837availability\u8fd8\u662f\u4f1a\u53d7\u5f71\u54cd\uff0c\u5404\u4e2amicro service\u6df1\u5ea6\u8026\u5408\u3002 \u8fd9\u79cd\u62c6\u5f00\u5bf9\u4e8e\u9762\u5411\u5ba2\u6237\u7684\u5e94\u7528\u5e94\u8be5\u8fd8\u597d\uff0c\u6bcf\u4e2a\u5ba2\u6237\u9002\u5e94\u65b0\u7684\u6d41\u7a0b\u5c31\u597d\u4e86\u3002\u4f46\u662f\u5bf9\u4e8eB2B\u6765\u8bb2\uff0c\u5ba2\u6237\u7684\u96c6\u6210\u901a\u5e38\u90fd\u662f\u524d\u4e00\u53d1\u52a8\u5168\u8eab\u3002\u800c\u4e14\u62c6\u5206\u8fc7\u540e\u5bf9\u4e8e\u6027\u80fd\u7684\u5f71\u54cd\u4e5f\u662f\u4e0d\u53ef\u5ffd\u7565\u3002\u53ef\u80fd\u89c9\u5f97\u6700\u540e\u98ce\u9669\u592a\u5927\uff0c\u5c31\u53ea\u80fd\u653e\u5f03\u3002 \u6709\u4e00\u4e2a\u53ef\u884c\u7684\u65b9\u6cd5\u53ef\u80fd\u662f\u4fdd\u6301\u8001\u7684\u7cfb\u7edf\u4f7f\u7528\u7684\u540c\u65f6\uff0c\u8ba9\u65b0\u7684\u7528\u6237\u8fc1\u79fb\u5230\u65b0\u7684\u7cfb\u7edf\u91cc\u9762\u3002\u4f46\u662f\u8fd9\u91cc\u53c8\u4f1a\u6709\u65b0\u7684\u95ee\u9898\uff0c\u65b0\u7684\u7cfb\u7edf\u662f\u4e0d\u662f\u5b8c\u5168\u529f\u80fd\u517c\u5bb9\uff0c\u800c\u4e14\u65b0\u7684\u7cfb\u7edf\u4e5f\u5728\u4e0d\u65ad\u6f14\u8fdb\uff0c\u6bd4\u5982\u8bf4\u62c6\u5206\u4e86\u4e00\u90e8\u5206\u5185\u5bb9\uff0c\u8fed\u4ee3\u51fa\u5165\uff0c\u7136\u540e\u518d\u6b21\u62c6\u5206\uff0c\u8fed\u4ee3\u7684\u65f6\u5019\u65b0\u7684\u5ba2\u6237\u7684\u884c\u4e3a\u53c8\u53d8\u4e86\u3002\u6240\u4ee5\u8fd9\u79cd\u4e5f\u53ea\u80fd\u662f\u628a\u6240\u6709\u884c\u4e3a\u6539\u53d8\u7684\u7cfb\u7edf\u4e00\u8d77release\u3002 \u4ed6\u4eec\u66fe\u7ecf\u8bd5\u56fe\u62c6\u5206product catalog\uff0c\u4e5f\u5931\u8d25\u4e86\u3002Notification\u76f8\u5bf9\u6765\u8bb2\u662f\u6210\u529f\u7684\uff0c\u662f\u901a\u8fc7\u65b0\u5ba2\u6237\u7528\u65b0\u7684\u7cfb\u7edf\uff0c\u8001\u5ba2\u6237\u7528\u8001\u7684\u7cfb\u7edf\u7684\u65b9\u5f0f\u6765\u505a\u7684\u3002\u6bd4\u5982\u8bf4Order\u76f8\u5173\u7684notification\u5168\u90e8\u90fd\u662f\u65b0\u7684\u67b6\u6784\u3002\u56e0\u4e3a\u6709\u4e00\u4e9b\u4e1c\u897f\u8fd8\u4e0d\u5b8c\u5168\u517c\u5bb9\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/liangqi.org\/?p=300\" \/>\n<meta property=\"og:site_name\" content=\"Liangqi\u2018s Technical Journey\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-21T22:10:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-21T22:12:25+00:00\" \/>\n<meta name=\"author\" content=\"liangqi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"liangqi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/liangqi.org\/?p=300#article\",\"isPartOf\":{\"@id\":\"https:\/\/liangqi.org\/?p=300\"},\"author\":{\"name\":\"liangqi\",\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\"},\"headline\":\"\u4e3a\u4ec0\u4e48\u8fc1\u79fbZ\u516c\u53f8\u7684monolithic system\u5230microservices\u5982\u6b64\u56f0\u96be\",\"datePublished\":\"2022-02-21T22:10:17+00:00\",\"dateModified\":\"2022-02-21T22:12:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/liangqi.org\/?p=300\"},\"wordCount\":40,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\"},\"articleSection\":[\"Design\",\"\u6280\u672f\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/liangqi.org\/?p=300#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/liangqi.org\/?p=300\",\"url\":\"https:\/\/liangqi.org\/?p=300\",\"name\":\"\u4e3a\u4ec0\u4e48\u8fc1\u79fbZ\u516c\u53f8\u7684monolithic system\u5230microservices\u5982\u6b64\u56f0\u96be - Liangqi\u2018s Technical Journey\",\"isPartOf\":{\"@id\":\"https:\/\/liangqi.org\/#website\"},\"datePublished\":\"2022-02-21T22:10:17+00:00\",\"dateModified\":\"2022-02-21T22:12:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/liangqi.org\/?p=300#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/liangqi.org\/?p=300\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/liangqi.org\/?p=300#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/liangqi.org\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4e3a\u4ec0\u4e48\u8fc1\u79fbZ\u516c\u53f8\u7684monolithic system\u5230microservices\u5982\u6b64\u56f0\u96be\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/liangqi.org\/#website\",\"url\":\"https:\/\/liangqi.org\/\",\"name\":\"Liangqi\u2018s Technical Journey\",\"description\":\"Chasing Excellence; Enjoy life.\",\"publisher\":{\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/liangqi.org\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\",\"name\":\"liangqi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg\",\"contentUrl\":\"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg\",\"width\":2560,\"height\":1920,\"caption\":\"liangqi\"},\"logo\":{\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/liangqi.org\"],\"url\":\"https:\/\/liangqi.org\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4e3a\u4ec0\u4e48\u8fc1\u79fbZ\u516c\u53f8\u7684monolithic system\u5230microservices\u5982\u6b64\u56f0\u96be - Liangqi\u2018s Technical Journey","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:\/\/liangqi.org\/?p=300","og_locale":"en_US","og_type":"article","og_title":"\u4e3a\u4ec0\u4e48\u8fc1\u79fbZ\u516c\u53f8\u7684monolithic system\u5230microservices\u5982\u6b64\u56f0\u96be - Liangqi\u2018s Technical Journey","og_description":"\u6700\u8fd1\u5728\u8bfbDDD (Domain Driven Design)\u7684\u5185\u5bb9\uff0c\u4ee5\u524d\u7684monolithic\u6ca1\u6709\u9075\u5faa\u4e00\u4e9b\u57fa\u672c\u7684DDD\u7684\u539f\u5219\u3002 As a reference \u8fd9\u4e2a\u662f\u53e6\u4e00\u7bc7DDD\u7684\u6587\u7ae0: Domain Driven Design. Aggregate\u5fc5\u987b\u9075\u5faa\u7684\u4e09\u4e2arule\u7684\u6700\u540e\u4e00\u4e2a\u5728\u4e00\u822c\u7684\u5e94\u7528\u5f00\u53d1\u4e2d\u5f88\u96be\u9075\u5b88\u3002\u6211\u89c9\u5f97\u57fa\u672c\u4e0a\u6ca1\u6709monolothic\u7684\u7a0b\u5e8f\u5f00\u53d1\u771f\u7684\u9075\u5b88\u3002\u4e00\u822c\u90fd\u662f\u628a\u8de8aggregate\u7684\u64cd\u4f5c\u653e\u5728\u4e00\u4e2a\u4e8b\u52a1\u91cc\u9762\uff0c\u56e0\u4e3a\u5206\u5f00\u7684\u8bdd\u5c31\u592a\u9ebb\u70e6\u4e86\uff0c\u5728\u5199monolithic\u7684\u65f6\u5019\u4e5f\u6ca1\u4eba\u77e5\u9053saga\u7684design pattern\uff0c\u90a3\u5982\u679c\u5206\u5f00\u7684\u8bdd\u5982\u4f55\u4fdd\u8bc1\u4e8b\u7269\u4e00\u81f4\u6027\uff1f\u5f88\u96be\u60f3\u8c61\u6709\u4eba\u4f1a\u81ea\u627e\u9ebb\u70e6\u53bb\u628a\u6bcf\u4e00\u4e2aaggregate\u5206\u5f00\u6210\u4e0d\u540c\u7684\u4e8b\u7269\u3002 \u5206\u62c6microservices\u7684\u65f6\u5019\uff0c\u628a\u4e00\u4e2a\u4e8b\u52a1\u5206\u5f00\u6210\u591a\u4e2a\u4e8b\u52a1\uff0c\u5176\u5b9e\u67d0\u79cd\u7a0b\u5ea6\u4e0a\u4e0d\u53ef\u907f\u514d\u7684\u4f1a\u5f71\u54cd\u7528\u6237\u4f53\u9a8c\u3002\u6bd4\u5982\u8bf4\u4e00\u4e2a\u5927\u7684\u540c\u6b65call\uff0c\u5982\u679c\u5206\u6210\u591a\u4e2a\u4e8b\u52a1\uff0c\u91c7\u7528\u5f02\u6b65\u5904\u7406\uff0c\u90a3\u4e48\u7528\u6237\u4f53\u9a8c\u4f1a\u4e0d\u4e00\u6837\u3002\u5982\u679c\u60f3\u8981\u7528\u6237\u4f53\u9a8c\u4e00\u6837\uff0c\u6240\u6709\u7684microservice\u5176\u5b9e\u6700\u7ec8\u8fd8\u662f\u8981\u91c7\u7528\u540c\u6b65\uff08\u6216\u8005\u5f02\u6b65\u7b49\u5f85\uff09\u7684\u65b9\u5f0f\uff0c\u8fd9\u6837availability\u8fd8\u662f\u4f1a\u53d7\u5f71\u54cd\uff0c\u5404\u4e2amicro service\u6df1\u5ea6\u8026\u5408\u3002 \u8fd9\u79cd\u62c6\u5f00\u5bf9\u4e8e\u9762\u5411\u5ba2\u6237\u7684\u5e94\u7528\u5e94\u8be5\u8fd8\u597d\uff0c\u6bcf\u4e2a\u5ba2\u6237\u9002\u5e94\u65b0\u7684\u6d41\u7a0b\u5c31\u597d\u4e86\u3002\u4f46\u662f\u5bf9\u4e8eB2B\u6765\u8bb2\uff0c\u5ba2\u6237\u7684\u96c6\u6210\u901a\u5e38\u90fd\u662f\u524d\u4e00\u53d1\u52a8\u5168\u8eab\u3002\u800c\u4e14\u62c6\u5206\u8fc7\u540e\u5bf9\u4e8e\u6027\u80fd\u7684\u5f71\u54cd\u4e5f\u662f\u4e0d\u53ef\u5ffd\u7565\u3002\u53ef\u80fd\u89c9\u5f97\u6700\u540e\u98ce\u9669\u592a\u5927\uff0c\u5c31\u53ea\u80fd\u653e\u5f03\u3002 \u6709\u4e00\u4e2a\u53ef\u884c\u7684\u65b9\u6cd5\u53ef\u80fd\u662f\u4fdd\u6301\u8001\u7684\u7cfb\u7edf\u4f7f\u7528\u7684\u540c\u65f6\uff0c\u8ba9\u65b0\u7684\u7528\u6237\u8fc1\u79fb\u5230\u65b0\u7684\u7cfb\u7edf\u91cc\u9762\u3002\u4f46\u662f\u8fd9\u91cc\u53c8\u4f1a\u6709\u65b0\u7684\u95ee\u9898\uff0c\u65b0\u7684\u7cfb\u7edf\u662f\u4e0d\u662f\u5b8c\u5168\u529f\u80fd\u517c\u5bb9\uff0c\u800c\u4e14\u65b0\u7684\u7cfb\u7edf\u4e5f\u5728\u4e0d\u65ad\u6f14\u8fdb\uff0c\u6bd4\u5982\u8bf4\u62c6\u5206\u4e86\u4e00\u90e8\u5206\u5185\u5bb9\uff0c\u8fed\u4ee3\u51fa\u5165\uff0c\u7136\u540e\u518d\u6b21\u62c6\u5206\uff0c\u8fed\u4ee3\u7684\u65f6\u5019\u65b0\u7684\u5ba2\u6237\u7684\u884c\u4e3a\u53c8\u53d8\u4e86\u3002\u6240\u4ee5\u8fd9\u79cd\u4e5f\u53ea\u80fd\u662f\u628a\u6240\u6709\u884c\u4e3a\u6539\u53d8\u7684\u7cfb\u7edf\u4e00\u8d77release\u3002 \u4ed6\u4eec\u66fe\u7ecf\u8bd5\u56fe\u62c6\u5206product catalog\uff0c\u4e5f\u5931\u8d25\u4e86\u3002Notification\u76f8\u5bf9\u6765\u8bb2\u662f\u6210\u529f\u7684\uff0c\u662f\u901a\u8fc7\u65b0\u5ba2\u6237\u7528\u65b0\u7684\u7cfb\u7edf\uff0c\u8001\u5ba2\u6237\u7528\u8001\u7684\u7cfb\u7edf\u7684\u65b9\u5f0f\u6765\u505a\u7684\u3002\u6bd4\u5982\u8bf4Order\u76f8\u5173\u7684notification\u5168\u90e8\u90fd\u662f\u65b0\u7684\u67b6\u6784\u3002\u56e0\u4e3a\u6709\u4e00\u4e9b\u4e1c\u897f\u8fd8\u4e0d\u5b8c\u5168\u517c\u5bb9\u3002","og_url":"https:\/\/liangqi.org\/?p=300","og_site_name":"Liangqi\u2018s Technical Journey","article_published_time":"2022-02-21T22:10:17+00:00","article_modified_time":"2022-02-21T22:12:25+00:00","author":"liangqi","twitter_card":"summary_large_image","twitter_misc":{"Written by":"liangqi","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/liangqi.org\/?p=300#article","isPartOf":{"@id":"https:\/\/liangqi.org\/?p=300"},"author":{"name":"liangqi","@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3"},"headline":"\u4e3a\u4ec0\u4e48\u8fc1\u79fbZ\u516c\u53f8\u7684monolithic system\u5230microservices\u5982\u6b64\u56f0\u96be","datePublished":"2022-02-21T22:10:17+00:00","dateModified":"2022-02-21T22:12:25+00:00","mainEntityOfPage":{"@id":"https:\/\/liangqi.org\/?p=300"},"wordCount":40,"commentCount":0,"publisher":{"@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3"},"articleSection":["Design","\u6280\u672f"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/liangqi.org\/?p=300#respond"]}]},{"@type":"WebPage","@id":"https:\/\/liangqi.org\/?p=300","url":"https:\/\/liangqi.org\/?p=300","name":"\u4e3a\u4ec0\u4e48\u8fc1\u79fbZ\u516c\u53f8\u7684monolithic system\u5230microservices\u5982\u6b64\u56f0\u96be - Liangqi\u2018s Technical Journey","isPartOf":{"@id":"https:\/\/liangqi.org\/#website"},"datePublished":"2022-02-21T22:10:17+00:00","dateModified":"2022-02-21T22:12:25+00:00","breadcrumb":{"@id":"https:\/\/liangqi.org\/?p=300#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/liangqi.org\/?p=300"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/liangqi.org\/?p=300#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/liangqi.org\/"},{"@type":"ListItem","position":2,"name":"\u4e3a\u4ec0\u4e48\u8fc1\u79fbZ\u516c\u53f8\u7684monolithic system\u5230microservices\u5982\u6b64\u56f0\u96be"}]},{"@type":"WebSite","@id":"https:\/\/liangqi.org\/#website","url":"https:\/\/liangqi.org\/","name":"Liangqi\u2018s Technical Journey","description":"Chasing Excellence; Enjoy life.","publisher":{"@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/liangqi.org\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3","name":"liangqi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/liangqi.org\/#\/schema\/person\/image\/","url":"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg","contentUrl":"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg","width":2560,"height":1920,"caption":"liangqi"},"logo":{"@id":"https:\/\/liangqi.org\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/liangqi.org"],"url":"https:\/\/liangqi.org\/?author=1"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts\/300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=300"}],"version-history":[{"count":2,"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts\/300\/revisions"}],"predecessor-version":[{"id":303,"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts\/300\/revisions\/303"}],"wp:attachment":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}