Hi,

I am not an expert on Stateful functions, but I doubt there is something
in particular that would solve you use case. I think you need to
implement that in the user space.

You will need some way of keeping track of which state changes come from
which originating event and then have some transactional protocol where
you could commit or revoke the state on the time out.

I am cc'ing Gordon and Igal as well, who work on the Stateful functions.
They might have some other ideas or pointers.

Best,

Dawid

On 07/09/2020 08:43, Mazen Ezzeddine wrote:
> Hi all, 
>
> I am implementing a use case in Flink stateful functions. My specification
> highlights that starting from a *stateful function f* a business workflow
> (in other words a group of stateful functions f1, f2, … fn are called either
> sequentially or in parallel or both ). Stateful function f waits for a
> result to be returned to update a local state, it as well starts a timeout
> callback i.e. a message to itself. At timeout, f checks if the local state
> is updated (it has received a result), if this is the case life is good.
>
> However, if at timeout f discovers that it has not received a result yet, it
> has to launch a compensating workflow to undo any changes that /stateful
> functions f1, f2, … fn/ might have received.
>
> Does Flink stateful functions framework support such as a design pattern/use
> case, or it should be implemented at the application level? What is the
> simplest design to achieve such a solution? For instance, how to know what
> functions of the workflow stateful functions f1, f2, … fn were affected by
> the timedout invocation (where the control flow has been timed out)? How
> does Flink sateful functions and the concept of* integrated messaging and
> state* facilitate such a pattern?
>
> Thank you.
>
>
>
> --
> Sent from: http://apache-flink-mailing-list-archive.1008284.n3.nabble.com/

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to