锁定老帖子 主题:门户网站首页怎么样取数据!
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2008-07-22
yuyue 写道 现在问题就剩下一个了。当用户防问首页,但是正好首页又重新生成的时候,会不会报个404啊?
如果操作系统是UNIX的话可以把生成的页面放入单独的文件夹里,生成完毕后改一下符号链接指向新的文件夹,切换只用相当短的时间。 |
|
返回顶楼 | |
发表时间:2008-08-22
门户的首页是分块的,也并不是自动生成,而是人工编辑的
|
|
返回顶楼 | |
发表时间:2008-08-26
1. Optimize database for optimized queries
- Export data from the transactional database to a denormalized read-only database that has indexes designed for queries - Decentralize database 2. Cache data in the memory (before there was DB, all data was stored in memory) - This only works for small amount of data - Write a thread to periodically load data from DB to memory; have Web page use the in memory variables without running SQL; - or have other code update in-memory variables, then write a thread to write data into DB to persist; need to deal with failover scenarios - Not good for CGI or clustered systems 3. Use Web page cache products, with the cached copy periodically updated from the backend - One variation of this is to pre-generate the static pages as discussed above 4. Mix use all of the above if you want the best of all; consider use different programming lauguages, different application servers and different databases for different parts of a page or a site 5. Read http://developer.yahoo.com/performance/rules.html to further optimize the Web site 6. ? |
|
返回顶楼 | |