在 TCP 通讯中主要有连接的建立数据的传输连接的关闭三个过程!每个过程完成不同的工作,而且序列号和确认号在每个过程中的变化都是不同的。

阅读全文 »

这里介绍下线程锁的各类。常见的有:互斥锁、自旋锁、读写锁和条件变量。

阅读全文 »

The actor model in computer science is a mathematical model of concurrent computation that treats actor as the universal primitive of concurrent computation. In response to a message it receives, an actor can: make local decisions, create more actors, send more messages, and determine how to respond to the next message received. Actors may modify their own private state, but can only affect each other indirectly through messaging (removing the need for lock-based synchronization).

阅读全文 »

之前写博客受制于编辑器的限制,版面经常脏、乱、差。自从用了markdown后,看见清新的版面,写文章的动力增加不了少。以下是一些版面美化的方法。

阅读全文 »

写程序时免不了遇到bug,而当bug发生以后,除了抓耳挠腮之外,一个常用的技术是单步调试。

阅读全文 »

一个Node.js进程就可以完成负载,但是随着后期访问量的加大,一个进程、一台服务器已经不能满足我们的需要了,这时Nginx就可以发挥自己反向代理的能力。我们可以在Nginx后端添加多个服务器或启动多个进程来分担访问压力。

阅读全文 »

用了Docker我们就可以更加专注地开发业务代码了,不用因安装环境而浪费时间。

阅读全文 »