代码改变世界

Useful linux commands

2012-09-12 20:07 by 康杜, 157 阅读, 0 推荐, 收藏, 编辑
摘要:1. free file buffers in linuxfree -mecho 3 > /proc/sys/vm/drop_cachessync2. find files containing specific stringsfind . -exec grep -q mystring {} \; -print 阅读全文

关于HttpURLConnection的TCP连接

2012-09-03 19:43 by 康杜, 1670 阅读, 0 推荐, 收藏, 编辑
摘要:背景在工作中,我被问及一个问题CXF的WebClient是如何通过连接发送请求的,到最后引申为HttpURLConnection的TCP连接的重用问题。问题描述在一个线程中,多个方法调用HttpURLConnection conn = (HttpURLConnection) url.openConnection() 建立一次TCP连接还是多次TCP连接?具体点讲,如下代码中HttpClient有3个方法,每个都调用 HttpURLConnection conn = (HttpURLConnection) url.openConnection() ,那么一个线程调用method1, method 阅读全文

JDK 源码分析 Day 1

2012-08-29 16:30 by 康杜, 288 阅读, 0 推荐, 收藏, 编辑
摘要:开始学习JDK咯 阅读全文

一致性HASH算法

2012-08-27 13:43 by 康杜, 435 阅读, 0 推荐, 收藏, 编辑
摘要:在做大数据量的数据缓存,同时扩展性和可用性很重要的时候,一致性HASH算法是很有用的。原文“Thus, it is critical for our hash function to map items consistently: regardless of the existence of multiple, changing views of the system, each item should be mapped to only a small number of machines, and in such a way that all machines get roughly th 阅读全文

High Level Design

2012-08-24 10:48 by 康杜, 319 阅读, 0 推荐, 收藏, 编辑
摘要:High level software design, also called software architecture is the first step to analyze and consider all requirements for a software and attempt to define a structure which is able to fullfill them.see alsohttp://www.the-software-experts.de/e_dta-sw-design-high-level.htm 阅读全文

JVM的线程实现机制

2012-08-10 14:12 by 康杜, 2809 阅读, 0 推荐, 收藏, 编辑
摘要:绿色线程 JVM 线程实现机制 阅读全文

Unix I/O模型

2012-08-09 09:32 by 康杜, 207 阅读, 0 推荐, 收藏, 编辑
摘要:APUE上的I/O模型 阅读全文

Daemon什么意思

2012-07-31 20:29 by 康杜, 2111 阅读, 0 推荐, 收藏, 编辑
摘要:Daemon名称什么意思 阅读全文

自动化数据库更新

2012-03-13 13:23 by 康杜, 745 阅读, 1 推荐, 收藏, 编辑
摘要:简介 在我们的开发和运维过程中,通常会维护不同的数据库。由于在某个时间点,各个数据库的结构和状态是不一样的,所以我们开发人员需要在不同的数据库中运行相同的数据库脚本(SQL),比如我们修改了某个字段的长度并编写了一段SQL语句,我们需要在开发数据库、测试数据库、客户测试数据库、生产数据库中运行这段相同的SQL脚本。重复的工作不仅增加我们的工作量同时还增加我们出错的机会。 为了让我们的工作更加轻... 阅读全文

分层(Layers)

2012-03-02 16:47 by 康杜, 910 阅读, 0 推荐, 收藏, 编辑
摘要:在软件架构中,往往会涉及到分层这个概念。而每个架构师、开发人员心中,层的名称和含义也不相同。不仅仅是我们如此,就是业界的大师们也是如此。这不,在Martin Flower的《Patterns of Enterprise Application Architecture 》也列出这些不同分层。BrownCore J2EEMicrosoft DNAMarinescuNilssonPresentationClientPresentationPresentationConsumerController/mediatorPresentationBusinessApplicationConsumer he 阅读全文