Netty 4.0.51 and 4.1.15. final versions released

New updates for a NIO client server framework available now
29 August 2017   424

New bugfix releases for Netty 4.0.x and 4.1.x series available now. 

What is Netty? 

Netty is a NIO client server framework which enables quick and easy development of network applications such as protocol servers and clients. It greatly simplifies and streamlines network programming such as TCP and UDP socket server.

'Quick and easy' doesn't mean that a resulting application will suffer from a maintainability or a performance issue. Netty has been designed carefully with the experiences earned from the implementation of a lot of protocols such as FTP, SMTP, HTTP, and various binary and text-based legacy protocols. As a result, Netty has succeeded to find a way to achieve ease of development, performance, stability, and flexibility without a compromise.

Netty architecture
Netty architecture

Main features:

  • Design
    • Unified API for various transport types - blocking and non-blocking socket
    • Based on a flexible and extensible event model which allows clear separation of concerns
    • Highly customizable thread model - single thread, one or more thread pools such as SEDA
    • True connectionless datagram socket support (since 3.1)
  • Ease of use
    • Well-documented Javadoc, user guide and examples
    • No additional dependencies, JDK 5 (Netty 3.x) or 6 (Netty 4.x) is enough
  • Performance
    • Better throughput, lower latency
    • Less resource consumption
    • Minimized unnecessary memory copy
  • Security
    • Complete SSL/TLS and StartTLS support

What's new in updates?

These releases contains bug-fixes, performance enhancements and features.

The most important changes for 4.0.51.Final and 4.1.15.Final are:

  • Support JDK9-native ALPN 
  • More bullet-proof way of detecting if ipv6 is supported or not when using the native transport 
  • DelegatingSslContext should also be able to configure the SslHandler 
  • Netty 4.1.14.Final fails to load on android
  • Include JNIEXPORT on exported symbols 
  • Unify KQueue and Epoll wait timeout approach 
  • Make NativeLibraryLoader check java.library.path first 
  • Use the ByteBufAllocator when copy a ReadOnlyByteBufferBuf and so also be able to release it without the GC when the Cleaner is present 
  • Ensure netty builds with java9 (build 9+181) 
  • Make configurable the initial and max size of InternalThreadLocal.stringBuilder 
  • Fix endless loop in ByteBufUtil#writeAscii 
  • Correctly support SO_TIMEOUT for OioDatagramChannel 
  • Ensure we null out the previous set InetAddress on 
  • Correctly handle connect/disconnect in EpollDatagramChannel
  • Shutting down the outbound side of the channel should not accept future writes

The most important changes for 4.1.15.Final only are:

  • Decouple DnsCache and DnsCacheEntry 
  • KQueue detect peer close without EVFILT_READ
  • Support the little endian floats and doubles by ByteBuf 
  • We should prefer heap buffers when using the OIO transport to reduce memory copies 
  • First call channelReadComplete(...) before flush(...) for better performance 
  • HTTP/2 Child Channel and FrameCodec Feature Parity  

 Learn more at official website.

What is Web3j?

Small review of lightweight Java and Android library for integration with Ethereum clients
15 December 2017   815

What is webj3?

web3j is a lightweight, highly modular, reactive, type safe Java and Android library for working with Smart Contracts and integrating with clients (nodes) on the Ethereum network:

web3j architecture
Web3j Architecture

This allows you to work with the Ethereum blockchain, without the additional overhead of having to write your own integration code for the platform.

According to the developers, these are the features:

  • Complete implementation of Ethereum's JSON-RPC client API over HTTP and IPC
  • Ethereum wallet support
  • Auto-generation of Java smart contract wrappers to create, deploy, transact with and call smart contracts from native Java code (Solidity and Truffle definition formats supported)
  • Reactive-functional API for working with filters
  • Ethereum Name Service (ENS) support
  • Support for Parity's Personal, and Geth's Personal client APIs
  • Support for Infura, so you don't have to run an Ethereum client yourself
  • Comprehensive integration tests demonstrating a number of the above scenarios
  • Command line tools
  • Android compatible
  • Support for JP Morgan's Quorum via web3j-quorum

It has five runtime dependencies:

  • RxJava for its reactive-functional API
  • OKHttp for HTTP connections
  • Jackson Core for fast JSON serialisation/deserialisation
  • Bouncy Castle (Spongy Castle on Android) for crypto
  • Jnr-unixsocket for *nix IPC (not available on Android)

It also uses JavaPoet for generating smart contract wrappers.

Lear more at GitHub.