Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Status -> Completed

...

IDIEP-51
Author
Sponsor
Created

  

Status

Status
colourGreyGreen
titleDRAFTCOMLETED


Table of Contents

Motivation

...

Potential approaches to this are:

  1. GridNioServer
    • Pros:
      • Easy to use, provides Future-based API
      • No extra dependencies
      • Supports multiplexing (shared worker thread group across multiple connections)
    • Cons:
      • Possibly not future proof - Ignite 3.0 may change how GridNioServer works and/or switch to Netty
  2. Netty
    • Pros:
      • Easy to use, provides Future-based API
      • Supports multiplexing (shared worker thread group (EventLoopGroup) across multiple connections)
      • Proven performance
    • Cons:
      • New dependency in core module
  3. Perform writes in a separate thread (use dedicated thread or ForkJoinPool.commonPool)
    • Pros: no
      • No dependencies
    • Cons: more
      • Increased resource usage,
      • More manual thread management - hard to get right and fast
  4. AsynchronousSocketChannel
  5. Netty
    • Pros:
      • Greatly reduces complexity - returns ChannelFuture, which can be easily converted to IgniteClientFuture. Manual thread management goes away.
      • We can share one EventLoopGroop across all TcpClientChannel instances within ReliableChannel and reduce resource usage when partition awareness is enabled
      • Proven performance
    • Cons:
      • New dependency in core module

Discussion Links

As a result of dev list discussions (see links below), it is decided to use GridNioServer. To make the integration clean and easy to replace with a different implementation, a couple of facade interfaces are introduced:

  • ClientConnectionMultiplexer
    • void start()
    • void stop()
    • ClientConnection open(InetSocketAddress addr, Consumer<ByteBuffer> hnd)
  • ClientConnection
    • CompletableFuture sendAsync(ByteBuffer msg)

Discussion Links

...

Tickets


Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyIGNITE-13496