2008-01-29 Tue
Author:丁原 posted on Taobao.com
缓存机制简单的说就是缓存sql文本及查询结果,如果运行相同的sql,服务器直接从缓存中取到结果,而不需要再去解析和执行sql。如果表更改了,那么使用这个表的所有缓冲查询将不再有效,查询缓存值的相关条目被清空。更改指的是表中任何数据或是结构的改变,包括INSERT、UPDATE、DELETE、TRUNCATE、ALTER TABLE、DROP TABLE或DROP DATABASE等,也包括那些映射到改变了的表的使用MERGE表的查询。显然,这对于频繁更新的表,查询缓存是不适合的,而对于一些不常改变数据且有大量相同sql查询的表,查询缓存会节约很大的性能。
查询必须是完全相同的(逐字节相同)才能够被认为是相同的。另外,同样的查询字符串由于其它原因可能认为是不同的。使用不同的数据库、不同的协议版本或者不同 默认字符集的查询被认为是不同的查询并且分别进行缓存。
下面sql查询缓存认为是不同的:
SELECT * FROM tbl_name
Select * from tbl_name
查询缓存相关参数
+------------------------------+---------+
| Variable_name | Value |
+------------------------------+---------+
| have_query_cache | YES | --查询缓存是否可用
| query_cache_limit | 1048576 | --可缓存具体查询结果的最大值
| query_cache_min_res_unit | 4096 |
| query_cache_size | 599040 | --查询缓存的大小
| query_cache_type | ON | --阻止或是支持查询缓存
| query_cache_wlock_invalidate | OFF |
+------------------------------+---------+
下面是一个简单的例子:
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.0.45-community MySQL Community Edition (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> set global query_cache_size = 600000; --设置缓存内存
Query OK, 0 rows affected (0.00 sec)
mysql> set session query_cache_type = ON; --开启查询缓存
Query OK, 0 rows affected (0.00 sec)
mysql> use test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| animals |
| person |
+----------------+
5 rows in set (0.00 sec)
mysql> select count(*) from animals;
+----------+
| count(*) |
+----------+
| 6 |
+----------+
1 row in set (0.00 sec)
--Qcache_hits表示sql查询在缓存中命中的累计次数,是累加值。
mysql> SHOW STATUS LIKE 'Qcache_hits';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Qcache_hits | 0 | --0次
+---------------+-------+
8 rows in set (0.00 sec)
mysql> select count(*) from animals;
+----------+
| count(*) |
+----------+
| 6 |
+----------+
1 row in set (0.00 sec)
mysql> SHOW STATUS LIKE 'Qcache%';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Qcache_hits | 1 | --表示sql在缓存中直接得到结果,不需要再去解析
+---------------+-------+
8 rows in set (0.00 sec)
mysql> select count(*) from animals;
+----------+
| count(*) |
+----------+
| 6 |
+----------+
1 row in set (0.00 sec)
mysql> select count(*) from animals;
+----------+
| count(*) |
+----------+
| 6 |
+----------+
1 row in set (0.00 sec)
mysql> SHOW STATUS LIKE 'Qcache_hits';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Qcache_hits | 3 | --上面的sql也是是从缓存中直接取到结果
+---------------+-------+
1 row in set (0.00 sec)
mysql> insert into animals select 9,'testsds' ; --插入数据后,跟这个表所有相关的sql缓存就会被清空掉
Query OK, 1 row affected (0.00 sec)
Records: 1 Duplicates: 0 Warnings: 0
mysql> select count(*) from animals;
+----------+
| count(*) |
+----------+
| 7 |
+----------+
1 row in set (0.00 sec)
mysql> SHOW STATUS LIKE 'Qcache_hits';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Qcache_hits | 3 | --还是等于3,说明上一条sql是没有直接从缓存中直接得到的
+---------------+-------+
1 row in set (0.00 sec)
mysql> select count(*) from animals;
+----------+
| count(*) |
+----------+
| 7 |
+----------+
1 row in set (0.00 sec)
mysql> SHOW STATUS LIKE 'Qcache_hits';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Qcache_hits | 4 |
+---------------+-------+
1 row in set (0.00 sec)
我是从07年12月开始学习mysql的,断断续续看了一小部分。一直想写个mysql入门的系列,包括mysql的安装,配置再到优化,复制,集群等等,唉,懒哪,什么都没有整理出来,希望年后能有所进展。
参考:
http://dev.mysql.com/doc/refman/5.1/zh/
回家过年,似乎是我们每个人过年时不可动摇的情结,与往年不同,今年回家的路显得格外长、格外难,春运的焦点不再是买票难,而是行路难,由于我国中部和南方罕见的连续暴雪灾害,造成高速公路拥堵、封路,火车飞机停运或延误,并导致数以万计的春运旅客滞留在了回家的路上。今天,我们谷歌地图工程团队紧急推出"春运交通图",以标注式电子地图的形式提供了全国春运沿线各主要城市的天气和交通整合信息。这是周二上午谷歌的工程师李双峰和陆韵晟讨论时萌发的想法,随后大家就自动组成一个临时小组,下午紧急推出了这个页面,我们衷心希望能帮助那些正在路上或者准备回家的朋友们及时了解路况信息,提前制定合理的出行计划,抗击风雪回家过年。
在谷歌"春运交通图"上,我们以图标的形式在原有的电子地图上增添了与天气信息相关的信息。点击春运沿线重要城市上方的天气图标,地图上就会弹出这个城市详细的天气情况。
 
 
在重要的交通枢纽上方,大家还可以看到一些火车、汽车或飞机状的小图标,打开它们则能了解该地交通的最新情况,如停止售票、关闭机场和汽车停运的时间和原因,停运的车次,车站或机场滞留的旅客人数以及在何处退票等。
 
"春运交通图"上还标出了主要的铁路、高速公路和国道,如果铁路或公路被"加红加粗"、那就说明它可能处于封路或受阻状态。点击后即可了解滞留人数、目前情况、持续时间。
 
除了这些图标信息外,谷歌"春运交通图"左侧列出了和春运相关的、涉及天气及交通的标题,例如"上海停售长途火车票"或"南京机场关闭",不必费力放大、缩小和拉动电子地图来寻找关注的城市和地区,只需点击这些标题,电子地图就会自动平移到相应的城市或地区,弹出详细的信息。
 
如果您了解最新的天气、交通情报,欢迎发送到chunyun.china@gmail.com,经过核实无误后,我们会把它更新到"春运交通图"上。希望通过我们的技术能为大家提供一点帮助,祝愿所有的朋友都能安全顺利地回家,预祝大家春节快乐。
春运交通图:ditu.google.cn/chunyun
In April 2007, I bought my wife a digital SLR for her birthday. I also took this chance to install Fedora 7 on her computer. I am familiar with using digital cameras under Linux and had no desire to figure it out on Windows. Within a couple hours, Fedora 7 was installed, and I was able to download images from the camera to her computer. We tried several photo management programs like gthumb and f-spot. We stuck with gthumb, using the standard directories, as this was more natural for how we worked.
We use smugmug.com to host our photos. It is a subscription-based site geared towards professional photographers. We chose smugmug because it offered unlimited storage, backup DVDs of all our photographs, and their excellent API.
On a warm day in August, I observed my wife uploading picture to smugmug.com. The upload screen is a basic file interface with text boxes and browse buttons that allow users to process up to 10 images at a time. This can be quite cumbersome if an average photo shoot yields 200 or more pictures.
I noticed she had Nautilus open so she could choose which photos to upload, then used the browse button to find the image’s filename. I asked her, “Wouldn’t it be awesome if you could select the photos you wanted to upload in Nautilus and drag them to another folder all at once?”
That’s when I truly saw the light bulb turn on over my head. I could write a FUSE-based filesystem that looked to the user like a regular file window… but was actually able to communicate to smugmug.com via their API.
On August 19th, 2007, I announced my project on my blog.
I remember hearing about FUSE, Filesystem in Userspace . FUSE is an open source project that allows one to create virtual filesystems for use by non-privileged users without having to recompile the kernel.
There are many projects that use FUSE today including zmugfs, EncFS, flickrfs, and many others. What makes FUSE so attractive is that the API is simple. It offers a low barrier-to-entry, as well as numerous language bindings. It works with popular languages such as C, Python, and Java as well as with more obscure ones like Haskell, Erlang, and Lua.
Before implementing zmugfs, I searched for FUSE based filesystems for smugmug. I found none, but I found two others, one for flickr and one for gmail, both written in Python. After 10 years of writing Java, I wanted to learn a new language, and Python fit the bill. I needed a language that was easy to understand, fast to develop with, and well supported by FUSE.
After working in the evenings for 3 months, I released zmugfs 0.1 on October 31, 2007.
How does it work?
Zmugfs consists of the FUSE-based filesystem (zmugfs.py), some configuration files (zmugfsrc), and a library wrapper for the smugmug.com Javascript Object Notation (JSON) API (zmugjson).
The FUSE functionality is all captured within zmugfs.py. You extend a class called Fuse from the python-fuse library, implementing the methods you need to support the operations you wish to support. For my first release, I planned read-only support of the galleries and photos.
The categories or albums on smugmug are mapped to directories in zmugfs, while photos are mapped to files. I implemented 5 methods: getattr(), opendir(), open(), read() and release(). The bulk of the work was in the JSON API wrapper.
Zmugjson uses simplejson to parse the JSON responses into dictionaries and objects. It also creates a server proxy in a way similar to how the Python xmlrpc library works. It allows dynamic methods to be called; for instance, to call the method smugmug.user.getDetails you can say:
client.smugmug.user.getDetails()
Zmugjson will then generate the proper URL to communicate with smugmug. To avoid exposing too many of the API details to the callers, zmugjson attempts to encapsulate the details with a smugmug wrapper class that handles the gory details of parsing the JSON response and dealing with status codes. This approach made it much easier to write zmugfs.
sm = zmugjson.Smugmug(apikey)
sessionid = sm.loginWithPassword(self._config['smugmug.username'],
self._config['smugmug.password'])
tree = sm.getTree(sessionid, 1)
The final piece of zmugfs is its configuration file. By default, the configuration file is stored in $HOME/.zmugfs/zmugfsrc. It contains 4 entries:
smugmug.username= smugmug.password=[plain text] # specify image.disk.cache using megabytes # 100MB ~ 50 images image.disk.cache=100 image.memory.cache=5
The image.*.cache controls how much disk and memory to consume when downloading image data. The smugmug.* configuration entries are simply your smugmug.com account information and plain text password.
Installation
The simplest way to install zmugfs is using the pre-made rpms which can be found at Sourceforge.
Download the zmugfs and zmugjson rpms, then install them using this command:
sudo yum install –nogpgcheck zmugfs-0.1-2.fc7.noarch.rpm zmugjson-0.1-1.fc7.noarch.rpm
Yum will take care of the installation, including checking any dependencies. Once installed, add the user that will be using zmugfs to the fuse group:
sudo /usr/sbin/usermod -a -Gfuse zmuguser
Now run /usr/bin/zmugfs [mount directory] where “mount directory” is the directory where you want to store your smugmug albums locally. At this point, you should be able to browse your albums and photos using Nautilus or the command line.


As you can see, zmugfs allows you to treat your online smugmug.com albums and photos as if they were local to your machine.
Future versions of zmugfs will allow you to create and upload your images, but version 0.1 is limited to read-only commands.
Got a open source project you’d like to introduce to the world? Tell us about it.
Movable Type 4.1 has just been released. This represents first stable release of Movable Type Open Source (MTOS). In addition, the commercial version has also been released, which includes the same MTOS 4.1 + the "Professional Pack", which includes a slick commercial template set and Custom Fields functionality. MT 4.1 includes a number of new features and user interface enhancements. Highlights include system-wide template modules, a pluggable rich-text-editor, and new templates sets feature that lets you choose a template set when you create a new blog.
I have done a quick review of MT Hacks plugins on MT 4.1, and most of them that worked under 4.0x also work fine under 4.1. However, several plugins will need to be updated before they are fully functionally under 4.1. These include:
- Visitor Stats - If you upgrade to 4.1 now, the plugin will continue to tracks stats, but the dashboard graphs won't show, and there may be a few other admin interface oddities. An upcoming version will address these.
- User Profiles - Some user interface elements won't appear properly. Also, MT 4.1 comes with user photos as a core feature, so an upcoming version of User Profiles will migrate your profile photos to use the 4.1 system.
Fast Search - Fast Search may work fine under many cases in 4.1, but in some cases a "division by zero" error will occur, caused by changes made in 4.1. This will be addressed in an upcoming version.Get the Update Here.- Dynamic Menus - Needs to be updated to work with 4.1.
- Breadcrumbs - On most screens, it is okay, but in some cases, a little wacky.
There may be others, I haven't tested everything yet. If you are brave enough to upgrade to 4.1 right away, please reply to this entry with any issues or strangeness that you encounter with my plugins.
As MySQL Manual Says Query Cache works with transactions with Innodb tables but it does not tell you how and with which restrictions.
According to my tests it works but it is very restricted and one could expect it to work much better:
The result set can be retrieved from query cache (for statements both inside and outside of transactions) until there is a statement inside transactions which modifies the table. As soon as table is modified in transaction it becomes uncachable by query cache until that transaction is committed. Not only query cache can’t be used inside the same transaction which modified data but also in other concurrent transactions which do not even see the changes done yet
Of course such implementation is rather restricted. Queries outside of transactions well could use query cache until it is invalidated by committed transaction, however it was probably too hard to implement using current query cache infrastructure. With current approach Innodb can probably do something as simple as marking table “uncachable” if it has any uncommitted changed which would take care about all complicated aspects of change visibility in different transaction modes.
In most cases this limitation should not cause many problems (compared to general coarse table base invalidation it does) - only in case of long uncommitted transactions you will get data being uncachable for concurrent workload for a long time.
Entry posted by peter | No comment
谷歌上升最快的搜索词是:
1 、陈冠希
2 、陈冠希 阿娇
3 、阿娇
4 、陈冠希图片
5 、越狱第三季...
6 、钟欣桐
在百度上,上升最快的搜索词排行里,陈冠希钟欣桐名列第九。
因此:百度更懂中文,但是谷歌更加八卦。从另外一个方面说,百度太过干净了一点,所以人们只能用Google去搜。看来,八卦也是网络的第一生产力。不过,不用那么辛苦地搜了,你们的搜索技术太烂,有人早就整理好了:
http://lovemaoer.meeli.cn/blog/26717
http://hezhiwu.meeli.cn/blog/26883
明星也过性生活,大家至于一副没看过毛片的样子么?
原文作者:Josh Catone
原文链接:Consumer Apps: 2007 Year in Review
译者:jiangyh
网络应用:2007年度回顾
“网络应用”是一个深究起来相当宽泛的话题,因此试图将世界上所有网络应用所经历的事情都一一加以详述是没有必要的。我们将集中探讨两个领域,而这或许已经成为在我们日常生活的全程中影响最为重大的两个方面——即社会交际网络与个人网络发布。
在过去的一年中,这些领域都已各自催生了一些具有创新意识、引领行业标准的公司。在社会交际网络方面,Fackbook是其中的杰出代表;在个人网络发布方面,则是Twitter独占鳌头。必须承认,再也列举不出另外两家公司,在用户产品领域能够达到Facebook与Twitter二者这样的影响力。这就是他们今年分别拿下读写网(ReadWriteWeb, RWW)[1]评选的年度“最佳大型互联网公司(Best Web BigCo)”与“最佳小型互联网公司(Best Web LittleCo)”的一个重要原因。
社会交际网络
社会交际网络在过去的数年中已经成为了头条新闻。2005年,新闻集团(News Corporation)旗下的福克斯互动媒体(Fox Interactive Media)以5.8亿美元的高价收购了MySpace网站,这在网络社交领域引起了极大的轰动效应。然而,尽管MySpace网站至今仍然是互联网上最大的社交网络,但自去年秋Facebook面向大学生群体以外的受众开放并成其主力军以后,Facebook这一新世代的社区夺走了MySpace的不少风头。对于Facebook来说,2007年是如此美好的一年,其间它也尽了很大的努力来推动整个网络交际社区与市场的进步。
根据Compete(网络点击统计)结果,可以看出MySpace网站在这一年中网络交际水平的下降,然而与此同时,Facebook月度净访问量一路以高达111%的比率持续上扬(至于Facebook网站总访问量的增长也是类似的)。据报道称,Facebook的搜索量已基本赶上其竞争对手MySpace,并将在年底实现反超。

那么Facebook这样惊人增长的关键在于何者呢?在某种意义上,也许应当归功于其于5月份刚刚开放的用户平台。这个用户平台使得各外来公司能被Facebook庞大的用户基础所吸引。几乎在平台公开的同时,就开始传来Facebook成功的消息。正如iLike这些快速成功的案例一样,其用户数量在平台开放的头10个小时达到1万人次,并在首两个月上涨到近500万人次。
如今,Facebook的开发平台上拥有超过10万名网络应用程序的开发人员,并且其超过85%的用户都参加了至少一项的增值服务。Facebook用户平台初创的成功,迫使其他的社交网络重新思考自身的用户平台战略。一时间飞短流长、消息盛行。首先,是LinkedIn打造的新平台(最终取得了不错的效果)。其次,就是MySpace的逆转。最后,影响最为深远的,就是世界第二大最有价值的科技公司,宣布了他们将与Facebook的用户平台进行抗衡的发展计划。
Google的OpenSocial[2]正式上线的11月份,也正是Facebook的竞争者们竞相露面并结为联盟的时候——Ning,LinkedIn,Hi5,Friendster,orkut,bebo,以及他们的共同龙头老大MySpace。然而,这些结盟网站依然我行我素地创建各自的用户平台,这表明Google的倡议迄今仍未能收到任何有意义的成效。在上周Facebook宣布将开放其平台架构时,也许正意味着Facebook已经笑到了最后。那么Facebook的第一个合作伙伴是谁呢?正是OpenSocial的结盟者之一bebo。
2007年度的Facebook的影响力,甚至使得微软公司(Microsoft)以达2.4亿美元的协议金额参股其约1.6%的股权(微软亦借此正式介入网络社交市场)。这项大型收购一方面预测了Facebook的估价的极致,也保证了其与诸如Google、MySpace这样的竞争对手相抗衡的资金来源。
但对Facebook而言,并非一切都是一帆风顺的。继上个月一项颇具争议的新广告系统的推出以来,Facebook就面临着从舆论媒体到消费者权益保护团体MoveOn.org的谴责与抗议。Danah Boyd注意到,尽管Facebook看上去将问题的重心转移到用致歉与改换政策上,并宣称将休养生息,然而这已经是近年来Facebook第三次对隐私政策作出改弦更张。她认为,Facebook正在走一条“滑坡式”的软式发展道路,而这很可能是用户们所无法继续接受的。
展望2008年,社会交际网络将继续在我们的生活中扮演着重要角色;同时,酝酿于Facebook与Google(以及其他网络)之间的用户平台之战也将愈演愈烈。
个人网络发布
在这一年中,网络用户应用的另一个广泛应用的领域即是个人网络发布,也具有着深远的影响。其中,没有哪个公司的冲击力能超过我们的年度最佳小型互联网公司——Twitter。
Twitter作为“微博客(microblogging)”领域的开创者之一,正如Alex Iskold最近撰文所指出,它是为沟通个人博客与社交网络之间关联而出现的一个自然的演化。自去年3月的SXSW[3]会议上Twitter被加速推出以来,它已经愈来愈成为一种典型现象。事实上,人们甚至在讨论“Twitter语录(Twitterdiction)”来记录用户对这一网站的非凡体验。
正如我们在推举Twitter当选年度最佳小型互联网公司的荐词中所说,Twitter真正“通过充分利用想象力以脱颖而出,开辟了一种新型的混合模式,糅合了聊天、社交网络与博客”。但也许在Twitter之外最为有意思的事,更在于它是如何推动了一种新型个人网络发布模式的形成。
关于微博客(microblogging)应用的问题,或许人们讨论得最多的,除了Twitter(其中有些内容也许不能归为微博客应用这一类,但我们姑且不予考虑)之外,恐怕就是Tumblr了。Tumblr沿用了传统博客的形式,并将其演变成一种意识流式的琐碎叙述,日志短小精悍、触发点十分随意——可以是一幅照片、一段视频、一节引言、一条链接甚至一个闪念。尽管Tumblr不是基于Twitter开发的(它是基于“Tumblelogs”的,譬如projectionist或Anarchaia),然而Twitter的成功则为实现更多微博客应用程序的发展提供了通途。
这些应用工具之所以重要,是因为他们非常快速、便捷。在Tumblr与Twitter这些微博客(microblogging)应用的推动下,个人网络发布逐渐发展为主流,这种推动方式可能是过去从未出现过的。虽然争议仍然存在,但据Forrester(著名市场研究机构)的调查报告指出,美国成人中有6%的人日常使用Twitter。对这样一个新兴(亦处于学习曲线的“习得”阶段)的网站而言,这已经是非常了不起的了。
那么,这样一种新形式的个人网络发布到底会有多重要呢?它重要到使Google在10月份投资一个未知数目的金额,收购了Twitter的竞争对手Jaiku。
其他
Facebook与Twitter并非这一年中网络用户应用方面所发生的仅有之事,而仅仅只是其中最具冲击力与影响力的一部分而已。
网络电视 (IPTV) : 这一年中,另一个最令人期待也论及初创的则是Joost,创立者为Janus Friis与Niklas Zennstrom(如你所知,他们分别来自Kazaa与Skpye)。Joost提供网络电视(IPTV)服务,通过流媒体传输,并使用点对点(P2P)技术来实现网络电视点播。尽管他们已经与许多重要的公司签署了合约,包括成人游泳(Adult Swim)、华纳唱片(Warner Bros. Records)、国家篮球协会(National Basketball Association)与CNN等,然而仍Joost尚未真正成为主流关注的重心。假如您想了解关于Joost的完整介绍,其中还将其与竞争对手Bebelgum与Zattoo作了比较,请阅读此文《2007网络电视回顾 (RWW网站)》。
政治 : 同样是在2007年,Web 2.0开始在美国总统竞选方面发挥巨大作用。继Haward Dean在2004年创造性地使用博客与Meetup.com网站来发动基层支持的尝试以来,今年的候选人充分利用网络用户应用的情况是前所未有的。努力让社交网站的页面顶端展现着自己的简介,这简直成为一种被迫的事——几乎每一个大党的候选人都在MySpace与Facebook网站上有“根据地”,有些也利用了LinkedIn、Twitter与网络应用。YouTube举办了候选人关于CNN的辩论赛,而MySpace则记录下了他们的辩论对话集。一些候选人甚至在UStream上发布现场演说视频(譬如Dannis Kucinich与Chiris Dodd)。对2008年来说,用户网络应用在美国政治上的作用只可能变得更为炙手可热,以便让这些网络应用将总统竞选活动遍及更多的主体美国人,并将其开展得更好。
网上办公(Web Office) : 2007年另一个用户应用的热点领域是网上办公(Web Office)。鉴于Richard MacManus已经对整个市场作了详尽的年终总结陈述,因此我将在此仅作简要的介绍。随着网上办公套件(online office suites)的逐渐完备,尤其是Google Apps与Zoho,另外微软也终于开始露出涉足网上办公的端倪,说明网上办公正在成为一个十分热门的行业。虽然说网上办公的企业版在实际运用中还需要继续对其改进,然而当前的办公产品对家庭使用来说已经是足够了。用户已经能够获得相当稳定、可靠的在线文字处理、电子表格、演示与电子邮件的应用。为获得更详细的信息,您不妨阅读Richard的总结中对这一年中网上办公概貌的叙述。
iPhone手机 : 最后,我将借此机会提一提苹果公司的iPhone手机。苹果公司今年没有其他产品推出,这已经足够激起新闻界与公众对iPhone的好奇心与想象力。苹果iPhone手机有成为一款拥有可变插件的工具的潜力,这促使其他的移动设备制造商在手机功能上寻求一个新的飞跃。苹果iPhone手机能够达到最大影响的理由之一,在于其通过移动网络,实现了将整个互联网优雅地容于手掌之中。请不妨阅读Alex Iskold所写的《我喜爱iPhone的十大理由》,以及其后续的《对iPhone手机的十大期望》。

您的意见
您认为2007年度最具影响力的用户应用是什么呢?
您认为哪些服务或产品您认为应当给予重视的,但在我们的总结中却没有被提及(一定有非常多)呢?
您认为2008年可能会出现什么样的大趋势呢?
请在评论区留下您的真知灼见吧。
【译注】
[1] ReadWriteWeb, RWW: 世界著名的互联网技术评论网站。每年都将评选年度“最佳大型互联网公司(Best BigCo)”、“最佳小型互联网公司(Best LittleCo)”与来年“最具潜力互联网公司(Most Promising Web Company)(2008年的评选对象由公司变为活动)”,至今已是延续了四年的传统。
- 附:
2004年度Best LittleCo为Ludicorp(当今Flickr之缔造者),2005 Most Promising为FeedBurner;
2005年度Best BigCo为Yahoo!,Best LittleCo为37Signals,2006 Most Promising为Memeorandum(当今Techmeme之前身);
2006年度Best BigCo为Google,Best LittleCo为YouTube,2007 Most Promising为Sharpcast;
2007年度Best BigCo为Facebook,Best LittleCo为Twitter,2008 Most Promising为open source movement(开源活动)。
[2] OpenSocial: Google领衔的一个公司联盟并推出的一个通用标准集,允许开发者为Google旗下巴西社交网站orkut,以及其它多家社交网站(譬如文中提及的Ning, LinkedIn, Hi5等)开发应用。美国第一大社交网站MySpace已经明确表示支持OpenSocial,第二大社交网站Facebook的态度尚不明朗。今年5月,Facebook已经推出了自己的Facebook平台,并借此吸引了更多用户。在Google新推出的OpenSocial网站上,包括完整的OpenSocial API文档、FAQ、以及开发者论坛等。
[3] SxSW: South by South West Music, Film and Interactive Conferences and Festivals(音乐、电影、互动盛会)。指在美国德克萨斯州州府奥斯汀每年春天举办的音乐节,举办时也有电影展和其他文化活动,是美国最大的音乐节之一,首届举办于1987年。South by Southwest原意指西南偏南,即西南(离南方45度角)和南的中线,离南方22.5度角。奥斯汀是美国乡村音乐的中心之一,这也是奥斯汀相对美国东北部的政治、文化中心的方位。
我得事先说明一下,没成想,这两个多月来发生的各种稀奇古怪的事情,比我3年来经历的还要多,有相当一大部分是不足为外人道的,由此,我征用了程苓峰同志的一句名言:不折腾,不足以晓人生。
相对最近的一件事情是这样的:“响一下就挂”蔓延到固话 网通7秒收280块。
一位姓金的网通用户向网易科技表示,称公司电话被“响一声就挂”电话诈骗,电话号码为“96229***”,仅七秒钟通话话费高达280元。
是的,我承认,这个新闻的主角是我。
我得说,得到公司技术部通知的时候,我并不意外,之前做好了这样的准备,只是没想到金额这样巨大而已,在我如今还没有弄清对方身份的情况下,我已经付出了280元的代价。这种感觉,无异于在大街上被人用残暴的方式打劫,而且是闷棍式的打劫。最可怕的是,这段道路的所有方最后还和抢劫者进行了分成。
我很悲凉地在广州拨通了北京网通的客服电话,客服小姐用强压住笑意的标准式回答打发了我:7天后会给你一个答复。so,1月23日至今已经过去6日,不知道网通的客服人员是否也被罕见的暴雪阻滞。
律师给我的建议是让公司给予我财产授权,我可以以个人身份起诉网通,因为我作为一名客户,无需知晓这个“96229***”的电话号码究竟是否属于所谓语音号码,在我未知情的情况下被扣巨额话费,网通作为参与分成的运营商也可被列为被告,至于网通和这家SP之后的纠葛,并不影响我的诉讼。
律师建议我一定要把这事弄个水落石出,最近有太多人受害。
作为一个受害者,我期望网通能够在承诺的最后一天给我一个解决方案,我会在博客里公开以供同样的受害者予以参考,也会考虑让网易科技做成新闻,传递给更多的受害者与潜在受害者。
NOKIA 买了 Trolltech,Microsoft 可能要 Logitech。
The acquisition of Trolltech will enable Nokia to accelerate its cross-platform software strategy for mobile devices and desktop applications, and develop its Internet services business.
在 FAQ 里:
Why does Nokia acquire Trolltech?
- The key driver for Nokia in this acquisition is cross-platform development.
- Trolltech’s technology will enable Nokia and third parties to develop software across platforms easier and more cost effectively; this speeds up innovation and brings new experiences to Nokia’s device portfolio and onto PCs.
Qt 以及 Qtopia 确实不错,可以帮助一个有远大志向的 Nokia 甚至是 Nckia 想前迈进一大步……不过,这个…… Internet services 是哪档子事儿?雄心勃勃的 Nokia 最近表现活跃,具体怎么做,等着看。
在多年的坚持—-如果不是挣扎的话—- Trolltech 和 MySql 差不多,都卖了豪门,终究找到了一个安心不疲惫的归宿,莫非这也是解释为什么张敏周慧敏(如果没有毛阿敏的话)嫁给什么人的原因?总的来说,Nokia 还算靠谱的主儿,在主观意愿和客观能力上应该会给 Trolltech 更好的发展机会,这对所有 Trolltech 产品和技术的使用者来说,是个好消息,无论是公司,开发者,社区还是最终用户都有正面的预期和光明的前景。如果碰上 ICQ 卖给 AOL 那样的场景,咱还是洗洗睡了好了。
Microsoft 的盈利在一片唱衰声中继续高奏凯歌,这点我十分中意 feng兄 的 专业与假装专业 的说法,唱衰声中最活跃的那些是什么深浅好像也很明显。不缺金元的 Microsoft 被传言有意收购 Logitech,当然不是为了多卖几个鼠标,该是在 XBOX,Media Center,Surface 等等产品/技术打造消费电子产品时用得上。
最后给个建议,做 start up 而且想以最终卖掉为目标的哥们,记得把公司名字带个 XX Tech 哟,最近贼吃香。
microsoft, nokia, qt, qtopia, Technology, trolltechLet me ask all of you something.
WHY DO PEOPLE DO THIS, WHY IS THIS DONE, WHAT IS THE LOGIC, THE POINT, THE THOUGHT, THE REASONING:
6 WHEN OTHERS THEN
7 RAISE_APPLICATION_ERROR(-20001,'Following Error Occured:'
||SQLERRM);
why??? I don't get it. Is it because
a) you don't want to know what line really caused the error?
b) you get paid by the number of lines of code you write?
c) you want to spend lots of time looking up the actual error code the you just lost?
Why is it that everyone seems to feel "I must catch all exceptions". I cannot understand this, I do not see the point, I only see this doing HARM, never any good. Why take a perfectly good error code/message and totally destroy it?
This goes to people that turn exceptions into "return codes", masking the error, why???
作者:AnySQL, 发布在anysql.net, 订阅AnySQL, 原创工具及Oracle技术服务
SCode是一个非常有名的MT防垃圾留言插件, 在安装这个插件时, 需要对SCode.pm代码行修改, 指定一个临时路径的位置.
# tmp directory
# Notice the '/' at the end . You need to have that '/'
# ie, my $tmpdir = "/tmp' wont work. You need '/tmp/'
my $tmpdir = "/tmp/";
这给安装造成了一定的麻烦, 其实我们只要在SCode.pm中加入如下几行代码.
sub init {
my $app = shift;
$tmpdir = $app->config('TempDir')."/";
$app;
}
再在mt-config.cgi中加入一行指定临时目录位置.
#Temp dir for MT and SCode
TempDir /home/username/temp
这样就不需要去修改SCode.pm文件了.
相关文章 | Related Artiles
我要留言(当前0)
作者:Fenng 发布在 dbanotes.net. 订阅 DBA notes
“跃迁”这个词借鉴自阿西莫夫的机器人系列故事。类似一个世界向另一个世界的瞬间移动,具体怎么移动的,阿西莫夫一语带过,类似古龙的小李飞刀,如何之快你也不知道--扯远了,扯回来:最近越来越觉得(我实在有些后知后觉)桌面工具与客户端工具被淘汰的趋势已经不可逆转,用户习惯慢慢转向并会习惯 Web 应用。
举几个例子:
- Outlook --> Gmail
- Booksmarks-->del.icio.us
- FeedDemon / GreatNews-->Google Reader
- MS Office --> Zoho Suite / Google Docs
- Media Player --> YouTube
这个名单还可以拉得很长。把计算能力和存储能力交给“大计算机”来做,而浏览器(或提供同样功能的软件)作为 "元(Meta)工具" 将会长时间存在。
用户习惯一旦发生改变,再想逆转怕是不现实的事情。上大学的时候,没事的时候就去电脑城买 D 版软件光盘,那时候信息的载体很大一部分是通过 CD 走的,现在,还会有大学生去买电脑城的盗版软件么? 或许有,但会极少。单机版游戏盛行的时候,网络游戏虽然也有(如 Mud),但毕竟是小众,现在呢,守着单机版游戏的玩家怕是太少了。这个“迁移”一旦发生,几乎就不可能有回头路。当初有多少 FeedDemon D 版的死忠用户,可现在习惯了 Google Reader 的我们即使 FeedDemon 免费了也不愿意再次使用它了。
记得有段时间在讨论 Web OS ,可能是长时间没见到比较接近的产品,大家的兴趣又减退了。或许将来,世界只需要五台超级计算机。一旦我们把习惯切换过去,还会再回来么?
微软的 Live.Com 没什么起色,而 Google 在这方面已经走的很远了。绕来绕去,好像又绕到 SaaS 上去了,但其实我没扯那么远。
--EOF--
相关文章|Related Articles
评论数量(8)|Add Comments
本文网址:http://www.dbanotes.net/review/desktop_app_migration_to_web.html
最近作者还说了什么? Follow Twitter / Fenng
作者:AnySQL, 发布在anysql.net, 订阅AnySQL, 原创工具及Oracle技术服务
建站这么久了, 一直都没有什么垃级留言, 直到一个月以前. 这段时间平均一天有5个垃圾留言混进来, 当然是件好事了, 没有访问肯定没有垃圾留言, 少量人访问也没有垃圾留言, 除非不设防, 垃圾留言的增加表示访问量的上升, 当前的防垃圾留言是改进过的SCode插件, 从目前的状况看来, 还可以接受, 不需要再进行什么高深的设防技术.
拥有一个轻量级防垃级留言技术, 还是很重要的, 可惜不是在自已独立的服务器上的, 要不然可以用Memcached软件缓存一下SCode的大量图形小文件. 作为DBA有时对其他方面地行一下调优也是一件很趣的事.
不知道其他访问量很高的几个个人网站如(Fenng, CheDong, eygle等)每天的垃圾留言有多少?
相关文章 | Related Artiles
我要留言(当前0)
这篇 blog 的内容原本是去年 10 月写的,当时正在看《24小时反恐》,脑子里涌现出无数古怪的想法,觉得这个世界到处都是特工,什么通讯手段都不可靠。在我们还没有能力获得量子加密需要的硬件前,能有限依靠的恐怕只有数学能保证的加密技术。
当时那篇 blog 写了一大篇,自己都觉得太过于天马行空的乱扯,就没有公开。
不过今天开周会,我们又提到游戏 client 提交密码的安全性问题,指派了一个同事最近在这方面做些工作,这里也写点以前研究的东西,留点记录吧。
简单说,我们应该避免在一次登陆过程中从互联网连接中传递明文的用户名密码信息。这是一个起码的要求,但是我们以往的产品做的并不好。很多时候都是伪加密。就是 client 用个私有算法将密码信息编码后传送,再由 server 用相同的算法还原。
这个安全性极度依赖 client 的程序不被逆向工程。一旦有人完全逆向工程后,只需要他监听到通讯,就可以还原出用户的密码。
物理上防止通讯被监听的技术在可见的时间内几乎不可能被大众使用,我们现在即使能保证自己的 client 机器没有被人动过手脚,还是无法知道自己的通讯数据是否被监听。只能寄希望于数学的加密技术了。
SSL 就是干这个的,但是由于种种原因,暂时我们还不能在游戏 client/server 中推行使用。那么,现在是不是可以抽出一些东西来,自己先在程序中实现出来用着。其实,优先要做到的,无非是安全的让用户提交用户名密码而已。
最著名的算法某过于 RSA 。我想任何一个理工科跟计算机沾点边的大学生都应该了解那么一点。
知道 RSA 算法大约是在高考前夕。当时读到了 Gates 先生写的一本书《未来之路》。让我尤为感兴趣的是其中介绍的非对称公私匙加密算法。进了大学后,当拥有很多的时间时,我去校图书馆翻阅了一些论文,了解了最著名的 RSA 。
简单来说,RSA 算法可以看成一个带锁的箱子。只有箱子制造者可以打开这把锁。而箱子上有条缝,别人没有钥匙也可以往里面塞东西。
如果 A 和 B 想交换保密信息的话,那么由 A 做一个 RSA 箱子交给 B 。B 把东西塞进箱子送还给 A 。这时,A 就可以自己把箱子打开,拿到 B 给他的东西了。
RSA 的问题在于计算速度。RSA 需要做大数的幂运算,这需要消耗大量的计算资源。所以直接对信息做 RSA 加密不太适合高带宽的通讯。继续上面那个直观的比喻:RSA 固然是个不错的箱子,但无论是打开它还是向里面塞东西,都颇费周折。所以,作为 B ,通常是配一对普通锁的钥匙。把钥匙而不是东西本身塞进 RSA 箱子。然后再用轻巧(但同样坚固)的锁来运送货物。
现在的问题是,直接拿 RSA 来加密用户登陆信息是否合适?
看起来是满不错的,用户登陆无非一个用户名一个密码,符合上面轻巧的定义。如果我们不要求特别高的安全性是完全可行的。不过这里我们想讨论一下别的算法方案。
关于 RSA 的问题。
如果有足够的计算能力,和足够的时间,理论上我们可以从 RSA 的 public key 中提取出 private key 来。所以,基于 RSA 的加密系统都会在生成 key pair 时给它签上一个过期时间。
假设我们每次通讯都用 RSA 加密当次通讯用的随机 key ,再用这个随机 key 做传统对称加密(比如 DES),那么在一定时间内,这些通讯数据我们都可以认为是安全的。
可是,如果有不怀好意的人从一开始就监听了你的所有通讯数据流并记录下来会怎样?虽然他一开始并没有能力解密里面的数据,但是他可以昼夜不息的去分解那个大素数,直到有一天提取出你的 private key 为止。即使你在 key pairs 过期之前更换了新的钥匙,但是,你曾经的所有通讯数据都会在老的 key 被解密那天同时变成明文。
而且,如果你是用私人途径发布 public key 来防止恶意监听者拿到可供分析的材料。那么你用这个 key 次数越多就越容易暴露。
怎么办?如果想避免大量历史信息同时被解密,难道我们每隔几次通讯就换一对钥匙吗?RSA 的钥匙生成代价可是很大的。
伟大的数学家们自然有好方法来解决这个问题,其中最著名的某过于 Diffie Hellman 密匙交换协议。
简单说来 Diffie Hellman 协议可以干这么一件事:A 拿到一个神奇的 Diffie Hellman 箱子,随便找把锁(选择一个随机数)锁起来,发给 B 。这个箱子的神奇之处在于,一旦上两次锁,它内部的机关就会根据这两把锁在内部制造出一个随机的钥匙。只要每次上的锁不一样,制造出来的钥匙就不一样。当 B 收到这个箱子后,加上第二把锁。打开箱子,取到随机钥匙配上一把,然后把箱子送还给 A 。
这个时候,A 和 B 都是箱子的主人。而当 A 也打开箱子,就取到了 B 已有副本的那把钥匙。今后,A 和 B 就可以用这对相同的钥匙来加密传送信息了。
和 RSA 箱子不同,每个 RSA 箱子和锁是一体的。而 Diffie Hellman 箱子可以配许多把普通的锁。每一个独特的 Diffie Hellman 箱子的制造成本虽然相对比较高(要生成素数的原根还是很麻烦的)。但因为锁上它的锁成本却很低。每次 A 和 B 想交换钥匙,都可以换新的锁。这样,每次通讯都可以看成是独立的,一组通讯被破解,并不影响其它通讯的安全性。只是 RSA 箱子虽然繁杂,理论上却可以装任何东西。Diffie Hellman 箱子固然神奇,但它却放不了指定的物品,只能自己生成钥匙罢了。
btw, 以上的比喻只是方便理解,可能并不太准确。有兴趣想了解的朋友可以自己去 google 资料。
我们很容易想到, Diffie Hellman 协议也有天生的缺陷。随机生成的密码不能携带双方的身份信息(因为不能人为指定)。这样容易被中间人攻击。如果需要,我们就得进一步改进它。联合使用 DH 和 RSA 可能是个好主意,今天就不展开讨论了。也有对 DH 改进的协议如 OAKLEY 协议 用来解决用户身份认证的问题。
前两年刚玩 palm 手机时有个有趣的想法,就是做一个加密短信发送软件。不用太复杂,用类似 DES 的对称加密算法就可以了。如果两个朋友有见面的机会,用红外传输约定一个密钥,以后可以用这个密钥加密发送短信。由于密钥没通过无线网络传输,仅限于面对面红外约定,我们可以认为密码交换是安全的。
如果简单的每次都用那个约定的密钥加密,一旦有一天有一方的手机本身落入“老大哥”手里,那么由于以前所有的加密通讯都可能被记录,也就意味着所有以往的秘密都被公开了。这对另一方非常不利。
我想了个简单的方法避免陷入这种尴尬的局面。那就是每次加密短信发完后,都将密钥 hash ( md5 ) 一次生成下一个版本。发送加密短信时,将密钥版本号明文附在信息前面,防止中途丢失信息导致的密钥不同步。由于 hash 函数的不可逆性,我们就可以建立起一个有相对隐私的 p2p 短信平台了 :)
This weekend we’re hearing great news from Michael “Monty” Widenius - one of the Fathers of MySQL. Monty finally found a time to create his own blog with very descriptive name Monty Says. At the same time Monty finally announces Maria - the MyISAM successor storage engine he has been working for last few years. You can now get Maria from MySQL BitKeeper Server.
I’m really excited to see Monty speaking publicly again in the free form rather than in form of sanitized interviews and press releases we’ve seen during recent years.
I’m also excited to see Monty finally releasing his new brainchild and putting his personal commitment behind it: “NOTE: The opinions and promises stated in this FAQ is by the Maria development team and not promises by MySQL AB.” I guess this means Monty will now have more time to do coding and helping people with Maria problems - things he was also great with.
It is still unclear how Maria will be integrated with MySQL (what version, which conditions etc) but honestly I do not really care. I can trust code from Monty (when he will call it stable) and as soon as Pluggable Storage Engine API works well it should not require any official support to work well.
Monty has serious plans and long road map with Maria. Initial version has two main benefits compared to MyISAM - it has page cache for rows (meaning no OS calls will be required to fetch/modify row data) which can dramatically improve performance for certain on disk temporary tables (both implicit and explicit) and it will be (optionally) crash safe, meaning you will not have to deal with partially executed statements or check and repair tables in case of crash which can be showstoppers for many applications when MyISAM would be sufficient otherwise.
But this is only first version - further version to include full transactional storage engine with MVCC and row level locks functionally close to Innodb or Falcon. Though many internal architecture decisions are different from either.
What I also like about Maria is - it gets tools to check and repair tables from the very first versions as well as has tables movable between the nodes one by one. This functionality is may be not in line with serious traditional DBMS thinking when data in theory never is corrupted and database maintains consistency between tables so you should not be moving them around in binary format but it is often so convenient in practice.
I will not say anything about performance of Maria because performance is not the main goal of this release and Monty tells me there are a lot of things which are not optimized yet. Some of these will be quite soon others will be fixed in one of the next Maria versions.
We’ve been testing Maria for a few weeks now and should warn you it is still Alpha software - we’re finding bugs and Monty and team fix them promptly. The passion and speed of bug fixes however makes me think it will be stabilizing rapidly, and the best thing you can do to speed up this process is download maria and give it a try on your workload.
It is also worth to note number of links Monty mentions in his announcement still do not work - it takes time MySQL to update documentation and make worklog entries publicly visible, but at least we have the the sources available now.
In general MySQL seems to keep low profile about Maria (there was almost no mentions on conferences in articles etc even though it was in works for almost 2 years) I guess there are some marketing reasons for that - with Falcon being storage engine of focus for last couple of years MySQL probably does not want distractions. Not to mention showing there is at large extent similar storage engine in works would leave impression as there is a chance Falcon would fail and never deliver its promises (so there is backup) or turn not to be transactional storage engine of choice for future MySQL.
Again, Congratulations Monty, these are both great news !
UPDATE: I now see some binaries are made available, some Maria Documentation is also now available at MySQL Forge.
Entry posted by peter | 2 comments
今天在 popo 上有则可笑的消息传播开,居然连刚离开公司的同事们也将信将疑。鉴于过往的一些事情,我想对于澄清谣言还是及早做点贡献比较好。
关于今天坊间盛传的“传网易人事变动:丁磊将亲掌游戏业务”这则新闻,提到 dingdang 将离职的消息,完全是一则谣言。
圈内的朋友也不要再来向我求证了。我这人从来凭内心说话,大家可以不认同我的观点不相信我的判断,但绝对值得相信我这个人。至于散布谣言的所谓“知情人士”是何居心,这里就不妄加揣测了。
dingdang 可以说是网易游戏部门的灵魂人物,也是许多人的精神支柱。他的贡献和付出所有网易人有目共睹,我相信绝大多数人是认可的。即使有人不认可他的工作和做法,但绝对认可这个人。
我跟 dingdang 有相当不错的私交。他在交接工作的前不久,也就是不到一个月前,专程来我这里。我请他吃饭喝咖啡,两人长聊了一个晚上。我想我了解他的想法,也理解他为什么这次脱离游戏部门的最高管理岗位。这里有很复杂的因素在里面,我想不是三言两语可以解释清楚的。也不必在公开场合多解释了。
凯洛除了“中文Twitter女王”的称号在顶,她已经变成了两岸部落格文化的交流桥梁,在新年前台湾广为收听的“网路大顽家”广播节目(也有很多中国大陆听众覆盖)。凯洛的采访分为两部分,第一部分凯洛分享了她参加几次网志年会的体会和感触,以及如何从一个观众变成一个演讲者。
第二部分是她透过几年的观察和交流,借助Blog这个特别的对话平台,发现到中国大陆和台湾的网络用户在行为、思维方式等方面的差异。这些不同实际上就是差异中的类似性,也就是借助分享主义行为,人人都可以成为有个性的交流者,也变成全球新文化模式的参与者。
近段时间中国中南部从贵州到安徽遭遇严重雪灾,我所在的湖南是受灾最严重的省份之一,不写一点东西不行。
1、这里的气温和北方比不算低,大概-4℃左右。但一来南方很少有暖气供应,二来下的不是大雪而是雪籽、小雪、夹杂冻雨,落地成冰,三是湿气极重,湿冷渗入骨髓,非常难受。我的房间开着空调,玻璃窗内侧都可以结冰…
2、交通全面中断。这个大家都知道了。
对外的高速公路全部封路,撒盐和铲雪也无法完全解决冰冻,因为一转眼马上又冻上了。许多乘坐汽车回家的人,尤其是学生和民工,被困在路上无法动弹,缺水缺粮缺医受寒。
市内部分高架桥和河流桥梁禁止通行,怕负重超限。部分公交车还在运营,其中有的不得不改道行驶,被绕过的地区如四方坪,人们上班要在寒风中等几个小时才能看到来车。有的公交车车门被冻住,乘客上下车需要自己动手。的士很难打到,尤其是靠近城郊的地区。
由于缺电,京广线长沙段停运,大量旅客滞留(目前大概是1.3万,高峰时期6万。但广州至今滞留的30万人,许多都是要回湖南的民工)。我家位于车站以北的铁路附近,从昨天断断续续观察的情况看,维修车来回的次数很频繁,全天只看到过一列由北向南的列车经过。
飞机因为机身结冰,机场也是大部分时间关闭,滞留的乘客也有不少。
因为地面冰冻,出行非常不便。据说有老人家摔倒时后脑着地当场死了。水管爆裂加上冰冻也让人不得不绕道,据说家乐福门口就成了一片汪洋。
冰冻第一天我不怕死去上班,如果不是有拐杖早就摔倒了,其他的同事有几个都摔跤了。因为不敢走结冰的人行天桥,只好提前一站下车。下车一看倒抽一口凉气,一路上全部是冰层,真正是“如履薄冰”啊。走到一半的距离我就没有信心了,因为整个人都往地势较低的地方滑,拐杖稍微倾斜一点就会溜走。好不容易到了公司,又担心晚上走的时候没有公交车和地面冰冻更加严重,于是在中午的时候趁着冰面融化了一点赶紧逃窜回去了。走的时候还看到侧门有近10辆汽车相撞…
3、大面积停电。
上周开始电塔电线因为冰冻而损坏,三峡的电无法输送到湖南,湖南益阳的电力也无法正常输出,煤矿也因为大雪封山运输困难,于是开始分批分区停电。
火车停运主要就是因为断电,郴州电台和电视台前几天也被迫停止播出了。
昨天家里第一次遇到停电,一停就是将近24个小时,只好站在窗户边看外面的路灯,一边用 MP3外放听歌(收音机都坏掉了)一边 Twitter,要么就是读书、念书,总算离原始社会还有那么一点距离。

