Skip to content

Commit 5eeba03

Browse files
committed
readme etc
1 parent 002b201 commit 5eeba03

File tree

7 files changed

+157
-80
lines changed

7 files changed

+157
-80
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ Netty是Java世界知名的网络应用框架。本系列文章是Netty的源码
2525
### [1.概述](https://github.com/code4craft/netty-learning/blob/master/ch1-overview.md)
2626
### [2.Netty中的buffer](https://github.com/code4craft/netty-learning/blob/master/ch2-buffer.md)
2727
### [3.层层分析Netty中的Channel(上)](https://github.com/code4craft/netty-learning/blob/master/ch3-pipeline.md)
28-
### [4.层层分析Netty中的Channel(下)](https://github.com/code4craft/netty-learning/blob/master/ch4-channel-nio.md) *未完成*
29-
### [5.分门别类讲讲Handler](https://github.com/code4craft/netty-learning/blob/master/ch5-handler.md) *未完成*
28+
### [4.层层分析Netty中的Channel(上)](https://github.com/code4craft/netty-learning/blob/master/ch4-pipeline.md)
29+
### [5.层层分析Netty中的Channel(下)](https://github.com/code4craft/netty-learning/blob/master/ch5-channel-nio.md) *未完成*
30+
### [6.分门别类讲讲Handler](https://github.com/code4craft/netty-learning/blob/master/ch6-handler.md) *未完成*
3031

3132
## 二、Netty中的特性与细节
3233

@@ -54,11 +55,11 @@ twitter关于3.0与4.0中Channel Event的说明:
5455

5556
## 使用Netty的开源项目:
5657

57-
* ### [dubbo](https://github.com/alibaba/dubbo)
58+
* ### [Dubbo](https://github.com/alibaba/dubbo)
5859

5960
阿里巴巴的RPC中间件。支持Netty和Mina。
6061

61-
* ### [finagle](https://github.com/twitter/finagle)
62+
* ### [Finagle](https://github.com/twitter/finagle)
6263

6364
Twitter的RPC中间件。使用Scala编写。
6465

asserts/muilti-reactor.jpeg

69.1 KB
Loading

ch3-pipeline.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,7 @@ PS: Pipeline这部分拖了两个月,终于写完了。中间写的实在缓
133133
[1]: http://static.oschina.net/uploads/space/2013/0921/174032_18rb_190591.png
134134
[2]: http://static.oschina.net/uploads/space/2013/1109/075339_Kjw6_190591.png
135135
[3]: http://static.oschina.net/uploads/space/2013/1124/001528_TBb5_190591.jpg
136+
137+
参考资料:
138+
139+
* Sink [http://en.wikipedia.org/wiki/Sink_\(computing\)](http://en.wikipedia.org/wiki/Sink_\(computing\))

ch4-channel-events.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
层层分析Netty中的Channel(中)
2+
--------
3+
4+
上篇文章讲到了Netty的Channel内部的运作机制,这篇文章详细分析Channel的生命周期。
5+
6+
## 一、连接的创建
7+
8+
### 上层世界:Netty中Channel的类型及创建
9+
10+
我们在使用Netty时,总是需要指定一个`ChannelFactory`,这个就是
11+
12+
Bind: `NioServerSocketChannel`
13+
14+
Accept:`NioServerBoss`
15+
16+
Read:`NioWorker.read`
17+
18+
Write:`AbstractNioWorker`
19+
20+
### 下层世界:NIO中的
21+
22+
|NIO |Netty |
23+
|-|-|
24+
|SelectionKey.OP_READ | |
25+
|SelectionKey.OP_WRITE | |
26+
|SelectionKey.OP_CONNECT | |
27+
|SelectionKey.OP_ACCEPT | |
28+
29+
30+
31+
32+
## 二、Interest与Selector
33+
34+
## 三、服务器端的多线程
35+
36+
## 回到现实:几种与对应的实现
37+
38+
## NIO:
39+
40+
Selector ->Boss
41+
->Worker
42+
43+
44+
实际上Channel部分没有太多内容,
45+
46+
>TODO
47+
48+
ServerChannel
49+
50+
SocketChannel
51+
52+
DatagramChannel
53+
54+
LocalChannel
55+
56+
----------
57+
58+
ChannelHandler
59+
60+
ChannelUpstreamHandler
61+
62+
ChannelDownstreamHandler
63+
64+
Config Parent & Child
65+
66+
通过handler把底层隔离了
67+
68+
![Multiple Reactors][1]
69+
70+
[1]: http://static.oschina.net/uploads/space/2013/1125/130828_uKWD_190591.jpeg
71+
72+
参考资料:
73+
74+
* Scalable IO in Java [http://gee.cs.oswego.edu/dl/cpjslides/nio.pdf](http://gee.cs.oswego.edu/dl/cpjslides/nio.pdf)

ch4-channel-nio.md

Lines changed: 0 additions & 76 deletions
This file was deleted.

ch5-channel-nio.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
层层分析Netty中的Channel(下)
2+
--------
3+
4+
上篇文章讲到了Netty的Channel内部的运作机制和生命周期。这篇文章会走进Netty处理的内部,结合NIO,讲讲Netty中是如何实现Reactor模式的。
5+
6+
## 一、连接的创建
7+
8+
### 上层世界:Netty中Channel的类型及创建
9+
10+
我们在使用Netty时,总是需要指定一个`ChannelFactory`,这个就是
11+
12+
Bind: `NioServerSocketChannel`
13+
14+
Accept:`NioServerBoss`
15+
16+
Read:`NioWorker.read`
17+
18+
Write:`AbstractNioWorker`
19+
20+
### 下层世界:NIO中的
21+
22+
|NIO |Netty |
23+
|-|-|
24+
|SelectionKey.OP_READ | |
25+
|SelectionKey.OP_WRITE | |
26+
|SelectionKey.OP_CONNECT | |
27+
|SelectionKey.OP_ACCEPT | |
28+
29+
30+
31+
32+
## 二、Interest与Selector
33+
34+
## 三、服务器端的多线程
35+
36+
## 回到现实:几种与对应的实现
37+
38+
## NIO:
39+
40+
Selector ->Boss
41+
->Worker
42+
43+
44+
实际上Channel部分没有太多内容,
45+
46+
>TODO
47+
48+
ServerChannel
49+
50+
SocketChannel
51+
52+
DatagramChannel
53+
54+
LocalChannel
55+
56+
----------
57+
58+
ChannelHandler
59+
60+
ChannelUpstreamHandler
61+
62+
ChannelDownstreamHandler
63+
64+
Config Parent & Child
65+
66+
通过handler把底层隔离了
67+
68+
![Multiple Reactors][1]
69+
70+
[1]: http://static.oschina.net/uploads/space/2013/1125/130828_uKWD_190591.jpeg
71+
72+
参考资料:
73+
74+
* Scalable IO in Java [http://gee.cs.oswego.edu/dl/cpjslides/nio.pdf](http://gee.cs.oswego.edu/dl/cpjslides/nio.pdf)
File renamed without changes.

0 commit comments

Comments
 (0)