Tzu-Li (Gordon) Tai created FLINK-23296: -------------------------------------------
Summary: Add RequestReplyClientFactory as a pluggable extension Key: FLINK-23296 URL: https://issues.apache.org/jira/browse/FLINK-23296 Project: Flink Issue Type: Sub-task Components: Stateful Functions Reporter: Tzu-Li (Gordon) Tai Assignee: Tzu-Li (Gordon) Tai Fix For: statefun-3.1.0 Currently, we ship and always use by default a {{RequestReplyClient}} implementation based on OkHttp. We'd like to allow users to use their own implementations of the {{RequestReplyClient}} for remote invocations. This is strictly for extending the means of transport, and should not leave room to touch the invocation protocol. The way this would look like in the module YAML files for remote modules would be: {code} module: spec: endpoints: - endpoint: meta: kind: http spec: functions: com.foo.bar/* urlPathTemplate: http://bar.foo.com:8080/functions/{function.name} transport: extension: com.foo.bar/some.custom.client prop1: foobar prop2: - k: v - k2: v2 .... {code} The important part is the transport section. If not specified, then the default OkHttp implementation will be used. Otherwise, if specified, an extension with the specified typename must be bound and exist in the application, and that extension needs to be a {{RequestReplyClientFactory}}: {code} interface RequestReplyClientFactory { RequestReplyClient create(JSONNode properties, URI endpointUrl); } {code} The provided JSON node properties will be as is provided in the {{transport}} block of the module YAML endpoint specification. -- This message was sent by Atlassian Jira (v8.3.4#803005)