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.

D839d9aa56849a71d8a9aa3d292a6ce6?s=128

Michael Nitschinger

September 14, 2016
Tweet

Transcript

  1. 2.
  2. 3.

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

    rapid development of maintainable high performance protocol servers & clients.“
  3. 4.

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

    rapid development of maintainable high performance protocol servers & clients.“
  4. 7.
  5. 13.
  6. 14.
  7. 15.
  8. 16.
  9. 17.
  10. 19.
  11. 20.
  12. 21.
  13. 22.
  14. 23.

    Handlers Codecs ByteToByte ByteToMessage MessageToByte MessageToMessage Replay FixedLengthFrame LengthFieldBasedFrame LineBasedFrame

    DelimiterBasedFrame …. HTTP HTTP2 Memcache MQTT Redis Smtp SSL Websockets Xml Zlib …
  15. 24.

    Handlers Codecs ByteToByte ByteToMessage MessageToByte MessageToMessage Replay FixedLengthFrame LengthFieldBasedFrame LineBasedFrame

    DelimiterBasedFrame …. HTTP HTTP2 Memcache MQTT Redis Smtp SSL Websockets Xml Zlib …
  16. 25.

    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)
  17. 26.
  18. 33.

    Why? Efficient EventLoop/Socket Multiplexing GC Optimized Less Allocations Pooling Statics

    & Reuse Selected use of sun.misc.Unsafe Lots of “Mechanical Sympathy”
  19. 34.

    Why? Efficient EventLoop/Socket Multiplexing GC Optimized Less Allocations Pooling Statics

    & Reuse Selected use of sun.misc.Unsafe Lots of “Mechanical Sympathy”
  20. 35.

    Why? Efficient EventLoop/Socket Multiplexing GC Optimized Less Allocations Pooling Statics

    & Reuse Selected use of sun.misc.Unsafe Lots of “Mechanical Sympathy”
  21. 37.
  22. 38.
  23. 41.
  24. 45.

    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