-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
1956 lines (901 loc) · 63 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html class="theme-next muse use-motion" lang="zh-Hans">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />
<link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />
<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />
<meta name="keywords" content="Hexo, NexT" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.0" />
<meta property="og:type" content="website">
<meta property="og:title" content="qilianghong">
<meta property="og:url" content="http://yoursite.com/index.html">
<meta property="og:site_name" content="qilianghong">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="qilianghong">
<script type="text/javascript" id="hexo.configurations">
var NexT = window.NexT || {};
var CONFIG = {
root: '/',
scheme: 'Muse',
sidebar: {"position":"left","display":"post"},
fancybox: true,
motion: true,
duoshuo: {
userId: '0',
author: '博主'
},
algolia: {
applicationID: '',
apiKey: '',
indexName: '',
hits: {"per_page":10},
labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
}
};
</script>
<link rel="canonical" href="http://yoursite.com/"/>
<title> qilianghong </title>
</head>
<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">
<div class="container one-collumn sidebar-position-left
page-home
">
<div class="headband"></div>
<header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner"><div class="site-meta ">
<div class="custom-logo-site-title">
<a href="/" class="brand" rel="start">
<span class="logo-line-before"><i></i></span>
<span class="site-title">qilianghong</span>
<span class="logo-line-after"><i></i></span>
</a>
</div>
<p class="site-subtitle"></p>
</div>
<div class="site-nav-toggle">
<button>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
</button>
</div>
<nav class="site-nav">
<ul id="menu" class="menu">
<li class="menu-item menu-item-home">
<a href="/" rel="section">
<i class="menu-item-icon fa fa-fw fa-home"></i> <br />
首页
</a>
</li>
<li class="menu-item menu-item-archives">
<a href="/archives" rel="section">
<i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
归档
</a>
</li>
<li class="menu-item menu-item-tags">
<a href="/tags" rel="section">
<i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
标签
</a>
</li>
</ul>
</nav>
</div>
</header>
<main id="main" class="main">
<div class="main-inner">
<div class="content-wrap">
<div id="content" class="content">
<section id="posts" class="posts-expand">
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/04/26/memory-manager-java/">
<span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="andy">
<meta itemprop="description" content="">
<meta itemprop="image" content="/images/avatar.gif">
</span>
<span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="qilianghong">
<span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
<img style="display:none;" itemprop="url image" alt="qilianghong" src="">
</span>
</span>
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/04/26/memory-manager-java/" itemprop="url">
memory_manager_java
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="Post created" itemprop="dateCreated datePublished" datetime="2017-04-26T06:19:32+08:00">
2017-04-26
</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h6 id="java-内存管理笔记"><a href="#java-内存管理笔记" class="headerlink" title="java 内存管理笔记 "></a>java 内存管理笔记 </h6><ul>
<li>Garbage Collection Concepts</li>
<li>Garbage Collectors</li>
<li>Ergonomics</li>
<li>Recommendations</li>
<li>Tools to Evaluate Garbage Collection Performance </li>
</ul>
<h6 id="Garbage-Collection-Concepts"><a href="#Garbage-Collection-Concepts" class="headerlink" title="Garbage Collection Concepts"></a>Garbage Collection Concepts</h6><p>垃圾回收器职责:</p>
<ul>
<li>allocating memory</li>
<li>ensuring that the referenced objects remain in memory</li>
<li>recovering memory used by objects that are no longer reacheable from references in executing code</li>
</ul>
<p>一个对象能够被引用,就认为是存活的,否则,则被认为是死的,会被当作垃圾回收。</p>
<p>垃圾回收算法面临2个难题:</p>
<ul>
<li>避免内存碎片化 </li>
<li>保持内存的申请和释放的效率 <br>设计选择:</li>
<li>串行或者并行 </li>
<li>并发 VS 暂停所有(stop-the-world)</li>
<li>拷贝时是否要压缩 </li>
</ul>
<h5 id="性能:"><a href="#性能:" class="headerlink" title="性能:"></a>性能:</h5><ul>
<li>Throughput</li>
<li>Garbage collection overhead</li>
<li>Pause time</li>
<li>Frequency of Collection</li>
<li>Footprint</li>
<li>Promptness</li>
</ul>
<h5 id="Generational-Collection-分代收集"><a href="#Generational-Collection-分代收集" class="headerlink" title="Generational Collection -分代收集 "></a>Generational Collection -分代收集 </h5><p>1. Yong generation</p>
<blockquote>
<p> 年轻代更注重与效率</p>
</blockquote>
<p>2. Old Generation</p>
<blockquote>
<p>老年代更注重与内存效率 </p>
</blockquote>
<h5 id="HotSpot-垃圾收集器"><a href="#HotSpot-垃圾收集器" class="headerlink" title="HotSpot 垃圾收集器 "></a>HotSpot 垃圾收集器 </h5><p>1. Generations</p>
<ol>
<li>yong</li>
<li>old</li>
<li>permanent<br>大多数对象在年轻代中初始化生成。 当对象在年轻代中经过一定次数的收集后仍然存活,则会被转入老年代,一些比较大的对象会直接在老年代中存活;classes ,methods 会存活在永久代中。</li>
</ol>
</div>
<div>
</div>
<div>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/04/24/zookeeper/">
<span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="andy">
<meta itemprop="description" content="">
<meta itemprop="image" content="/images/avatar.gif">
</span>
<span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="qilianghong">
<span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
<img style="display:none;" itemprop="url image" alt="qilianghong" src="">
</span>
</span>
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/04/24/zookeeper/" itemprop="url">
zookeeper
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="Post created" itemprop="dateCreated datePublished" datetime="2017-04-24T06:22:13+08:00">
2017-04-24
</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h4 id="ZooKeeper"><a href="#ZooKeeper" class="headerlink" title="ZooKeeper"></a>ZooKeeper</h4><blockquote>
<p>wait-free coordination for Internet-scale systems</p>
<ul>
<li>elements from group messageing</li>
<li>shared registers</li>
<li>distributed lock services in replicated</li>
<li>centralized service</li>
</ul>
</blockquote>
<h4 id="Cores-of-zooKeeper"><a href="#Cores-of-zooKeeper" class="headerlink" title="Cores of zooKeeper"></a>Cores of zooKeeper</h4><ul>
<li>Coordination kernel</li>
<li>Coordination recipes</li>
<li>Experience with Coordination</li>
</ul>
<p>A distributed system is a computing system in which a number components cooperate by communicating over a network.<br>Compnents:</p>
<ul>
<li>object computing middleware</li>
<li>component middleware</li>
<li>publish/subscribe</li>
<li>message-oriented middleware</li>
<li>web services</li>
</ul>
<h4 id="Key-principles-that-influence-the-design-of-large-scale-Systems"><a href="#Key-principles-that-influence-the-design-of-large-scale-Systems" class="headerlink" title="Key principles that influence the design of large-scale Systems"></a>Key principles that influence the design of large-scale Systems</h4><ul>
<li>Avaliability</li>
<li>Performance</li>
<li>Reliability</li>
<li>Scalability</li>
<li>Manageability</li>
<li>Cost </li>
</ul>
</div>
<div>
</div>
<div>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/04/20/proactor/">
<span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="andy">
<meta itemprop="description" content="">
<meta itemprop="image" content="/images/avatar.gif">
</span>
<span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="qilianghong">
<span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
<img style="display:none;" itemprop="url image" alt="qilianghong" src="">
</span>
</span>
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/04/20/proactor/" itemprop="url">
proactor笔记
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="Post created" itemprop="dateCreated datePublished" datetime="2017-04-20T20:09:25+08:00">
2017-04-20
</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h4 id="Proactor"><a href="#Proactor" class="headerlink" title="Proactor"></a>Proactor</h4><blockquote>
<p>An object behavioral pattern for demultiplexing and dispatching handlers for Asynchronous Events </p>
</blockquote>
<h5 id="develope-high-performance-web-servers-requires-the-resolution-of-the-following-forces"><a href="#develope-high-performance-web-servers-requires-the-resolution-of-the-following-forces" class="headerlink" title="develope high-performance web servers requires the resolution of the following forces:"></a>develope high-performance web servers requires the resolution of the following forces:</h5><ul>
<li>Concurrency </li>
<li>Efficiency </li>
<li>Programming simplicity </li>
<li>Adaptablity </li>
</ul>
<p>Concurrency strtegies :</p>
<ol>
<li>Multiple synchronouns threads</li>
<li>reactive synchronous event dispatching </li>
<li>proactive asynchronous event dispatching </li>
</ol>
<h4 id="Drawbacks"><a href="#Drawbacks" class="headerlink" title="Drawbacks"></a>Drawbacks</h4><ol>
<li>Multiple Synchronous Threads <ul>
<li>Operation will blocks until it completes </li>
<li>simplification of application code </li>
<li>Threading policy is tightly coupled to the concurrency policy</li>
<li>Increased synchronization complexity</li>
<li>Increased performance overhead - context switching ,synchronization ,and data movement among CPUS</li>
<li>Non-portability</li>
</ul>
</li>
<li>Reactive Synchronous Event Dispatching </li>
</ol>
<h5 id="Steps"><a href="#Steps" class="headerlink" title="Steps"></a>Steps</h5><ol>
<li>Registers an Acceptor with Initiation Dispathcer</li>
<li>Web Server invokes Event Loop of the Initiation Dispatcher</li>
<li>Acllient connect to the Web Server</li>
<li>The Acceptor is notified by the Initiation Dispatcher of the new connection request and the Acceptor accpts the new connection</li>
<li>The Acceptor creates an Http Handler to service the new client</li>
<li>Http Handler register the connection with the Initiation Dispatcher for reading client request data </li>
<li>The Http Handler service the request from the new client </li>
</ol>
<p>for reading :</p>
<ol>
<li>The client sends an Http Get request </li>
<li>The Initiation Dispatcher notifies the Http Handler when client request data arrives at the server </li>
<li>The request is read in a non-blocking manner such that the read operation returns EWOUBLOCK if the operation woulod case the calling thread to block </li>
<li>The Http Handler the Http request</li>
<li>The requested file is synchronoously read from the file system </li>
<li>The Http Handler registers the connection with the Initiation Dispatcher for sending file data </li>
<li>The Initiation Dispatcher notifies the Http Handler when the Tcp connection is read for writing</li>
<li>The Http Handler sends the request file to the client client in a non-blocing manner such that the write operation returns EWOULDBLOCK if the operation would cause the calling thread to block<h6 id="drawbacks"><a href="#drawbacks" class="headerlink" title="drawbacks"></a>drawbacks</h6></li>
<li>complexing proramming </li>
<li>lack of OS support for multi-threading</li>
<li>scheduling of runnable tasks - reactive 是单线程,所以reactive 需要负责任务的调度,避免长时间的阻塞。 </li>
</ol>
<p>当OS支持异步操作时,proactor 模式会比较高效。</p>
<h5 id="Poractor-for-web-Server"><a href="#Poractor-for-web-Server" class="headerlink" title="Poractor for web Server"></a>Poractor for web Server</h5><ol>
<li>the web sever instructs the Acceptor to initiate an asynchronous accept</li>
<li>the Acceptor initiates an asynchronous accept with the OS and passes itself as a Completion Handler and a reference to the Completion Dispatcher that will be used to notify the Acceptor upon completion of the asynchronous accept</li>
<li>WS invokes the event loop of the Completion Dispatcher</li>
<li>client connect to the WS</li>
<li>when the asynchronous accept the operation completes ,the OS notifies the Completion Dispatcher</li>
<li>the Completion Dispatcher notifies the Acceptor </li>
<li>the Acceptor create an Http Handler</li>
<li>the Http Handler initiates an asynchronous operation to read the request data from the client and passes itself as a Completion Handler and a reference to the Completion Dispatcher that will be used to notify the Http Handler upon completion of the asynchronous read</li>
</ol>
<p>for read request:</p>
<ol>
<li>client send GET request to WS</li>
<li>after the reading completing ,the OS notified the Completed Dispatcher</li>
<li>Completion Dispatcher notifies the Http Handler</li>
<li>Http Handler parse the request</li>
<li>Http Handler synchronously read the requested file</li>
<li>Http Handler initiates an asyncrhonous operation to write the file data to the client connection and passes itself as a Completion Handler and a reference to the Completion Dispatcher that will be used to notify the Http Handler upon completion of the asynchronous write</li>
<li>when write operation completes ,the OS nofifies the Completion Dispatcher</li>
<li>the Completion Dispatcher notify the Http HAndler</li>
</ol>
</div>
<div>
</div>
<div>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/04/19/java-memory-model/">
<span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="andy">
<meta itemprop="description" content="">
<meta itemprop="image" content="/images/avatar.gif">
</span>
<span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="qilianghong">
<span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
<img style="display:none;" itemprop="url image" alt="qilianghong" src="">
</span>
</span>
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/04/19/java-memory-model/" itemprop="url">
java_memory_model
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="Post created" itemprop="dateCreated datePublished" datetime="2017-04-19T22:32:45+08:00">
2017-04-19
</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h5 id="Happens-before-ordering"><a href="#Happens-before-ordering" class="headerlink" title="Happens-before ordering"></a>Happens-before ordering</h5><ol>
<li>Synchronized method and blocks</li>
<li>volatile fields </li>
</ol>
<h4 id="Synchronization-is-needed-for-blocking-and-visibility"><a href="#Synchronization-is-needed-for-blocking-and-visibility" class="headerlink" title="Synchronization is needed for blocking and visibility"></a>Synchronization is needed for blocking and visibility</h4>
</div>
<div>
</div>
<div>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/04/19/netty/">
<span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="andy">
<meta itemprop="description" content="">
<meta itemprop="image" content="/images/avatar.gif">
</span>
<span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="qilianghong">
<span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
<img style="display:none;" itemprop="url image" alt="qilianghong" src="">
</span>
</span>
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/04/19/netty/" itemprop="url">
netty学习笔记
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="Post created" itemprop="dateCreated datePublished" datetime="2017-04-19T21:28:16+08:00">
2017-04-19
</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h3 id="Netty"><a href="#Netty" class="headerlink" title="Netty"></a>Netty</h3><ul>
<li>Transport Service</li>
<li>Protocol Support </li>
<li>Core </li>
</ul>
<h5 id="core"><a href="#core" class="headerlink" title="core"></a>core</h5><ul>
<li>Extensible Event Model </li>
<li>Universal Communication API </li>
<li>Zero-Copy-Capable Rich Byte Buffer </li>
</ul>
<h4 id="Overview"><a href="#Overview" class="headerlink" title="Overview"></a>Overview</h4><ul>
<li>Asynchronous</li>
<li>Unified API </li>
<li>High-Performance </li>
<li>Buffer Pooling </li>
<li>Gathering/Scattering </li>
</ul>
<h4 id="why-not-non-blocking-at-all"><a href="#why-not-non-blocking-at-all" class="headerlink" title="why not non-blocking at all"></a>why not non-blocking at all</h4><p>a thread takes memory from 256kb to 1mb for the stack space </p>
<h4 id="bytebuffer"><a href="#bytebuffer" class="headerlink" title="bytebuffer"></a>bytebuffer</h4><h4 id="ChannelHandler-where-your-handling-logic-lifes"><a href="#ChannelHandler-where-your-handling-logic-lifes" class="headerlink" title="ChannelHandler -where your handling logic lifes"></a>ChannelHandler -where your handling logic lifes</h4><ul>
<li>inbound and outbound</li>
<li>called by the eventExecutor </li>
</ul>
<h6 id="channelInboundHandler"><a href="#channelInboundHandler" class="headerlink" title="channelInboundHandler"></a>channelInboundHandler</h6><ul>
<li>bind</li>
<li>connect</li>
<li>disconnect</li>
<li>close</li>
<li>deregister</li>
<li>read</li>
<li>write</li>
<li>flush</li>
</ul>
<h4 id="calling-method-directly-vs-fire-event-objects"><a href="#calling-method-directly-vs-fire-event-objects" class="headerlink" title="calling method directly vs. fire event objects"></a>calling method directly vs. fire event objects</h4><ul>
<li>NAN</li>
</ul>
<h3 id="provided-Encoder-Decoder"><a href="#provided-Encoder-Decoder" class="headerlink" title="provided Encoder /Decoder"></a>provided Encoder /Decoder</h3><ul>
<li>HTTP/HTTP2 </li>
<li>WebSockets </li>
<li>SPDY </li>
<li>SSL/TLS </li>
<li>Serialization </li>
<li>GZip/Deflate </li>
</ul>
<h4 id="Decoder-base-class-gt-inBound"><a href="#Decoder-base-class-gt-inBound" class="headerlink" title="Decoder base class ==>inBound"></a>Decoder base class ==>inBound</h4><ul>
<li>ByteToMessageDecoder</li>
<li>MessageToMEssageDecoder<br>Generic userfule Decoders</li>
</ul>
<ol>
<li>ReplayDecoder </li>
<li>FixedLengthFrameDecoder</li>
<li>LengthFieldBasedFrameDecoder</li>
<li>LineBaseFrameDecoder</li>
<li>DelimiterBasedFrameDecoder</li>
</ol>
<h4 id="Encoder-base-class-gt-outbound"><a href="#Encoder-base-class-gt-outbound" class="headerlink" title="Encoder base class ==> outbound"></a>Encoder base class ==> outbound</h4><ul>
<li>MessateToByteEncoder </li>
<li>MessageToMessageEncoder </li>
</ul>