[jira] [Created] (FLINK-20334) Introduce function endpoint path templating in module YAML specifications

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-20334) Introduce function endpoint path templating in module YAML specifications

Shang Yuanchun (Jira)
Tzu-Li (Gordon) Tai created FLINK-20334:
-------------------------------------------

             Summary: Introduce function endpoint path templating in module YAML specifications
                 Key: FLINK-20334
                 URL: https://issues.apache.org/jira/browse/FLINK-20334
             Project: Flink
          Issue Type: Sub-task
            Reporter: Tzu-Li (Gordon) Tai
             Fix For: statefun-2.3.0


In the current module specifications, function endpoints are defined like so:

{code}
functions:
    - function:
          meta:
              kind: http
              type: com.foo/world
          spec:
              endpoint: http://localhost:5959/statefun
{code}

A list of functions and their corresponding service endpoints are listed statically in the module specification file, which is loaded once on system startup. The system may only route messages to functions that have been defined. This prevents users from adding new functions to the application, without having to restart the system and reload new module specifications.

We propose that instead of specifying functions, users should specify a "family" of function endpoints, like so:

{code}
functionEndpoints:
    - functionEndpoint:
        meta:
            kind: http
        spec:
            target:
                typename:
                    namespace: com.foo.bar
                    function: *  # (can be wildcard * or a specific name)
                urlPathTemplate: "https://bar.foo.com:8000/{typename.function}"
            connectTimeout: 1min
            # ... (other connection related configs that is shared for this endpoint family)
{code}

Note how users no longer define eager state per individual function. This is made possible by FLINK-20265, where state is now defined in the functions instead of in the module specifications.



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