First experience with netty (and small typo in documentation)
Trustin Lee
tlee at redhat.com
Fri Nov 14 01:24:52 EST 2008
Hi jdv145,
(what is your real name BTW? :)
On Fri, Nov 07, 2008 at 04:53:51AM +0900, jdv145 wrote:
>
> I'm almost finished with making my mina based server and i very recently
> noticed you have sort of forked away from mina. Although i think its always
> a pity if you had to leave the way you left, i think its a good decision for
> you (and everyone else in the end). I see you are very much motivated, and i
> have great respect for your enthusiasm.
Thank you for your couragement and support. I really appreciate it!
> Although i really liked mina, and i have no real reason to hop onto
> something else, i always like to use the newest, latest, greatest
> software/libraries. Although the server im building will mina based (at
> first) i already made the planning to exchange it with netty pretty soon.
> But ppl are waiting and for the server so i really think its a shame i have
> to use mina now while i know im going to replace it soon.
No problem. It would be just great if you can tell me what you didn't
like about MINA - I'm ready to improve Netty. ;)
> Anyway, i wanted to share my experience, which might be useful for you and
> other...
> Coming from mina i first tried to change my mindset to netty. I also had a
> bit of a problem when starting with mina because i was pretty new to java
> programming and pretty new to network programming. But the examples and
> especially the (powerpoint) presentations were a great help.
> With netty i printed the examples a couple of times and read it. Coming from
> mina i noticed a similar architecture, and the pipeline concept with
> handlers were very easy to comprehend. But i think it will be a bit hard for
> someone unfamiliar with i.e. mina might have a hard time getting hist mind
> around the whole thing.. What i would have liked if there was some easy to
> understand pictures with the pipelines and some code adding handlers like
> there were in the presentations on the mina site. They touch the core
> concept of the whole thing and i think if you understand that the rest is
> easy. (but this might not be the case for other peeps).
> I'm a bit short of time and i only play with a new netty based server in my
> breaks, but generally i get the idea you have used the good ideas from mina
> and improved it even further. I get a sense that everything is sort of where
> i would expected it and everything feels like it has been designed simple
> but very powerful and fits like a glove.
I understand your point that an event-driven approach is difficult to
understand when you get started with it. I'd like to provide some sort
of migration path, but the problem is that myself is already too used to
event-driven application programming. I should do something though!
> Although i am going to try netty, im a bit reluctant to use it on a live
> server so im wondering, can you give me a sort of summary about what i can
> expect?
> I know mina has ben developed over a long time and small bugs can only be
> fixed after heavy testing and usage. But i also know that if you start a
> system or library from the ground up, it has a lot less bugs then a system
> tweaked, changed and hammered by many people. What can i expect if i would
> run it on a live server? I like performance, but it must not be at the
> expense of robustness. Will it be able to run weeks at a time?
I know high test coverage doesn't always say that the application being
tested is stable enough, but Netty has much higher test coverage than
MINA (around 75%), and that's probably why the number of bugs since the
first GA release is pretty small. Also, Very complicated products like
JBoss Messaging is using Netty in its new major upgrade, so I think it's
being tested pretty well.
> I think people who are potentially interested in netty are probably have
> experience with mina. I know it might be "politically" not a good idea, but
> maybe a short crash course about the biggest differences with mina? Would be
> great for users i think.
The differences I can think of are:
* Netty uses an event object as the first citizen, which allows more
flexible event model, while MINA's event model is limited to network
events only.
* Netty has cleaner API because it's a rewrite from scratch.
* Netty has much more robust buffer API and supports composite buffer.
* Netty is documented much better.
* Netty has faster development cycle - MINA is moving so slowly these
days. I'm not sure when 2.0.0 stable will be released.
> then the small typo:
>
> http://www.jboss.org/file-access/default/members/netty/freezone/api/3.0/org/jboss/netty/handler/codec/string/StringDecoder.html
>
> pipeline.addLast("frameDecoder", new
> DelimiterBasedFrameDecoder(Delimiters.lineDelimiter()));
>
> the DelimiterBasedFrameDecoder needs to have a maxframesize value in its
> constructor.
Fixed. Thanks!
> I hope you continue the development of netty and make it as good (or better
> ;) ) then mina. I know from your work you are a great developer and i have
> no doubt you will make netty one of the best libraries around (if not i
> wouldn't have start using it since i have no real urging issues with mina to
> switch ;) )
What an overpraise!
> PS excuse my grammer, im not english
Me neither. ;)
Cheers,
--
Trustin Lee, Principal Software Engineer, JBoss, a division of Red Hat
--
what we call human nature is actually human habit
--
http://gleamynode.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20081114/60f1d7a1/attachment.bin
More information about the netty-users
mailing list