You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by EronWright <gi...@git.apache.org> on 2016/11/07 19:46:44 UTC
[GitHub] flink pull request #2766: [FLINK-4898] Refactor HTTP handlers and Netty serv...
GitHub user EronWright opened a pull request:
https://github.com/apache/flink/pull/2766
[FLINK-4898] Refactor HTTP handlers and Netty server/client
- added support classes for REST and WebSocket-based protocols
- generalized NettyClient/NettyServer: makes no assumptions about the
channel pipeline, facilitates providing the initializer at connection
time (to convey request-specific context such as a completion promise).
- moved SSL handling to a standalone handler for composability
- moved configuration constants related to the \u201cpartition request\u201d
protocol from NettyConfig to PartitionRequestNettyConfig
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/EronWright/flink feature-FLINK-4898
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/2766.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2766
----
commit 2926370baa43067a064990daff450ef63311d367
Author: wrighe3 <er...@emc.com>
Date: 2016-11-07T18:45:17Z
[FLINK-4898] Refactor HTTP handlers and Netty server/client
- added support classes for REST and WebSocket-based protocols
- generalized NettyClient/NettyServer: makes no assumptions about the
channel pipeline, facilitates providing the initializer at connection
time (to convey request-specific context such as a completion promise).
- moved SSL handling to a standalone handler for composability
- moved configuration constants related to the \u201cpartition request\u201d
protocol from NettyConfig to PartitionRequestNettyConfig
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2766: [FLINK-4898] Refactor HTTP handlers and Netty server/clie...
Posted by mxm <gi...@git.apache.org>.
Github user mxm commented on the issue:
https://github.com/apache/flink/pull/2766
Thanks for the PR, @EronWright. I think @uce is most familiar with the network layer. Just wondering from a first quick look, if the code removes duplicate implementation of network components by providing a common base, why are there so little lines removed? We still have to port the existing code I assume?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2766: [FLINK-4898] Refactor HTTP handlers and Netty server/clie...
Posted by EronWright <gi...@git.apache.org>.
Github user EronWright commented on the issue:
https://github.com/apache/flink/pull/2766
@mxm some duplication remains, yes - the KvState server/client still use a separate implementation (that was clearly cut/pasted).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2766: [FLINK-4898] Refactor HTTP handlers and Netty server/clie...
Posted by uce <gi...@git.apache.org>.
Github user uce commented on the issue:
https://github.com/apache/flink/pull/2766
Sorry for the very long delay on this one. I really like the idea of deduping code at that level, but I don't think that we can merge this as it is. What's the current state of the things that depend on this for the Mesos dispatcher? And how much code is actually duplicated there? I think that this generifcation only works well for Flink's data exchange layer and your new additions.
- In general, I think that bootstrapping a Netty client/server is very easy and in most cases you actually don't need to configure that much. For example in the queryable state network client and server, the setup of the client and server are only a couple of dozens lines.
- The centralized `NettyConfig` and protocol work well for projects in `flink-runtime`, but you don't want to always couple this. For example with a separate slim module for the queryable state client, this would require it to depend on `flink-runtime` if it wanted to use it.
- Futhermore, we are moving to using the `ConfigOption` gathered in `<Component>Options` classes (like `HighAvailabilityOptions`).
- This also would not work with the web runtime server where we don't even have a client.
All in all, I just don't think that the approach taken for trying to make the data exchange network layer generic with the "protocols" and "configurations" was a good idea in the first place when we implemented it a few years ago.
---
What about moving to the generic components to the Netty based components you require for the Mesos dispatcher (e.g. make it part of the dispatcher PR) and leave the current data exchange implementation as it is.
I would keep the SSL handlers separate in order to allow users to easily use them as you suggest.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2766: [FLINK-4898] Refactor HTTP handlers and Netty server/clie...
Posted by EronWright <gi...@git.apache.org>.
Github user EronWright commented on the issue:
https://github.com/apache/flink/pull/2766
@uce it would be nice to get this PR in, to counteract the growing duplication of Netty code in the codebase.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2766: [FLINK-4898] Refactor HTTP handlers and Netty server/clie...
Posted by EronWright <gi...@git.apache.org>.
Github user EronWright commented on the issue:
https://github.com/apache/flink/pull/2766
@tillrohrmann would you mind taking a look?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2766: [FLINK-4898] Refactor HTTP handlers and Netty server/clie...
Posted by EronWright <gi...@git.apache.org>.
Github user EronWright commented on the issue:
https://github.com/apache/flink/pull/2766
@uce happy to further discuss this PR, why it helps with making the Netty client/server code more reusable. Also provides some REST foundation code to be used later for FLINK-4897.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2766: [FLINK-4898] Refactor HTTP handlers and Netty serv...
Posted by EronWright <gi...@git.apache.org>.
Github user EronWright closed the pull request at:
https://github.com/apache/flink/pull/2766
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2766: [FLINK-4898] Refactor HTTP handlers and Netty server/clie...
Posted by EronWright <gi...@git.apache.org>.
Github user EronWright commented on the issue:
https://github.com/apache/flink/pull/2766
@uce thanks for the feedback.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---