| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
- <meta name="language" content="zh-cn" />
- <link rel="stylesheet" type="text/css" href="api/css/style.css" />
- <link rel="stylesheet" type="text/css" href="api/css/guide.css" />
- <link rel="stylesheet" type="text/css" href="api/css/highlight.css" />
- <title>Xunsearch 架构简图</title>
- </head>
- <body>
- <div id="apiPage">
- <div id="apiHeader">
- <a href="http://www.xunsearch.com" target="_blank">Xunsearch PHP-SDK</a> v1.3.2 权威指南
- </div><!-- end of header -->
- <div id="content" class="markdown">
- <h1 id="xunsearch-">Xunsearch 架构简图</h1>
- <p>Xunsearch 分为后端服务和前端开发包两大部分,这两个部分允许部署在不同服务器中。</p>
- <p>后端是采用 C/C++ 开发的守护进程,包括索引服务器(xs-indexd)、搜索服务器(xs-searchd)。
- 索引服务器用于集中处理索引变动,并自动调用工具程序优化和更新数据库;搜索服务器
- 借鉴了 nginx 的作法,使用进程、线程混合工作模式处理高并发的搜索请求。</p>
- <p>通常在二次开发时并不需要去关心后端的实现,只要在我们提供的前端开发包基础上开发即可。</p>
- <p>前端开发包通常使用脚本语言编写,负责协商前端调用与后端服务通讯,我们称之为 SDK
- 开发包。理论上支持各种包含 socket 通讯实现的脚本语言,但目前我们只提供了 PHP
- 语言,以后再陆续考虑和开发其它语言。非常欢迎有能力有意愿的朋友提供、贡献其它语种的代码。</p>
- <p>下面是我们用字符直接制作的一张架构简图。</p>
- <pre>
- ==============================
- | Your Search Application |
- ==============================
- /\ /\
- ................ /||\ ............ /||\ ....................
- : || || :
- : +-----------------------------+ :
- : | [PHP] | other lang (TODO) | :
- : |-----------------------------| :
- : | SDK: (xunsearch devkit) | :
- : +-----------------------------+ :
- : / \ :
- : / \ :
- : +-----------------+ +-------------------+ :
- : | Index-server | | Search-server | :
- : |-----------------| |-------------------| :
- : | xs-indexd | | xs-searchd | :
- : | xs-import | | 1*master | :
- : | xs-logging | | N*worker(M*thread)| :
- : +-----------------+ +-------------------+ :
- : | | :
- : | | :
- : +-----------------------------+ :
- : | Xapian-core + scws | :
- : +-----------------------------+ :
- : | | | :
- : +------------+ +--------+ +---------------+ :
- : | Local Disk | | Memory | | Remote socket | :
- : +------------+ +--------+ +---------------+ :
- : :
- ...................... Xun Search ..........................
- </pre>
- <div class="revision">$Id$</div>
- <div class="clear"></div>
- </div><!-- end of content -->
- <div id="guideNav">
- <div class="clear"></div>
- </div><!-- end of nav -->
- <div id="apiFooter">
- Copyright © 2008-2011 by <a href="http://www.xunsearch.com" target="_blank">杭州云圣网络科技有限公司</a><br/>
- All Rights Reserved.<br/>
- </div><!-- end of footer -->
- </div><!-- end of page -->
- <div style="display:none;">
- <img src="api/css/info.gif" />
- <img src="api/css/tip.gif" />
- <img src="api/css/note.gif" />
- </div>
- </body>
- </html>
|