素来怕冷的我冻得手脚冰凉,膝盖以下更是阵阵生疼,好在煤气还没有断,自来水也在中午恢复了,于是每隔一段时间烧开水倒在密封杯里面当热水袋用。
因为停电,这篇文章也是到现在才写出来,还好我有随时保存和自动保存的好习惯——但如果频繁停电造成硬盘损坏…
4、物资紧缺目前在大城市不明显,超市还是有不少存货的,政府的后备物资供应做得不错。
不过价格还是有上涨,大蒜到了14元/斤,茄子2元多/斤,小菜普遍2元以上,只有芽白在2元以下。
最苦的就是滞留在车站和路上的人们了,总担心有人就这么在饥寒交迫中死了。
5、交通、电力、自来水、电信、消防、急救等各方面都很紧张。
湖南已经有3名电力工人在维修时牺牲。
停电往往停一整天,半夜的时候许多人已经上床睡觉了,这个时候来电,最容易因为一些电器没关造成火灾。
6、有时候会想象如果开始打仗(比如东南地区)会怎样?但愿我是杞人忧天吧…
大量东南地区的人会往内陆逃难——也许比春运的流量还恐怖;
因为遭受敌人对后方的袭击,交通设施,尤其是重要桥梁、铁路、公路被切断,部分人口稠密的城市水、电、粮食、汽油的供应被切断或短缺——范围广度或许和目前受灾省份差不多,延续时间可能更长;
通讯设施必然优先遭到打击——比目前电信、广播、电视遭受的天气影响要严重得多;
堤坝遭受攻击引起的水灾、轰炸和导弹袭击引起的火灾随时可能发生——抢险的压力会比现在大百倍;
大量的死亡引起疫病流行——目前的雪灾中我们还没有经受这方面的考验;
近期的股价震荡、近年来的 CPI 飞升、房价居高不下等等问题,和战时的经济动不动就面临崩溃边缘相比,更是小巫见大巫;
…
我们在这次天灾时的紧急应变能力表现得如何?我们到时候又是否有应付的能力?
虽然我认为近期没有打仗的可能性,但如果真的发生了,希望在此之前的决策时能够多想想后果,以天灾为鉴,可知人祸之惨烈,不要到时候把无辜的人丢在战争的洪流中任其自生自灭。
其他照片:
在和菜头那里看到,新华网采用的这张照片照得真好!

