[JAVA-2149] Configuring channel type in NettyStreamFactoryFactory Created: 10/Mar/16  Updated: 19/Oct/16  Resolved: 23/Jun/16

Status: Closed
Project: Java Driver
Component/s: Async
Affects Version/s: 3.1.0
Fix Version/s: 3.3.0

Type: Improvement Priority: Major - P3
Reporter: Sergey Polovko Assignee: Ross Lawley
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by JAVA-2202 Support for EpollEventLoop Group in a... Closed

 Description   

It is possible to configure event loop with NettyStreamFactoryFactory but there is no way to configure socket channel type.

In case when I want to use native transport in my Netty server-side application I have to use EpollEventLoopGroup. Also I want to share event loop between my server request handlers and Mongo driver to reduce threads count and context switches between them. Netty maintains compatibility between event loop and channel implementations and don't allows to mix different types in bootstrapped server or client. So I have to create separated NioEventLoopGroup for Mongo driver because channel type currently is not configurable.



 Comments   
Comment by Ross Lawley [ 23/Jun/16 ]

Thanks jamel your PR was slightly refactored to not break binary compatibility and forms the basis for creating and configuring the NettyStreamFactoryFactory.

This will be available in the forthcoming 3.3 release.

Comment by Githook User [ 23/Jun/16 ]

Author:

{u'username': u'jamel', u'name': u'Sergey Polovko', u'email': u'jamel@yandex-team.ru'}

Message: JAVA-2149: add ability to configure channel type of NettyStream in async driver
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/7f6a09a99a44aa18e3472985b31e8dc455097340

Comment by Sergey Polovko [ 10/Mar/16 ]

Submitted https://github.com/mongodb/mongo-java-driver/pull/343

Comment by Ross Lawley [ 10/Mar/16 ]

jamel Pull requests always are helpful! Many thanks.

Comment by Sergey Polovko [ 10/Mar/16 ]

I could provide a pull request if it will be helpful.

Comment by Ross Lawley [ 10/Mar/16 ]

Hi jamel, thanks for the ticket. Sounds reasonable, we'll look into what it requires and hopefully schedule it in for development in the near future.

Generated at Thu Feb 08 08:56:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.