s8sg / goflow

A Golang based high performance, scalable and distributed workflow framework
MIT License
1.06k stars 129 forks source link

Add flows dynamically #74

Closed dan2li closed 10 months ago

dan2li commented 11 months ago

[Feature] Support dynamically appending flows after the flow service started.

Code Change:

s8sg commented 11 months ago

Hey Dan, Lets create an issue first. We can discuss first and decide on the approach and necessity.

On Tue, 27 Jun 2023 at 17:02, dan @.***> wrote:

[Feature] Support dynamically appending flows after the flow service started.

Code Change:

  • Add interface AppendFlows() to FlowService and FlowRuntime.
  • Initialize queues for appended flows.

You can view, comment on, or merge this pull request online at:

https://github.com/s8sg/goflow/pull/74 Commit Summary

File Changes

(2 files https://github.com/s8sg/goflow/pull/74/files)

Patch Links:

— Reply to this email directly, view it on GitHub https://github.com/s8sg/goflow/pull/74, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYIJ2QNBDTCRBIVHNUOHPDXNKVU5ANCNFSM6AAAAAAZVLMHYU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

dan2li commented 11 months ago

@s8sg Here, https://github.com/s8sg/goflow/issues/75

dan2li commented 10 months ago

@s8sg New commit to enable Register() to support dynamically registering flow. Changes:

  1. Add Register method to the FlowRuntime to support dynamically registering flow.
  2. Add EnterWorkerMode and ExitWorkerMode methods to the FlowRuntime to enable entering and exiting worker mode.
  3. Remove runtime.StartQueueWorker, as it is no longer needed to create task queues for each flow at startup.
s8sg commented 10 months ago

@dan2li I faced some issue with the MR Created a new MR: https://github.com/s8sg/goflow/pull/79 We can discuss and work on the changes there Once everything looks good you can create a new MR. WDYT ?

s8sg commented 10 months ago

Also lets add some overview of the changes in terms on