You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/09/21 08:12:06 UTC
[GitHub] [flink] zentol opened a new pull request, #20870: [FLINK_29375][rpc] Move getSelfGateway() into RpcService
zentol opened a new pull request, #20870:
URL: https://github.com/apache/flink/pull/20870
Give RpcServices control over how self gateways are implemented.
(Note that we don't really have a definition of what a self-gateway even _is_. Right now it's a sort of local gateway that skips serialization; but generally speaking that isn't required and more-or-less a performance optimization).
This is particularly interesting because how we implement it for Akka is rather strange, with the AkkaInvocationHandler impklementing both the `RpcGateway` _and_ `RpcServer` interface, despite never actually acting as an rpc server, making it difficult to wrap your head around what this handler actually does.
I don't think we should replicate that for other rpc implementations.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] zentol merged pull request #20870: [FLINK-29375][rpc] Move getSelfGateway() into RpcService
Posted by GitBox <gi...@apache.org>.
zentol merged PR #20870:
URL: https://github.com/apache/flink/pull/20870
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] XComp commented on pull request #20870: [FLINK-29375][rpc] Move getSelfGateway() into RpcService
Posted by GitBox <gi...@apache.org>.
XComp commented on PR #20870:
URL: https://github.com/apache/flink/pull/20870#issuecomment-1255916874
I moved the diagrams into it's own repository under `XComp/flink-diagrams` (with Github Actions support on the SVG generation). Feel free to propose a change there if you're still keen to enlighten me with your change on the [Flink RPC System diagram](https://github.com/XComp/flink-diagrams/blob/main/plantuml/flink-rpc-system.puml) :sunglasses:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot commented on pull request #20870: [FLINK_29375][rpc] Move getSelfGateway() into RpcService
Posted by GitBox <gi...@apache.org>.
flinkbot commented on PR #20870:
URL: https://github.com/apache/flink/pull/20870#issuecomment-1253368431
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "1adea4196221369a807edbc27e8306b40ebce438",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "1adea4196221369a807edbc27e8306b40ebce438",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 1adea4196221369a807edbc27e8306b40ebce438 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] zentol commented on pull request #20870: [FLINK-29375][rpc] Move getSelfGateway() into RpcService
Posted by GitBox <gi...@apache.org>.
zentol commented on PR #20870:
URL: https://github.com/apache/flink/pull/20870#issuecomment-1255654652
> I came up with another diagram (see [gist](https://gist.github.com/XComp/1ee7e935e38209afd774cd7d23af0833)) that visualizes the relationships between the different classes of the RPC system to get into that topic again :-D
I'm not too sold on that particular diagram and tried to create a revision, but _dear god_ these online UML renderers are _horrible_.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] XComp commented on a diff in pull request #20870: [FLINK-29375][rpc] Move getSelfGateway() into RpcService
Posted by GitBox <gi...@apache.org>.
XComp commented on code in PR #20870:
URL: https://github.com/apache/flink/pull/20870#discussion_r976555879
##########
flink-rpc/flink-rpc-akka/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaRpcService.java:
##########
@@ -197,6 +197,20 @@ public int getPort() {
return port;
}
+ public <C extends RpcGateway> C getSelfGateway(Class<C> selfGatewayType, RpcServer rpcServer) {
+ if (selfGatewayType.isInstance(rpcServer)) {
+ @SuppressWarnings("unchecked")
+ C selfGateway = ((C) rpcServer);
+
+ return selfGateway;
+ } else {
+ throw new RuntimeException(
Review Comment:
I'm wondering whether `ClassCastException` is the better exception here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] zentol commented on pull request #20870: [FLINK-29375][rpc] Move getSelfGateway() into RpcService
Posted by GitBox <gi...@apache.org>.
zentol commented on PR #20870:
URL: https://github.com/apache/flink/pull/20870#issuecomment-1255137169
@flinkbot run azure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] XComp commented on pull request #20870: [FLINK-29375][rpc] Move getSelfGateway() into RpcService
Posted by GitBox <gi...@apache.org>.
XComp commented on PR #20870:
URL: https://github.com/apache/flink/pull/20870#issuecomment-1255847688
> I'm not too sold on that particular diagram and tried to create a revision, but dear god these online UML renderers are horrible.
:-D Yeah, the class diagram in general might not be the best solution. I use Intellij's PlantUML to edit diagram code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org