<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HackGou In Lamp&#124;憨狗点灯 &#187; web</title>
	<atom:link href="http://hackgou.itbbq.com/category/web/feed" rel="self" type="application/rss+xml" />
	<link>http://hackgou.itbbq.com</link>
	<description>LAMP开放的是代码，是接口，是互操作性</description>
	<lastBuildDate>Thu, 15 Jul 2010 14:23:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>soap学习笔记</title>
		<link>http://hackgou.itbbq.com/soap%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0.html</link>
		<comments>http://hackgou.itbbq.com/soap%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0.html#comments</comments>
		<pubDate>Mon, 29 Mar 2010 13:08:26 +0000</pubDate>
		<dc:creator>HackGou</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[笔记]]></category>
		<category><![CDATA[soap]]></category>

		<guid isPermaLink="false">http://hackgou.itbbq.com/soap%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0.html</guid>
		<description><![CDATA[参考资料：

http://www.w3school.com.cn/soap/soap_envelope.asp

soap是什么之类的废话就不扯了，直奔主题，按图索骥：
&#60;?xml version=&#8221;1.0&#8243;?&#62; &#60;soap:Envelope xmlns:soap=&#8221;http://www.w3.org/2001/12/soap-envelope&#8221; soap:encodingStyle=&#8221;http://www.w3.org/2001/12/soap-encoding&#8221;&#62; &#60;soap:Header&#62; &#60;m:Trans xmlns:m=&#8221;http://www.w3school.com.cn/transaction/&#8221; soap:mustUnderstand=&#8221;1&#8243;&#62;234&#60;/m:Trans&#62; &#60;/soap:Header&#62; &#60;soap:Body&#62; &#60;m:GetPrice xmlns:m=&#8221;http://www.w3school.com.cn/prices&#8221;&#62; &#60;m:Item&#62;Apples&#60;/m:Item&#62; &#60;/m:GetPrice&#62; &#60;/soap:Body&#62; &#60;/soap:Envelope&#62;
soap必须：

使用命名空间: http://www.w3.org/2001/12/soap-envelope。 参见的命名是： soap-envelope或者soap 或者env
使用soap-envelope:encodingStyle指定文档中使用的数据类型: http://www.w3.org/2001/12/soap-encoding
必须使用Envelop根元素
可选的soap:Header元素。 上面的例子包含了一个带有一个 &#8220;Trans&#8221; 元素的头部，它的值是 234，此元素的 &#8220;mustUnderstand&#8221; 属性的值是 &#8220;1&#8243;。 SOAP 在默认的命名空间中 (&#8220;http://www.w3.org/2001/12/soap-envelope&#8221;) 定义了三个属性。这三个属性是：actor、 mustUnderstand 以及 encodingStyle 


actor：
通过沿着消息路径经过不同的端点，SOAP 消息可从某个发送者传播到某个接收者。 并非 SOAP 消息的所有部分均打算传送到 SOAP 消息的最终端点，不过，另一个方面， 也许打算传送给消息路径上的一个或多个端点。SOAP 的 actor 属性可被用于将 Header 元素寻址到一个特定的端点。

mustUnderstand 。
SOAP 的 mustUnderstand 属性可用于标识标题项对于要对其进行处理的接收者来说是强制的还是可选的。 假如您向 Header [...]]]></description>
		<wfw:commentRss>http://hackgou.itbbq.com/soap%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XPATH介绍</title>
		<link>http://hackgou.itbbq.com/xpath%e4%bb%8b%e7%bb%8d.html</link>
		<comments>http://hackgou.itbbq.com/xpath%e4%bb%8b%e7%bb%8d.html#comments</comments>
		<pubDate>Mon, 15 Mar 2010 15:04:50 +0000</pubDate>
		<dc:creator>HackGou</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[XPATH XML]]></category>

		<guid isPermaLink="false">http://hackgou.itbbq.com/xpath%e4%bb%8b%e7%bb%8d.html</guid>
		<description><![CDATA[XPath妙用多多，但是每次都是使用的时候翻手册，这次准备做点笔记： 先列些参考资料：

http://www.w3.org/TR/xpath
http://www.w3schools.com/XPath/default.asp
http://www.zvon.org/xxl/XPathTutorial/General/examples.html
http://en.wikipedia.org/wiki/XPath
http://www.w3school.com.cn/xpath/xpath_intro.asp： 中文的英语不好者或者不想自己翻译者的首选


XML 实例文档 
我们将在下面的例子中使用这个 XML 文档。

&#60;?xml version="1.0" encoding="ISO-8859-1"?&#62;
&#60;bookstore&#62;
&#60;book&#62;  &#60;title lang="eng"&#62;Harry Potter&#60;/title&#62;  &#60;price&#62;29.99&#60;/price&#62;&#60;/book&#62;
&#60;book&#62;  &#60;title lang="eng"&#62;Learning XML&#60;/title&#62;  &#60;price&#62;39.95&#60;/price&#62;&#60;/book&#62;
&#60;/bookstore&#62;



选取节点 
XPath 使用路径表达式在 XML 文档中选取节点。节点是通过沿着路径或者 step 来选取的。
下面列出了最有用的路径表达式： 



表达式
描述


nodename
选取此节点的所有子节点


/
从根节点选取


//
从匹配选择的当前节点选择文档中的节点，而不考虑它们的位置


.
选取当前节点


..
选取当前节点的父节点


@
选取属性



实例 
在下面的表格中，我们已列出了一些路径表达式以及表达式的结果：



路径表达式
结果


bookstore
选取 bookstore 元素的所有子节点


/bookstore

选取根元素 bookstore
注释：假如路径起始于正斜杠( / )，则此路径始终代表到某元素的绝对路径！



bookstore/book
选取所有属于 bookstore 的子元素的 book 元素。


//book
选取所有 book 子元素，而不管它们在文档中的位置。


bookstore//book
选择所有属于 bookstore 元素的后代的 book 元素，而不管它们位于 bookstore 之下的什么位置。


//@lang
选取所有名为 lang 的属性。




谓语（Predicates） 
谓语用来查找某个特定的节点或者包含某个指定的值的节点。
谓语被嵌在方括号中。
实例 
在下面的表格中，我们列出了带有谓语的一些路径表达式，以及表达式的结果：



路径表达式
结果


/bookstore/book[1]
选取属于 bookstore 子元素的第一个 book 元素。


/bookstore/book[last()]
选取属于 bookstore [...]]]></description>
		<wfw:commentRss>http://hackgou.itbbq.com/xpath%e4%bb%8b%e7%bb%8d.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>httperf原来这么猛</title>
		<link>http://hackgou.itbbq.com/httperf%e5%8e%9f%e6%9d%a5%e8%bf%99%e4%b9%88%e7%8c%9b.html</link>
		<comments>http://hackgou.itbbq.com/httperf%e5%8e%9f%e6%9d%a5%e8%bf%99%e4%b9%88%e7%8c%9b.html#comments</comments>
		<pubDate>Thu, 27 Sep 2007 21:06:02 +0000</pubDate>
		<dc:creator>HackGou</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://hackgou.itbbq.com/httperf%e5%8e%9f%e6%9d%a5%e8%bf%99%e4%b9%88%e7%8c%9b.html</guid>
		<description><![CDATA[httperf 和ab是两个web benchmark的好工具。
今天为了测试美国的两个站点的响应，把httperf的 &#8211;num-conn 设成
5000。结果不到10分钟，nagios的警报就发到手机上了：有4台服务器负载告急！简直不可思议：服务器是7台webweb加12台db组成的集群。而这个命令行只是在一台普通的pc
server上面执行的。对着其中的一台服务器做日志分析：
 0 :   918       3.23%
 1 :   470       1.65%
 2 :   427       1.50%
 3 :  1253       4.41%
 4 :  [...]]]></description>
		<wfw:commentRss>http://hackgou.itbbq.com/httperf%e5%8e%9f%e6%9d%a5%e8%bf%99%e4%b9%88%e7%8c%9b.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>C10K Problems</title>
		<link>http://hackgou.itbbq.com/c10k-problems.html</link>
		<comments>http://hackgou.itbbq.com/c10k-problems.html#comments</comments>
		<pubDate>Thu, 27 Sep 2007 18:15:02 +0000</pubDate>
		<dc:creator>HackGou</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://hackgou.itbbq.com/c10k-problems.html</guid>
		<description><![CDATA[原文位于： http://www.kegel.com/c10k.html
The C10K problem
[Help save the best Linux news source on the web -- subscribe to Linux Weekly News!]
It&#8217;s time for web servers to handle ten thousand clients simultaneously, don&#8217;t you think? After all, the web is a big place now. 
And computers are big, too. You can buy a 1000MHz machine with 2 gigabytes [...]]]></description>
		<wfw:commentRss>http://hackgou.itbbq.com/c10k-problems.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>把lighttpd的虚拟主机配置放到数据库</title>
		<link>http://hackgou.itbbq.com/%e6%8a%8alighhtpd%e7%9a%84%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba%e9%85%8d%e7%bd%ae%e6%94%be%e5%88%b0%e6%95%b0%e6%8d%ae%e5%ba%93.html</link>
		<comments>http://hackgou.itbbq.com/%e6%8a%8alighhtpd%e7%9a%84%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba%e9%85%8d%e7%bd%ae%e6%94%be%e5%88%b0%e6%95%b0%e6%8d%ae%e5%ba%93.html#comments</comments>
		<pubDate>Thu, 09 Nov 2006 18:10:01 +0000</pubDate>
		<dc:creator>HackGou</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[生活小札]]></category>

		<guid isPermaLink="false">http://hackgou.itbbq.com/%e6%8a%8alighhtpd%e7%9a%84%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba%e9%85%8d%e7%bd%ae%e6%94%be%e5%88%b0%e6%95%b0%e6%8d%ae%e5%ba%93.html</guid>
		<description><![CDATA[MySQL现在成了一个垃圾桶，什么都能够往里面装：
pam_mysql 做PAM认证
mysql做ftp/mail后端认证数据库，
mod_mysql_vhost为apache乃至lighttpd做vhost
只有想不到，没有做不到，下面就是ligttpd的vhost模块支持
MySQL-based vhosting Module: mod_mysql_vhost
Table of Contents
Description Options Description With MySQL-based vhosting you can store the path to a given host&#8217;s document root in a MySQL database.
Note
Keep in mind that only one vhost module should be active at a time. Don&#8217;t mix mod_simple_vhost with mod_mysql_vhost.
Options Example:
mysql-vhost.db          [...]]]></description>
		<wfw:commentRss>http://hackgou.itbbq.com/%e6%8a%8alighhtpd%e7%9a%84%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba%e9%85%8d%e7%bd%ae%e6%94%be%e5%88%b0%e6%95%b0%e6%8d%ae%e5%ba%93.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>除了apache还有什么？</title>
		<link>http://hackgou.itbbq.com/%e9%99%a4%e4%ba%86apache%e8%bf%98%e6%9c%89%e4%bb%80%e4%b9%88.html</link>
		<comments>http://hackgou.itbbq.com/%e9%99%a4%e4%ba%86apache%e8%bf%98%e6%9c%89%e4%bb%80%e4%b9%88.html#comments</comments>
		<pubDate>Thu, 09 Nov 2006 14:12:19 +0000</pubDate>
		<dc:creator>HackGou</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mathopd]]></category>
		<category><![CDATA[SRR]]></category>
		<category><![CDATA[TUX]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://hackgou.itbbq.com/%e9%99%a4%e4%ba%86apac-he%e8%bf%98%e6%9c%89%e4%bb%80%e4%b9%88%ef%bc%9f.html</guid>
		<description><![CDATA[作为开源的web server apache2可谓占尽天时地利人和：不仅开源社区的人对他顶礼膜拜，乃至
其他平台的的web server也敬他三分。
但是到底在开源阵营中还有些什么出色的web server呢？

&#160;

首先映入眼帘的是lighttpd：
http://www.lighttpd.net/
lighttpd的兴起，和rails密不可分。
lighttpd+ SCGI&#160;(SRR)是rails社区公认的不二选择。
SCGI作为fastCGI的天然替代物，对所有支持 SCGI协议的web server都可以实现无缝移植。
其实除了SCGI之外，类似php的mod_php、ruby也有apache的 mod_ruby。也可以和apache
集成，当然这是apache dependent的。
&#160;
在性能方面，普遍的说法是lighttpd比apache2快过4、5倍，连lighttpd官方的说法也是快过2、3倍
当然也有人嚷嚷：lighttpd在扯蛋&#160;（当然我们得注意一下这家伙的背景）
真是公说公有理、婆说婆有理
&#160;
另外还有一个thttpd，性能也非常出色
http://www.acme.com/software/thttpd/benchmarks.html



实线部分是处理处理1000个1kB大小的文件，Java实现的Acme.Serve和Jigsaw连测试都没有承受住，
就挂了。&#160; :P
虚线部分是使用很简单的CGI hello world&#34; C program.作为CGI测试的。
在这份benchmark中，出现了另外一个BSD license的web server:Mathopd&#160;优秀的CGI性能简直让人大跌眼镜
但是不知道真实的生产环境性能如何！
&#160;
说道静态文件服务，不得不提一下TUX：
虽然没有具体的数据说明TUX的性能个到底如何，但是业界广泛认为：作为运行于内核空间的TUX，由于少了
content切换的开销，相比其他用户空间的web server比如apache反应快速的多，另外Red Hat给他的学名儿
叫：Red Hat Content Accelerator&#160;。所以提供image之类的服务是在适合不过的了，但是也正是因为这个最大
的优势限制了他在其他平台的使用，是一个linux dependent的web server。同时，运行于内核空间的他，
一旦crash，后果可想而知。
&#160;

更多的web server list可以参考这儿：
http://en.wikipedia.org/wiki/Comparison_of_web_servers

]]></description>
		<wfw:commentRss>http://hackgou.itbbq.com/%e9%99%a4%e4%ba%86apache%e8%bf%98%e6%9c%89%e4%bb%80%e4%b9%88.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
