第一部分 应用篇 -- 利用Tokyo Tyrant构建兼容Memcached协议、支持故障转移、高并发的分布式key-value持久存储系统
Tokyo Cabinet 是日本人 平林幹雄 开发的一款 DBM 数据库,该数据库读写非常快,哈希模式写入100万条数据只需0.643秒,读取100万条数据只需0.773秒,是 Berkeley DB 等 DBM 的几倍。
Tokyo Tyrant 是由同一作者开发的 Tokyo Cabinet 数据库网络接口。它拥有Memcached兼容协议,也可以通过HTTP协议进行数据交换。
Tokyo Tyrant 加上 Tokyo Cabinet,构成了一款支持高并发的分布式持久存储系统,对任何原有Memcached客户端来讲,可以将Tokyo Tyrant看成是一个Memcached,但是,它的数据是可以持久存储的。这一点,跟新浪的Memcachedb性质一样。
本日志由 flyinweb 于 2012-05-18 14:36:12 发表到 数据库技术 中,目前已经被浏览 22 次,评论 0 次;
作者添加了以下标签: TTserver,Tokyo Cabinet,Tokyo Tyrant;
首页只显示了部分日志内容,要查看日志的全部内容请阅读全文;
As a rule, it is impossible to host more than one SSL virtual host on the same IP address and port. This is because Apache needs to know the name of the host in order to choose the correct certificate to setup the encryption layer. But the name of the host being requested is contained only in the HTTP request headers, which are part of the encrypted content. It is therefore not available until after the encryption is already negotiated. This means that the correct certificate cannot be selected, and clients will receive certificate mismatch warnings and be vulnerable to man-in-the-middle attacks.
启用 apache 的 mod_ssl 之后需要有证书才能正常运作。写了个脚本来操作。首先要确定机器上已经有 openssl 。
本日志由 flyinweb 于 2012-05-18 11:29:30 发表到 WEB服务器 中,目前已经被浏览 18 次,评论 0 次;
作者添加了以下标签: SSL self-signed certificate,SSL;
首页只显示了部分日志内容,要查看日志的全部内容请阅读全文;
Windows Sidebar
There are a number of cool gadgets for the Windows Sidebar that are useful on a server, so I really wanted to get the sidebar working on my Windows Server 2008 boxes. The solution is as follows.
1.Copy the "Windows Sidebar" folder from a Windows Vista SP1 installations Program Files folder that is the same architecture as the Windows Server 2008 box you intend to enable Windows Sidebar on. (i.e., if I'm running Windows Server 2008 64-bit, then I need to copy from a 64-bit Windows Vista SP1 installation.)
2.Copy the "Windows Sidebar" copy into the Program Files folder of the Windows Server 2008 installation. (If 64-bit Windows Server 2008, copy to the "Program Files" folder and NOT the "Program Files (x86)" folder.)
3.Run the following commands from a prompt with administrative credentials
o Regsvr32 atl.dll (如果引组件未注册,在注册下面的组件时,可能会出现类似错误:模块“C:\Program Files\windows sidebar\sbdrop.dll”已加载,但对 DllRegisterServer 的调用失败,错误代码为 0x8007007e。)
o regsvr32 "C:\Program Files\Windows Sidebar\sbdrop.dll"
o regsvr32 "C:\Program Files\Windows Sidebar\wlsrvc.dll"
o "C:\Program Files\Windows Sidebar\sidebar.exe" /RegServer
4.Copy the content of the Sidebar registry area from your Vista box to the 2008 box (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Sidebar). The registry content is the same for 32-bit and 64-bit, so you can just paste the following into sidebar.reg and execute (by double clicking) to save any copying between machines.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Sidebar]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Sidebar\Compatibility]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Sidebar\Settings]
"SidebarDockedPartsOrder"="0x1,0x2,0x3,0x4
5.We can now launch sidebar with the "C:\Program Files\Windows Sidebar\sidebar.exe" command.
6.Sidebar will launch, and now access the Properties of Sidebar (right click on a blank area of sidebar and select Properties) and check the "State Sidebar when Windows starts" option.
Adding Vista Sidebar and Aero to Windows Server 2008 Desktop
Do the following steps in your target Windows Server 2008 x64 box.
To get the sidebar,
Sphinx是一个在GPLv2下分发的全文检索引擎;Coreseek 是一个可供企业使用的、基于Sphinx(可独立于Sphinx原始版本运行)的中文全文检索引擎,按照GPLv2协议发行,商业使用(例如, 嵌入到其他程序中)需要获得商业授权。
一般而言,Sphinx是一个独立的全文搜索引擎;而Coreseek是一个支持中文的全文搜索引擎,意图为其他应用提供高速、低空间占用、高结果相关度的中文全文搜索能力。Sphinx/Coreseek可以非常容易的与SQL数据库和脚本语言集成。
当前系统内置MySQL和PostgreSQL 数据库数据源的支持,也支持从管道标准输入读取入特定格式的XML数据。通过修改源代码,用户可以自行增加新的数据源(例如:其他类型的DBMS的原生支持)。在最新的版本中,用户还可以使用Python脚本作为数据源来获取任何已知世界和未知世界的数据,这极大的扩展了数据源的来源。
搜索API支持PHP、Python、Perl、Rudy和Java,并且也可以用作MySQL存储引擎。搜索API非常简单,可以在若干个小时之内移植到新的语言上。
Sphinx 是SQL Phrase Index的缩写,但不幸的和CMU的Sphinx项目重名。
Sphinx原始版本可以从Sphinx官方网站 http://www.sphinxsearch.com/,Coreseek可以从Coreseek官方网站 http://www.coreseek.cn/下载.
目前,Sphinx/Coreseek的发布包包括如下软件:
indexer: 用于创建全文索引;search: 一个简单的命令行(CLI) 的测试程序,用于测试全文索引;searchd: 一个守护进程,其他软件可以通过这个守护进程进行全文检索;sphinxapi: 一系列searchd 的客户端API 库,用于流行的Web脚本开发语言(PHP, Python, Perl, Ruby, Java).spelldump: 一个简单的命令行工具,用于从 ispell 或 MySpell (OpenOffice内置绑定) 格式的字典中提取词条。当使用 wordforms 时可用这些词条对索引进行定制.indextool: 工具程序,用来转储关于索引的多项调试信息。 此工具是从版本Coreseek 3.1(Sphinx 0.9.9-rc2)开始加入的。mmseg: 工具程序和库,Coreseek用于提供中文分词和词典处理。注:以下安装测试在Cent OS 5.x(5.4/5.6/5.8)x86、x86_64下环境测试通过
症状:
Cent OS安装httpd-2.4.2时出错:
configure: error: APR not found
背景:
Compiling and Installing Requirements
The following requirements exist for building Apache httpd:
./srclib/apr and ./srclib/apr-util (be sure the domain names do not have version numbers; for example, the APR distribution must be under ./srclib/apr/) and use ./configure's --with-included-apr option. On some platforms, you may have to install the corresponding -dev packages to allow httpd to build against your installed copy of APR and APR-Util.#Rename-FileExtension.ps1
Function Rename-FileExtension($path,$oldExtension, $newExtension)
{
Get-ChildItem -path $path -Filter $oldExtension |
Foreach-Object {
if($_.extension.length -gt 0)
{
$baseName = $_.name.remove($_.name.length - $_.extension.length)
}
ELSE
{ $baseName = $_.name }
Rename-Item -Path $_.fullname -newname ($baseName + $newExtension)
}
} #end functionp
Rename-FileExtension -path "C:\download\" -oldExtension "*.php" -newExtension ".htm"
本日志由 flyinweb 于 2012-04-16 22:10:49 发表到 Windows 中,目前已经被浏览 204 次,评论 0 次;
作者添加了以下标签: Rename-Item;
而且直接配置文件是效率最高的,通过其它驱动效率都相对较低,BDB
这个测试不太准确,看官方的测试结果:http://bind-dlz.sourceforg
为什么使用BDB时QPS这么低? 我在bind版本基本相似的环境中测试的
It is quite useful and interesting too.
VIRT 的上限是64G,也就是36位, cat /proc/cpuinfo的结果是:addre
昨天要准备用线程重写webbench,试验了下Fedora Linux 2.6.35.14
不明白您的具体的意思是什么?
已经发送到你QQ邮箱