You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Tzu-Li (Gordon) Tai (Jira)" <ji...@apache.org> on 2020/12/04 04:11:00 UTC

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

     [ https://issues.apache.org/jira/browse/FLINK-20334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tzu-Li (Gordon) Tai closed FLINK-20334.
---------------------------------------
    Resolution: Fixed

statefun/master: ee051dd25d88d9da38bc33f91788997975fa5e8e

> 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
>          Components: Stateful Functions
>            Reporter: Tzu-Li (Gordon) Tai
>            Assignee: Tzu-Li (Gordon) Tai
>            Priority: Major
>              Labels: pull-request-available
>             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.
> Function endpoint templating should only be supported in a new module specification format version (next version being {{3.0}}), where the previous way of defining individual functions is no longer supported.



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