[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: |
|
||||||||
| 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: |
| 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. |