Igal Shilman created FLINK-23039:
------------------------------------

             Summary: Support pluggable transports for HTTP endpoints
                 Key: FLINK-23039
                 URL: https://issues.apache.org/jira/browse/FLINK-23039
             Project: Flink
          Issue Type: Improvement
          Components: Stateful Functions
            Reporter: Igal Shilman
             Fix For: statefun-3.1.0


We've recently learned about a use case that requires using a custom client 
that dispatches the HTTP requests (due to some internal reasons).

This can be a useful addition to further customizing the exact client code, 
that suites the user's need. (for example adding company specific tracing 
information)

This is technically feasible as well, as all it takes is:

1) provide an implementation of this 
[interface|https://github.com/apache/flink-statefun/blob/master/statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/reqreply/RequestReplyClient.java]

2) extend the ability to configure it from information present at the 
module.yaml.

 

The current proposal is to add an optional "transport" section to endpoint 
definition:
{code:java}
- endpoint:
    meta:
      kind: http
    spec:
      functions: com.foo.bar/*
      transport:
        provider_class: com.foo.bar.ClientProvider
        some:
          internal:
            property: 123
      urlPathTemplate: http://bar.foo.com:8080/functions/{function.name}
      maxNumBatchRequests: 10000 {code}
If the transport is not present we assume that the StateFun's pre-bundled 
transport is present.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to