5条回复 | Trackback | Feed | Talk | Twitter | Flickr | 豆瓣 | 邮件联系 | 创作共用协议
As you might know even if you're only using Innodb tables your replication is not completely crash safe - if Slave MySQL Server crashes/power goes down it is likely for relay logs to run out of sync (they are not synced to the disk) plus position on the master which slave remembers becomes stale.
During MySQL 4.0 and 4.1 series there was a great workaround if you're using only Innodb tables - Innodb when Innodb does crash recovery it would print position in master log files up to which replication was done:
-
InnoDB: IN a MySQL replication slave the last master binlog file
-
InnoDB: position 0 115, file name portland-bin.001717
All you needed to do is to use --skip-slave-start on the slave server and have a little script which will do CHANGE MASTER TO to specified location to restore replication in case of crash (assuming you're only using Innodb tables of course)
Another way this functionality was usable is cloning Slave->Slave by use of LVM without pausing replication (so you can get consistent master position).
It is all great but it does not work any more in MySQL 5.0 Baron has spotted it by incident when we were verifying some of examples for High Performance MySQL book.
In the bug Heikki explains the code was probably removed in MySQL 5.0 during XA implementation though the code which prints the data back on recovery was not, so it prints you some log file name and position but they have nothing to do with real position on the master anymore.
I hope Innodb team will find a way to restore this functionality or at least remove confusing message which leaves impression this thing works.
Until this issue is fixed getting Crash Safe replication with MySQL is not impossible but surely more complicated and has much higher performance overhead - you can run slave with --sync-binlog and --log-slave-updates so you can see what last statement was executed before the crash and then find matching position in the master logs.
Interesting enough similar functionality is implemented in Mark Callaghan's patches if you use rpl_transaction_enabled=1
Note even though this functionality is currently broken other somewhat similar functionality works as expected.
Innodb during recovery also prints position in the MySQL binary log:
-
InnoDB: Last MySQL binlog file position 0 589600615, file name ./galax-bin.001376
This one is helpful in other cases - for example when you're taking LVM snapshot (for backup or to clone slave from the master) and can't do traditional and recommended way with FLUSH TABLES WITH READ LOCK for snapshot creation. This happens when you have large amount of tables or your load pattern is to cause unacceptable stall if this lock is used. You can just take LVM Snapshot (assuming you're only using Innodb tables and not touching your MyISAM system tables) and use this position to point to proper location on the master, or later use for point in time recovery using binary log.
Entry posted by peter | No comment
孩子没了!
老婆昨天几乎哭了一天。
现在她还在医院里,一个人。
一个可爱的生命,当我们已经开始喜欢他,并盼望他早日到来的时候,离我们远去。
我一阵阵的心痛。






收藏到QQ书签






