首页 > 都市言情 > 暗陆 > 第219章 神奇的互联网

第219章 神奇的互联网(1/2)

目录

Use :p.systes.

Land:

Subject: Real-ti data updates with high currency - server bottleneck

(主题:高并发下的实时数据更新-服务器瓶颈)

I buildg a sall site that shows fast-gg data. Every few seds the nubers ge.

(我在做一个小网站,展示一些变化很快的数据,每几秒钟数字会变化。)

Proble: when 50 ers refresh at the sa ti, y CGI scripts lock up.

(问题是:如果50个用户同时刷新,我的CGI脚本就卡死了。)

Any way to ph the new data to ts without the refreshg? Or a ligheight way to handle currency?

(有没有办法不用用户刷新就能把新数据推给他们?或者有什么轻量级的并发处理方案?)

Hardware: oiu 75, 16MB RAM, Lux.

(硬件:一台奔腾75,16兆内存,Lux系统。)

Thanks.

– Land

--------------------------------

Wd LF:

Dont ph. Let ts pull but with a trick.

(别推送,让用户拉取,但有个小技巧。)

Use a ty hidden ifra that refreshes every 2 seds, loadg a static HTML file. Update that file via script every sed.

(用一个隐藏的小ifra,每两秒刷新一次,里面加载一个静态HTML文件,再用定时脚本每秒钟更新那个文件。)

Ma page reads the test nubers fro that file g JavaScript. No CGI hit on each refresh.

(主页面用JavaScript从那个文件里读取最新数据,每次刷新就不会触发CGI。)

currency? Use flo a text file. With 100 ers, your Pentiu wont blk.

(对于并发问题,只要对文本文件使用文件锁,哪怕上百个用户,你那台奔腾也没问题的。)

Also – ditch CGI. Write a sall as FastCGI or e id.

(另外:扔掉CGI,写一个小的C语言程序,做成FastCGI,或者用id启动。)

Trt . I fro the future.

(相信我,我是从未来来的。)

– Wd LF

-----------------------------

苏安心念电转,飞快的脑子里分析着这个d LF提供的解决方法,让他惊喜的是,这家伙提供的这个解决方案,大概率是真的可行的!

“这家伙还挺有意思,居然还说自己是从未来来的!…他应该还在线,干脆再赶紧问一下方案的细节!…”苏安飞快的敲出了他的追问。

Land:

Wd LF, ifra? That works? What is FastCGI? I Never heard.

(风,ifra?这能行吗?FastCGI是什么?我没听说过。)

fro the future It’s a joke?

(“从未来来的”真的吗?)

– Land

这一次,Wd LF回得更快!

Wd LF:

FastCGI isnt public yet. OpenBSD jt got it ports. Check your eail.

(FastCGI还没公开发布,OpenBSD刚刚在ports里有了,去查一下你的邮箱!)

That ifra trick,Youll see it everywhere a few years.

(那个ifra小技巧,过几年就会满世界都是了。)

Not a joke. You need ore help, jt ask. But s g <ta refresh>.

(不是玩笑,如果你还需要帮忙就说,但别再用了 <ta refresh> 了。)

– Wd LF

看着Wd LF的回复,苏安有些发愣,网络世界果然不一样,什么人都有!

苏安并不打算去纠结这个Wd LF是不是来自未来的了,他必须马上验证一下这家伙说的是不是对的。

苏安登录了自己的邮箱,他真的收到了Wd LF发来的邮件,里面还附带了FastCGI的下载地址。

本章未完,点击下一页继续阅读。

目录
返回顶部