{"id":602,"date":"2012-08-21T21:13:24","date_gmt":"2012-08-21T13:13:24","guid":{"rendered":"http:\/\/home.wangjianshuo.com\/cn\/?p=602"},"modified":"2012-09-06T20:44:22","modified_gmt":"2012-09-06T12:44:22","slug":"graph_","status":"publish","type":"post","link":"https:\/\/home.wangjianshuo.com\/cn\/20120821_graph_.htm","title":{"rendered":"Graph\u67b6\u6784\u56fe"},"content":{"rendered":"<pre> -----------------------------------------------------------\n  |                       URL Routing                       |\n  -----------------------------------------------------------\n  -----------------------------------------------------------\n  |                    Controller Routing                   |\n  -----------------------------------------------------------  \n\n  -----------------------------------------------------------\n  |                       Controller                        |\n  -----------------------------------------------------------<\/pre>\n<pre> -----------------------------------------------------------\n  |                     View Dispatcher                     |\n  -----------------------------------------------------------\n  ---------  ---------  ----------  ------ -------- ---------\n  |View Ad|  |Listing|  |Homepage|  |User| |Search| |Payment|\n  |View   |  |View   |  |View    |  |View| |View  | |View   |\n  ---------  ---------  ----------  ------ -------- ---------\n  -----------------------------------------------------------\n  |                    Template Engine                      |\n  -----------------------------------------------------------\n  -----------------------------------------------------------\n  |                   Model (Data Binding)                  |\n  -----------------------------------------------------------\n  -----------------------------------------------------------\n  |                  Model\/Graph Integration                |\n  -----------------------------------------------------------<\/pre>\n<pre> ------------------  -----------------  --------------------\n  | HTTP Transport |  | PHP Transport |  | Socket Transport |\n  ------------------  -----------------  --------------------\n  -----------------------------------------------------------\n  |         Security\/Prettifier\/Limit Control               | \n  -----------------------------------------------------------<\/pre>\n<pre> -----------------------------------------------------------\n  |                      Graph () API                       |\n  -----------------------------------------------------------\n  -----------------------------------------------------------\n  |                          Node                           |\n  -----------------------------------------------------------<\/pre>\n<pre> -----------------------------------------------------------\n  |                          Edges                          |\n  -----------------------------------------------------------\n  -----------------------------  ----------------------------\n  |            ID             |  |        Connections       |\n  -----------------------------  ----------------------------<\/pre>\n<pre> -----------------------------  ----------------------------\n  |           Data            |  |   Algorithm Dispatcher   |\n  -----------------------------  ----------------------------\n  -----------------------------  --------- --------- --------\n  |   Global\/Local Namespace  |  |Listing| | Plain | | User |\n  |           Conversion      |  |Logic  | | Logic | | Logic|\n  -----------------------------  --------- --------- --------<\/pre>\n<pre> -----------------------------  ----------------------------\n  |     Storage Dispatcher    |  |    Search Dispatcher     |\n  -----------------------------  ----------------------------\n  -------- --------  ----------  --------- -------- ---------\n  |MySQL | |Mongo |  |External|  |Elastic| |Solr  | |MySQL  |\n  |Driver| |Driver|  |Driver  |  |Search | |Search| |Search |\n  -------- --------  ----------  --------- -------- ---------<\/pre>\n<p>Database Driver \u5b8c\u6210\u6240\u6709\u4e0e\u5177\u4f53\u7684\u6570\u636e\u5e93\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u63a5\u53e3\u3002 \u8fd9\u4e00\u5c42\u4ee5\u4e0a\u4e0d\u4f1a\u518d\u51fa\u73b0\u4efb\u4f55babel_topid\uff0ctpc_bak2, attributeData\u8fd9\u6837\u7684\u5b57\u7b26\u4e32\u4e86\u3002<\/p>\n<p>Storage Dispatcher, Search Dispatcher\u6839\u636e\u5bf9\u8c61\u7c7b\u578b\u5206\u914ddriver.<br \/>\n\u8fd9\u4e00\u5c42\u4ee5\u4e0a\u4e0d\u5e94\u8be5\u6709\u4efb\u4f55\u5730\u65b9\u77e5\u9053\u6570\u636e\u5b58\u5728\u54ea\u91cc\uff0c\u5982\u4f55\u5b58\u50a8\u3002<\/p>\n<p>Global\/Local Namespace Conversion\u5c42\uff0c\u4fdd\u8bc1\u4e4b\u4e0a\u6240\u6709\u7684\u5bf9\u8c61\u90fd\u662f\u7528GID\u8bbf\u95ee\u3002<br \/>\n\u8fd9\u4e00\u5c42\u4ee5\u4e0a\u4e0d\u5e94\u8be5\u6709\u4efb\u4f55\u5730\u65b9\u80fd\u591f\u770b\u5230lid\uff08Local ID\uff09\uff0c\u6240\u6709ID\u90fd\u662f\u552f\u4e00\u7684\u3002<br \/>\n\u8fd9\u4e00\u5c42\u4e00\u4e0b\u4e0d\u5e94\u8be5\u77e5\u9053\u6709global ID\u7684\u5b58\u5728<\/p>\n<p>Data\u5c42\uff0c\u57fa\u7840\u6570\u636e\u7c7b\uff0c\u6240\u6709\u6570\u636e\u4ece\u5b83\u800c\u6765\u3002\u5b8c\u6210Versioning\u7b49<\/p>\n<p>Algorithm Dispatcher\u5c42\uff0c\u6839\u636e\u4e0d\u540c\u4e0a\u4e0b\u6587\u9009\u62e9\u5408\u9002\u7684connection\u903b\u8f91<br \/>\n\u8fd9\u4e00\u5c42\u4e4b\u4e0a\u4e0d\u5e94\u8be5\u77e5\u9053\u4efb\u4f55\u4e1a\u52a1\u903b\u8f91\uff08\u8fd9\u91cc\u4f7f\u7528Strategy\u8bbe\u8ba1\u6a21\u5f0f\uff0c\u5e76\u4e0d\u4ea7\u751f\u6df7\u4e71\uff09<\/p>\n<p>Listing Logic\u7b49\u5c42\uff0c\u63d0\u4f9b\u7f6e\u9876\uff0c\u6392\u5e8f\uff0c\u53bb\u9664\u7b49\u5404\u79cdlisting\u4e1a\u52a1\u903b\u8f91<\/p>\n<p>Search Dispatcher\u5c42\uff0c\u628aQuery\u5206\u914d\u7ed9\u5408\u9002\u7684Search\u63d0\u4f9b\u8005<br \/>\n\u8fd9\u4e00\u5c42\u4ee5\u4e0a\u4e0d\u5e94\u8be5\u77e5\u9053\u641c\u7d22\u7531\u8c01\u63d0\u4f9b<br \/>\n\u8fd9\u4e00\u5c42\u4ee5\u4e0b\u4e0d\u5e94\u8be5\u77e5\u9053\u4efb\u4f55\u903b\u8f91<\/p>\n<p>Edges\u5c42\uff0c\u89e3\u6790id\uff0c\u548cid\u7684\u5404\u79cd\u8fde\u63a5\u3002<br \/>\n\u8fd9\u4e00\u5c42\u4e4b\u4e0a\u628aconn\u5c31\u5e94\u8be5\u5f53\u4f5c\u6570\u636e\u7684\u4e00\u90e8\u5206\uff0c\u4e0d\u4f5c\u533a\u5206\u3002<\/p>\n<p>Node\u5c42\uff0cGraph\u7684\u57fa\u7840\u6570\u636e\u5c42<\/p>\n<p>Graph\u5c42\uff0c\u63d0\u4f9bgraph()\u51fd\u6570\u8c03\u7528\uff0c\u4ee5\u53ca\u5bf9\u4e8eGraph\u7684\u547d\u4ee4\u89e3\u6790\uff0c\u63d0\u4f9b\u659c\u7ebf\u5206\u5272\u7684\u8bed\u6cd5\u3002<\/p>\n<p>Security\u5c42\uff0c\u4fdd\u8bc1API\u7684\u8c03\u7528\u5b89\u5168\u6027\uff0c\u8bbf\u95ee\u6b21\u6570\uff0c\u5bf9\u8c61\u7ec4\u88c5\u7b49\u6700\u540e\u5305\u88c5\u5de5\u4f5c<\/p>\n<p>Transport\u5c42\uff0c\u63d0\u4f9b\u5404\u79cd\u8fde\u5165Graph API\u7684\u65b9\u6cd5\u3002<\/p>\n<p>Transport\u5c42\u4ee5\u4e0a\u662f\u793a\u610f\u56fe\uff0c\u5e76\u6ca1\u6709\u4ed4\u7ec6\u63a8\u6572\uff0c\u5927\u6982\u63cf\u8ff0\u4f7f\u7528Graph API\u7684\u573a\u666f<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &hellip; <a href=\"https:\/\/home.wangjianshuo.com\/cn\/20120821_graph_.htm\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">Graph\u67b6\u6784\u56fe<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"postformatstandard","meta":[],"categories":[43],"tags":[],"_links":{"self":[{"href":"https:\/\/home.wangjianshuo.com\/cn\/wp-json\/wp\/v2\/posts\/602"}],"collection":[{"href":"https:\/\/home.wangjianshuo.com\/cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/home.wangjianshuo.com\/cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/home.wangjianshuo.com\/cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/home.wangjianshuo.com\/cn\/wp-json\/wp\/v2\/comments?post=602"}],"version-history":[{"count":8,"href":"https:\/\/home.wangjianshuo.com\/cn\/wp-json\/wp\/v2\/posts\/602\/revisions"}],"predecessor-version":[{"id":928,"href":"https:\/\/home.wangjianshuo.com\/cn\/wp-json\/wp\/v2\/posts\/602\/revisions\/928"}],"wp:attachment":[{"href":"https:\/\/home.wangjianshuo.com\/cn\/wp-json\/wp\/v2\/media?parent=602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/home.wangjianshuo.com\/cn\/wp-json\/wp\/v2\/categories?post=602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/home.wangjianshuo.com\/cn\/wp-json\/wp\/v2\/tags?post=602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}