2008-04-04 16:24
1 判断一个socket是否已连接
getpeername 返回-1 而且 errno== ENOTCONN |
2007-12-15 21:53
在mod_cgi.c中有一段,使用了这两种方法
if (location && location[0] == '/' && r->status == 200) {
/* This redirect needs to be a GET no matter what the original
* method was.
*/
|
2007-12-10 19:18
原文
http://www.infoq.com/interviews/dan-pritchett-ebay-architecture#
只挑了几点感兴趣的东西记录
1 ebay不用事务?
回答是像支付相关的paypal是肯定有事务的。但是ebay.com不用事务。因为数据可能分布到不同的机器上去了,一个事务可能需要一个两步提交的过程,这个过程从实用主义角度来说也不太可取。
其实,没事务的原因是ebay 认为有一些数据是 |
2007-12-09 20:04
用php肯定少了不这个问题的选择,cgi自然就不必说了,但是mod_php和fastcgi的争论确还是比较多的。
找了一些资料,晾在这,可供参考。
首先,性能应该是大家最关心的问题了,除了mod_php和fastcgi 的 benchmark,还有一些服务器差别的测试,如apache vs lighthttpd
1 mod_php, LightTPD, FastCGI - What's fastest?
这个bechmark的结果是 Apache(prefork)+Fastcgi+ |
2007-12-08 17:12
http://www.youtube.com/watch?v=ZW5_eEKEC28
1 use mod_fast_cgi and python app server
vs php in apache
DB
1 store meta data(users, tags, content des, etc)
2 2.4.x linux内核的swap调度有问题,它认为page cache更重要,从而经常把mysql给swap出去了
|
2007-12-01 16:57
访问几个门户网站时,经常看到 secure-cn imrworldwide.com 这个东东在状态栏上一闪而过,开始一直也没留意。今天用 yslow时,发现sina是从上面请求了一个js。访问www.imrworldwide.com,知道这是个做统计分析相关的网站。
baidu了一把,"原来是nielsen的网站评测代码,nielsen现在在做中国4大门户的排名"。搞不懂这些门户怎么会愿意参加这种排名?
另外,把sina中的相关代 |
2007-12-01 16:50
2007-11-11 19:44
2007-11-10 19:36
static inline 和 extern inline
Linus是这样解释的:
-
"static inline" means "we have to have this function, if you use it but don't inline it, then make a static version of it in this compilation unit"
-
"extern inline" means "I actually _have_ an extern for this functi |
2007-10-21 17:54
|
|
sprite_sy
男
|