Coder Social home page Coder Social logo

Comments (11)

andrus avatar andrus commented on August 16, 2024 1

Another recent idea is to define job dependencies in JobMetadata and do the automated ordering via topological sorting of the dependency graph.. Worth a discussion...

from bootique-job.

atomashpolskiy avatar atomashpolskiy commented on August 16, 2024

I'd say the most simple and straight-forward solution would be to add an extra option for --exec command, which will trigger sequential execution. @andrus , you OK with this?

from bootique-job.

andrus avatar andrus commented on August 16, 2024

I don't think it even needs to be an option. It can be the default and only behavior.

from bootique-job.

atomashpolskiy avatar atomashpolskiy commented on August 16, 2024

from bootique-job.

andrus avatar andrus commented on August 16, 2024

you are right ... parallel execution is the default. Forgot about that (I only focused on the order of command line flags). So yeah, a "--serial" option is a good idea.

from bootique-job.

atomashpolskiy avatar atomashpolskiy commented on August 16, 2024

As discussed, we're going to add a notion of "job groups". A job group is a collection of jobs, which may (optionally) depend on each other and should be executed as a batch. The particular order of execution is going to be determined by Bootique based on the job group definition. Job group definition is basically a directed acyclic graph and may be represented in YAML in the following way:

jobs:
  j1:
     param1: x
     param2: y
  g1:
    type: group
    jobs:
      j1:
        dependsOn:
          - j2
          - j3
      j2:
        dependsOn:
          - j3

Running a job group is similar to running a single job:
--exec -job=g1
Or --g1, when we switch to using jobs as commands.

from bootique-job.

atomashpolskiy avatar atomashpolskiy commented on August 16, 2024

After taking a closer look at Jackson's deserialization possibilities, it looks like it's not possible to deserialize this kind of config natively. The reason being that Jackson can't "unflatten" j1's params. This would not be a problem if we used an explicit params property, like:

jobs:
  j1:
    params:
      param1: x
      param2: y

As a bonus, this would also allow us to:

  1. Specify params for elements of a job group
jobs:
  g1:
    type: group
    jobs:
      j1:
        params:
          p1: x
          p2: y
        dependsOn:
          - j2
          - j3
      j2:
        dependsOn:
          - j3
  1. Specify "default" dependencies for stand-alone jobs:
jobs:
  j1:
    params:
      param1: x
      param2: y
    dependsOn:
      - j2
      - j3
  1. Combine (1) and (2) to provide "default" job configurations to make job group definitions more compact

@andrus , let me know your thoughts

from bootique-job.

andrus avatar andrus commented on August 16, 2024

let's do it. Please update the central UPGRADE.md so that the users are aware of this change

from bootique-job.

atomashpolskiy avatar atomashpolskiy commented on August 16, 2024

@andrus , our idea turns out to be really AWESOME! Can't stop generating ideas, my todo list is growing :) But even the basics that I've managed to implement today already solve Tony's problems with 14 yaml configs. See config example and ExecutionIT test in my recent commit.

from bootique-job.

andrus avatar andrus commented on August 16, 2024

@atomashpolskiy : I just added an upgrade note to https://github.com/bootique/bootique/blob/master/UPGRADE.md for this task with a note on 'jobPropertiesPrefix' removed property. If there's anything else we need to mention about upgrading existing job configs or code, let's add it as well.

from bootique-job.

atomashpolskiy avatar atomashpolskiy commented on August 16, 2024

Yep, one thing that immediately comes to mind is that params should be declared in params section now. I'll add this info as soon as I have time

from bootique-job.

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.