Fix wording in "Advanced Components for More Rapid Development" section.

This commit is contained in:
Evan Meagher 2011-10-03 20:53:45 -07:00 committed by Trustin Lee
parent 490fc249f8
commit 79d660ca91

View File

@ -211,29 +211,28 @@
<para> <para>
On top of the core components mentioned above, that already enable the On top of the core components mentioned above, that already enable the
implementation of all types of network applications, Netty provides a set implementation of all types of network applications, Netty provides a set
of advanced features to accelerate the development pace even more. of advanced features to accelerate the page of development even more.
</para> </para>
<section> <section>
<title>Codec framework</title> <title>Codec framework</title>
<para> <para>
As demonstrated in <xref linkend="start.pojo"/>, it is always a good As demonstrated in <xref linkend="start.pojo"/>, it is always a good
idea to separate a protocol codec from a business logic. However, there idea to separate a protocol codec from business logic. However, there
are some complications when implementing this idea from scratch. You are some complications when implementing this idea from scratch. You
have to deal with the fragmentation of messages. Some protocols are have to deal with the fragmentation of messages. Some protocols are
multi-layered (i.e. built on top of other lower level protocol). Some multi-layered (i.e. built on top of other lower level protocols). Some
are too complicated to be implemented in a single state machine. are too complicated to be implemented in a single state machine.
</para> </para>
<para> <para>
Consequently, a good network application framework should provide an Consequently, a good network application framework should provide an
extensible, reusable, unit-testable, and multi-layered codec framework extensible, reusable, unit-testable, and multi-layered codec framework
that generates maintainable user codec. that generates maintainable user codecs.
</para> </para>
<para> <para>
Netty provides a number of basic and advanced codecs built on top of Netty provides a number of basic and advanced codecs to address most
its core to address most issues you will encounter when you write a issues you will encounter when you write a protocol codec regardless
protocol codec regardless if it is simple or not, binary or text - if it is simple or not, binary or text - simply whatever.
simply whatever.
</para> </para>
</section> </section>
@ -244,16 +243,16 @@
You can't simply wrap a stream to encrypt or decrypt data but you have You can't simply wrap a stream to encrypt or decrypt data but you have
to use <classname>javax.net.ssl.SSLEngine</classname>. to use <classname>javax.net.ssl.SSLEngine</classname>.
<classname>SSLEngine</classname> is a state machine which is as complex <classname>SSLEngine</classname> is a state machine which is as complex
as SSL is. You have to manage all possible states such as cipher suite as SSL itself. You have to manage all possible states such as cipher
and encryption key negotiation (or re-negotiation), certificate suite and encryption key negotiation (or re-negotiation), certificate
exchange and validation. Moreover, <classname>SSLEngine</classname> is exchange, and validation. Moreover, <classname>SSLEngine</classname> is
not even completely thread-safe unlike usual expectation. not even completely thread-safe, as one would expect.
</para> </para>
<para> <para>
In Netty, &SslHandler; takes care of all the gory details and pitfalls In Netty, &SslHandler; takes care of all the gory details and pitfalls
of <classname>SSLEngine</classname>. All you need to do is to configure of <classname>SSLEngine</classname>. All you need to do is to configure
and insert the &SslHandler; to your &ChannelPipeline;. It also allows the &SslHandler; and insert it into your &ChannelPipeline;. It also
you to implement advanced features like allows you to implement advanced features like
<ulink url="http://en.wikipedia.org/wiki/Starttls">StartTLS</ulink> <ulink url="http://en.wikipedia.org/wiki/Starttls">StartTLS</ulink>
very easily. very easily.
</para> </para>
@ -268,13 +267,13 @@
</para> </para>
<para> <para>
Netty's HTTP support is very different from the existing HTTP libraries. Netty's HTTP support is very different from the existing HTTP libraries.
It gives you complete control over how HTTP messages are exchanged in a It gives you complete control over how HTTP messages are exchanged at a
low level. Because it is basically the combination of HTTP codec and low level. Because it is basically the combination of an HTTP codec and
HTTP message classes, there is no restriction such as enforced thread HTTP message classes, there is no restriction such as an enforced thread
model. That is, you can write your own HTTP client or server that works model. That is, you can write your own HTTP client or server that works
exactly the way you want. You have full control over thread model, exactly the way you want. You have full control over everything that's
connection life cycle, chunked encoding, and as much as what HTTP in the HTTP specification, including the thread model, connection life
specification allows you to do. cycle, and chunked encoding.
</para> </para>
<para> <para>
Thanks to its highly customizable nature, you can write a very efficient Thanks to its highly customizable nature, you can write a very efficient
@ -290,18 +289,18 @@
<listitem> <listitem>
<para> <para>
Media streaming server that needs to keep the connection open Media streaming server that needs to keep the connection open
until the whole media is streamed (e.g. 2 hours of movie) until the whole media is streamed (e.g. 2 hours of video)
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
File server that allows the upload of large files without memory File server that allows the uploading of large files without
pressure (e.g. uploading 1GB per request) memory pressure (e.g. uploading 1GB per request)
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Scalable mash-up client that connects to tens of thousand 3rd Scalable mash-up client that connects to tens of thousands of 3rd
party web services asynchronously party web services asynchronously
</para> </para>
</listitem> </listitem>
@ -314,10 +313,11 @@
<para> <para>
<ulink url="http://code.google.com/apis/protocolbuffers/docs/overview.html">Google Protocol Buffers</ulink> <ulink url="http://code.google.com/apis/protocolbuffers/docs/overview.html">Google Protocol Buffers</ulink>
are an ideal solution for the rapid implementation of a highly efficient are an ideal solution for the rapid implementation of a highly efficient
binary protocol that evolves over time. With &ProtobufEncoder; and binary protocols that evolve over time. With &ProtobufEncoder; and
&ProtobufDecoder;, you can turn the message classes generated by Google &ProtobufDecoder;, you can turn the message classes generated by the
Protocol Buffers Compiler (protoc) into Netty codec. Please take a look Google Protocol Buffers Compiler (protoc) into Netty codec. Please take
into the <ulink url="&XRef;example/localtime/package-summary.html">'LocalTime' example</ulink> a look into the
<ulink url="&XRef;example/localtime/package-summary.html">'LocalTime' example</ulink>
that shows how easily you can create a high-performing binary protocol that shows how easily you can create a high-performing binary protocol
client and server from the client and server from the
<ulink url="http://anonsvn.jboss.org/repos/netty/trunk/src/main/java/org/jboss/netty/example/localtime/LocalTimeProtocol.proto">sample protocol definition</ulink>. <ulink url="http://anonsvn.jboss.org/repos/netty/trunk/src/main/java/org/jboss/netty/example/localtime/LocalTimeProtocol.proto">sample protocol definition</ulink>.