Coder Social home page Coder Social logo

Comments (7)

andrus avatar andrus commented on August 16, 2024

I like 2 as it provides both stats and job control (i.e. you can kill a job)

from bootique-job.

atomashpolskiy avatar atomashpolskiy commented on August 16, 2024

I also like the 2nd option more, but it won't let us track periodic execution of scheduled jobs... Seems like we need a combination of both.

There also can be an (arguably rare) case when a job has been submitted for execution but not started due to shortage of thread pool workers, so it's effectively queued.
This implies that despite that bootique-job by itself skips job execution if another instance of the same job is already running, there still might be a situation when there are several "live" instances of the same job, where the first is running and all the others are queued.

from bootique-job.

atomashpolskiy avatar atomashpolskiy commented on August 16, 2024

I should add that currently max thread pool size is unbound, so the issue with queued jobs will not happen unless we introduce an option to restrict pool capacity or a custom executor is provided by the user.

from bootique-job.

andrus avatar andrus commented on August 16, 2024
  • JobFutures seem to be accumulating inside DefaultScheduler and are never cleaned up. Looks like a memory leak.
  • In my comment on Jan 10, I overlooked the fact that we have a nice metrics framework. So # 1 solution - just sending events when something happens, and let metrics subsystem handle it - may actually be a better one. This will address the issue above too. This will require splitting bootique-job into bootique-job and bootique-job-instrumented (kind of like we do with Jetty).

from bootique-job.

atomashpolskiy avatar atomashpolskiy commented on August 16, 2024

JobFutures seem to be accumulating inside DefaultScheduler and are never cleaned up. Looks like a memory leak.

There's a cleaner thread in the bottom of DefaultScheduler file

In my comment on Jan 10, I overlooked the fact that we have a nice metrics framework. So # 1 solution - just sending events when something happens, and let metrics subsystem handle it - may actually be a better one. This will address the issue above too. This will require splitting bootique-job into bootique-job and bootique-job-instrumented (kind of like we do with Jetty).

Let's discuss

from bootique-job.

atomashpolskiy avatar atomashpolskiy commented on August 16, 2024

note for myself:

  1. Introduce contributed listeners, that will receive "job lifecycle events". Execution params can be moved to listener method params and isRunning indicator can be removed.
  2. Think about using metrics to track job execution stats (number of jobs executed, running times, and such)

from bootique-job.

andrus avatar andrus commented on August 16, 2024

Corresponding PR is #31

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.