You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Marco Villalobos <mv...@kineteque.com> on 2021/04/07 00:49:17 UTC

questions regarding stateful functions

Upon reading about stateful functions, it seems as though first, a data
stream has to flow to an event ingress.  Then, the stateful functions will
perform computations via whatever functionality it provides. Finally, the
results of said computations will flow to the event egress which will be
yet another datastream within the data stream job.

Is my understanding correct?

I was hoping that a stateful function could be called by a process
function, is that possible? (I am guessing no).

Please let me know.

Thank you.  Sincerely,

Marco A. Villalobos

Re: questions regarding stateful functions

Posted by Marco Villalobos <mv...@kineteque.com>.
That is a more round-abou then I hoped for.  I was hoping that a process
function could call a stateful function and receive and act upon the
response, but that's not the case.  Thank you.

On Wed, Apr 7, 2021 at 11:38 AM Igal Shilman <ig...@ververica.com> wrote:

> Yes it is possible. A process function upstream to a stateful function can
> emit a message that
> in turn will be routed to that function using the data stream integration.
>
>
> On Wed, Apr 7, 2021 at 7:16 PM Marco Villalobos <mv...@kineteque.com>
> wrote:
>
>> Thank you for the clarification.
>>
>> BUT....there was one question not addressed:
>>
>> Can a stateful function be called by a process function?
>>
>> On Wed, Apr 7, 2021 at 8:19 AM Igal Shilman <ig...@ververica.com> wrote:
>>
>>> Hello Marco!
>>>
>>> Your understanding is correct, but in addition
>>> You can also use StateFun within a DataStream application [1]
>>>
>>> [1]
>>> https://ci.apache.org/projects/flink/flink-statefun-docs-master/docs/sdk/flink-datastream/
>>>
>>> On Wed, Apr 7, 2021 at 2:49 AM Marco Villalobos <
>>> mvillalobos@kineteque.com> wrote:
>>>
>>>> Upon reading about stateful functions, it seems as though first, a data
>>>> stream has to flow to an event ingress.  Then, the stateful functions will
>>>> perform computations via whatever functionality it provides. Finally, the
>>>> results of said computations will flow to the event egress which will be
>>>> yet another datastream within the data stream job.
>>>>
>>>> Is my understanding correct?
>>>>
>>>> I was hoping that a stateful function could be called by a process
>>>> function, is that possible? (I am guessing no).
>>>>
>>>> Please let me know.
>>>>
>>>> Thank you.  Sincerely,
>>>>
>>>> Marco A. Villalobos
>>>>
>>>

Re: questions regarding stateful functions

Posted by Igal Shilman <ig...@ververica.com>.
Yes it is possible. A process function upstream to a stateful function can
emit a message that
in turn will be routed to that function using the data stream integration.


On Wed, Apr 7, 2021 at 7:16 PM Marco Villalobos <mv...@kineteque.com>
wrote:

> Thank you for the clarification.
>
> BUT....there was one question not addressed:
>
> Can a stateful function be called by a process function?
>
> On Wed, Apr 7, 2021 at 8:19 AM Igal Shilman <ig...@ververica.com> wrote:
>
>> Hello Marco!
>>
>> Your understanding is correct, but in addition
>> You can also use StateFun within a DataStream application [1]
>>
>> [1]
>> https://ci.apache.org/projects/flink/flink-statefun-docs-master/docs/sdk/flink-datastream/
>>
>> On Wed, Apr 7, 2021 at 2:49 AM Marco Villalobos <
>> mvillalobos@kineteque.com> wrote:
>>
>>> Upon reading about stateful functions, it seems as though first, a data
>>> stream has to flow to an event ingress.  Then, the stateful functions will
>>> perform computations via whatever functionality it provides. Finally, the
>>> results of said computations will flow to the event egress which will be
>>> yet another datastream within the data stream job.
>>>
>>> Is my understanding correct?
>>>
>>> I was hoping that a stateful function could be called by a process
>>> function, is that possible? (I am guessing no).
>>>
>>> Please let me know.
>>>
>>> Thank you.  Sincerely,
>>>
>>> Marco A. Villalobos
>>>
>>

Re: questions regarding stateful functions

Posted by Marco Villalobos <mv...@kineteque.com>.
Thank you for the clarification.

BUT....there was one question not addressed:

Can a stateful function be called by a process function?

On Wed, Apr 7, 2021 at 8:19 AM Igal Shilman <ig...@ververica.com> wrote:

> Hello Marco!
>
> Your understanding is correct, but in addition
> You can also use StateFun within a DataStream application [1]
>
> [1]
> https://ci.apache.org/projects/flink/flink-statefun-docs-master/docs/sdk/flink-datastream/
>
> On Wed, Apr 7, 2021 at 2:49 AM Marco Villalobos <mv...@kineteque.com>
> wrote:
>
>> Upon reading about stateful functions, it seems as though first, a data
>> stream has to flow to an event ingress.  Then, the stateful functions will
>> perform computations via whatever functionality it provides. Finally, the
>> results of said computations will flow to the event egress which will be
>> yet another datastream within the data stream job.
>>
>> Is my understanding correct?
>>
>> I was hoping that a stateful function could be called by a process
>> function, is that possible? (I am guessing no).
>>
>> Please let me know.
>>
>> Thank you.  Sincerely,
>>
>> Marco A. Villalobos
>>
>

Re: questions regarding stateful functions

Posted by Igal Shilman <ig...@ververica.com>.
Hello Marco!

Your understanding is correct, but in addition
You can also use StateFun within a DataStream application [1]

[1]
https://ci.apache.org/projects/flink/flink-statefun-docs-master/docs/sdk/flink-datastream/

On Wed, Apr 7, 2021 at 2:49 AM Marco Villalobos <mv...@kineteque.com>
wrote:

> Upon reading about stateful functions, it seems as though first, a data
> stream has to flow to an event ingress.  Then, the stateful functions will
> perform computations via whatever functionality it provides. Finally, the
> results of said computations will flow to the event egress which will be
> yet another datastream within the data stream job.
>
> Is my understanding correct?
>
> I was hoping that a stateful function could be called by a process
> function, is that possible? (I am guessing no).
>
> Please let me know.
>
> Thank you.  Sincerely,
>
> Marco A. Villalobos
>