Upgrade to Pro — share decks privately, control downloads, hide ads and more …

High Performance JVM Networking with Netty

High Performance JVM Networking with Netty

This talk, given at JDK.io, is an introduction into Netty with lots of real world examples and experiences building clients and servers on top of it. Recording may be found through jdk.io at some point.

Michael Nitschinger

September 14, 2016
Tweet

More Decks by Michael Nitschinger

Other Decks in Programming

Transcript

  1. “Netty is an asynchronous and event-driven network application framework for

    rapid development of maintainable high performance protocol servers & clients.“
  2. “Netty is an asynchronous and event-driven network application framework for

    rapid development of maintainable high performance protocol servers & clients.“
  3. Handlers Codecs ByteToByte ByteToMessage MessageToByte MessageToMessage Replay FixedLengthFrame LengthFieldBasedFrame LineBasedFrame

    DelimiterBasedFrame …. HTTP HTTP2 Memcache MQTT Redis Smtp SSL Websockets Xml Zlib …
  4. Handlers Codecs ByteToByte ByteToMessage MessageToByte MessageToMessage Replay FixedLengthFrame LengthFieldBasedFrame LineBasedFrame

    DelimiterBasedFrame …. HTTP HTTP2 Memcache MQTT Redis Smtp SSL Websockets Xml Zlib …
  5. Magic (1) Opcode (1) Key Length (2) Extras Length (1)

    Data Type (1) Status (2) Total Body Length (4) Opaque (4) CAS (8) Memcached Binary Header (24 Bytes)
  6. Why? Efficient EventLoop/Socket Multiplexing GC Optimized Less Allocations Pooling Statics

    & Reuse Selected use of sun.misc.Unsafe Lots of “Mechanical Sympathy”
  7. Why? Efficient EventLoop/Socket Multiplexing GC Optimized Less Allocations Pooling Statics

    & Reuse Selected use of sun.misc.Unsafe Lots of “Mechanical Sympathy”
  8. Why? Efficient EventLoop/Socket Multiplexing GC Optimized Less Allocations Pooling Statics

    & Reuse Selected use of sun.misc.Unsafe Lots of “Mechanical Sympathy”
  9. Start Here Web netty.io IRC #netty on Freenode Mailing List

    groups.google.com/forum/#!forum/netty StackOverflow “netty” tag Bugs github.com/netty/netty/issues