Git Product home page Git Product logo

Comments (3)

1059915154 avatar 1059915154 commented on August 25, 2024

I implement these functions based on the registry structure cache mapping.

from cadence.

3vilhamster avatar 3vilhamster commented on August 25, 2024

Hey. Could you elaborate what is your usecase?
I'm not sure I understand.

  1. Cadence provide a way to schedule workflow executions and is meant to tolerate a single server outage with a retry. I don't think deregistering is an intended behaviour. How would Cadence react if the workflow started and you decided to uninstall workflowType?
  2. All workflows should be idempotent, so running them again with the same arguments should lead to the same result, for any changes your code should use versioning to ensure replayability. How can Cadence ensure the replayability of workflows if you update workflowType?
  3. This could make sense, though I'm not sure I understand the usecase.

from cadence.

1059915154 avatar 1059915154 commented on August 25, 2024

@3vilhamster Thanks.
My scenario is to combine multiple HTTP interfaces into a workflow, including registering, uninstalling, or updating workflows. I require the entire process to be dynamic, rather than sending new versions every time changes are made.
I have already implemented the corresponding requirements locally. The general processing process is as follows:

  1. Dynamically generate corresponding functions based on GO plugins, where each plugin corresponds to a complete workflow processing logic.
  2. Dynamically register, uninstall, or update workflows based on the above functions, although cadence currently does not support uninstallation or update workflows. So I implemented it by modifying the cadence source code, first defining three interfaces in the cadence/worker that correspond to uninstallation, update, and detecting whether the workflow has been registered through name. Then implement these three interfaces in cadence/internal/registry, mainly based on a series of operations on registry.workflowFuncMap.

I am not sure if dynamic updates or uninstallations are suitable for long-term or scheduled workflows. But in my scenario, it seems reasonable.

from cadence.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.