Netty是一个高性能的异步事件驱动的网络应用框架,本质上是对NIO进行了高层的抽象,使得可以轻松的创建服务器和客户端,极大简化了诸如TCP和UDP套接字的操作。
[阅读更多...]I/O 即Input与Output,包含了文件的读写或者是网络的I/O。在Linux/Unix中有五种I/O模型:
- blocking I/O
- nonblocking I/O
- I/O multiplexing (select and poll)
- signal driven I/O (SIGIO)
- asynchronous I/O (the POSIX aio_functions)
Java 从Java SE 1.4开始引入NIO,在Java 7推出了NIO 2。那么,不同的IO模型之间具体有什么差异,又该如何使用呢? [阅读更多...]
Redis一个比较重要的应用场景就是分布式锁DLM (Distributed Lock Manager)。实际上已经有很多现成的redis库来完成这个功能了,但是可能实现途径有所差别,那么,正确的做法是什么呢?Redis官方建议了一个算法叫做Redlock
,可以将其作为起点去实现更复杂的方案,来研究一下它的思路。
Accroding to the mysql manual, the binary log( also known as binlog) is a very powerful feature that enables the recording of "events" that describe database changes. Those changes could be table modification or data change, and may also contain some statements which may potentially made changes such as DELETE
which no matched items.
This kind of feature enables mysql in replication from master to slave servers by sending events contained in binlogs, and also data recovery. Except for that, it could also be used in CDC(change-data-capture) since it's event based, an example usage could be found in the cdc-component in Eventuate™.
[阅读更多...]AQS(AbstractQueuedSynchronizer)是一个机遇FIFO等待队列实现锁的框架,用来实现诸如ReentrantLock、Semaphore等。
public abstract class AbstractQueuedSynchronizer
extends AbstractOwnableSynchronizer
implements Serializable