ARCHITECTURE.html 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
  5. <meta name="language" content="zh-cn" />
  6. <link rel="stylesheet" type="text/css" href="api/css/style.css" />
  7. <link rel="stylesheet" type="text/css" href="api/css/guide.css" />
  8. <link rel="stylesheet" type="text/css" href="api/css/highlight.css" />
  9. <title>Xunsearch 架构简图</title>
  10. </head>
  11. <body>
  12. <div id="apiPage">
  13. <div id="apiHeader">
  14. <a href="http://www.xunsearch.com" target="_blank">Xunsearch PHP-SDK</a> v1.3.2 权威指南
  15. </div><!-- end of header -->
  16. <div id="content" class="markdown">
  17. <h1 id="xunsearch-">Xunsearch 架构简图</h1>
  18. <p>Xunsearch 分为后端服务和前端开发包两大部分,这两个部分允许部署在不同服务器中。</p>
  19. <p>后端是采用 C/C++ 开发的守护进程,包括索引服务器(xs-indexd)、搜索服务器(xs-searchd)。
  20. 索引服务器用于集中处理索引变动,并自动调用工具程序优化和更新数据库;搜索服务器
  21. 借鉴了 nginx 的作法,使用进程、线程混合工作模式处理高并发的搜索请求。</p>
  22. <p>通常在二次开发时并不需要去关心后端的实现,只要在我们提供的前端开发包基础上开发即可。</p>
  23. <p>前端开发包通常使用脚本语言编写,负责协商前端调用与后端服务通讯,我们称之为 SDK
  24. 开发包。理论上支持各种包含 socket 通讯实现的脚本语言,但目前我们只提供了 PHP
  25. 语言,以后再陆续考虑和开发其它语言。非常欢迎有能力有意愿的朋友提供、贡献其它语种的代码。</p>
  26. <p>下面是我们用字符直接制作的一张架构简图。</p>
  27. <pre>
  28. ==============================
  29. | Your Search Application |
  30. ==============================
  31. /\ /\
  32. ................ /||\ ............ /||\ ....................
  33. : || || :
  34. : +-----------------------------+ :
  35. : | [PHP] | other lang (TODO) | :
  36. : |-----------------------------| :
  37. : | SDK: (xunsearch devkit) | :
  38. : +-----------------------------+ :
  39. : / \ :
  40. : / \ :
  41. : +-----------------+ +-------------------+ :
  42. : | Index-server | | Search-server | :
  43. : |-----------------| |-------------------| :
  44. : | xs-indexd | | xs-searchd | :
  45. : | xs-import | | 1*master | :
  46. : | xs-logging | | N*worker(M*thread)| :
  47. : +-----------------+ +-------------------+ :
  48. : | | :
  49. : | | :
  50. : +-----------------------------+ :
  51. : | Xapian-core + scws | :
  52. : +-----------------------------+ :
  53. : | | | :
  54. : +------------+ +--------+ +---------------+ :
  55. : | Local Disk | | Memory | | Remote socket | :
  56. : +------------+ +--------+ +---------------+ :
  57. : :
  58. ...................... Xun Search ..........................
  59. </pre>
  60. <div class="revision">$Id$</div>
  61. <div class="clear"></div>
  62. </div><!-- end of content -->
  63. <div id="guideNav">
  64. <div class="clear"></div>
  65. </div><!-- end of nav -->
  66. <div id="apiFooter">
  67. Copyright &copy; 2008-2011 by <a href="http://www.xunsearch.com" target="_blank">杭州云圣网络科技有限公司</a><br/>
  68. All Rights Reserved.<br/>
  69. </div><!-- end of footer -->
  70. </div><!-- end of page -->
  71. <div style="display:none;">
  72. <img src="api/css/info.gif" />
  73. <img src="api/css/tip.gif" />
  74. <img src="api/css/note.gif" />
  75. </div>
  76. </body>
  77. </html>