网址缩短服务
前一段时间帮一个朋友做了一个非常简单的网址缩短服务,已经上线运行了一段时间,这里把当时设计的一些想法分享出来,等有时间我会把代码也发布出来,程序很简单,用 web.py 做的。
共 4 篇文章。
前一段时间帮一个朋友做了一个非常简单的网址缩短服务,已经上线运行了一段时间,这里把当时设计的一些想法分享出来,等有时间我会把代码也发布出来,程序很简单,用 web.py 做的。
First of all, thanks goes to all people who has helped me on this project, especially Pav (portmgr@) who gave it a twist on pointyhat.
It seems that this has taken me almost a month and 20 commits to get into the tree, after the code is ready. At the beginning, the changeset was ~200KB, and I believe it’s not good to just go ahead and commit it in one time, since it makes reviewing hard. Instead, I manually split it into smaller, functional related chunks, and commit it part-by-part.
最近在看 Berkeley DB,发现一套 FreeBSD 上没有的宏, CIRCLEQ_*。
看了一下,这组宏是来自 4.4BSD 的,因此 FreeBSD 曾经有过这个宏;后来, phk 在 2000 年 12 月 29 日从 FreeBSD 里面把它拿掉了(SVN revision 70469),当时的说明如下:
今天被一个程序折腾了很久。大致的流程是这样:
事件处理:
锁的机制没有大毛病,可是数据死活不对。