Netty - a pragmatic introduction

4,790 views

Published on

presentation for the 53rd JSUG Vienna meeting

Published in: Technology, Education

Netty - a pragmatic introduction

  1. 1. Netty.ioa pragmatic introduction(live coding https://github.com/raphaelstary/jsug-netty-example)
  2. 2. Raphael Stary- software dev(w/ focus on html5, js, java, (java ee), ux, agile,software craftsmanship)- founder of letsplay.io - open web gamestudiotwitter: @RaphaelStaryfacebook.com/RaphaelStarygithub.com/RaphaelStaryxing.com/profile/Raphael_Stary
  3. 3. whats netty?Netty is a NIO client serverframework which enablesquick and easy developmentof network applications suchas protocol servers andclients.
  4. 4. live coding :)https://github.com/raphaelstary/jsug-netty-example
  5. 5. companies- Red Hat- Twitter- Facebook- Boundary- Typesafe...
  6. 6. open source projects- HornetQ- Infinispan- Vert.x- Play Framework- Finangle- Cassandra...
  7. 7. its asynchronous ...- no blocking IO- share Threads across manyconnections
  8. 8. OIOsocketread/writeThreadsocketread/writeThreadsocketread/writeThreadsocketread/writeThread
  9. 9. NIOsocketread/writesocketread/writesocketread/writeThreadsocketread/writeselector
  10. 10. blocking IO scales not that good ...- a Thread takes memory from 256kb to 1mbfor the stack space- its good with <1000 connections (even betterlatency than NIO)- but >1000 concurrent connections use AIO orNIO
  11. 11. netty transports- NIO- OIO- AIO- Local- Embedded
  12. 12. supported protocols- TCP- UDP- SCTP (linux only)- UDT- Serial
  13. 13. provided codecs- HTTP- Websocket- SPDY- Serialization- JBoss Marshalling- Protobufs- SSL- Zlib
  14. 14. how to get started- MEAP preview- http://netty.io/wiki/user-guide-for-4.x.html- https://github.com/netty/netty/tree/master/example- stackoverflow examples- source code java docs
  15. 15. Netty- http://netty.io- https://github.com/netty/netty- twitter: @netty_project

×