Comments (7)
I like 2 as it provides both stats and job control (i.e. you can kill a job)
from bootique-job.
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.
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.
- 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
intobootique-job
andbootique-job-instrumented
(kind of like we do with Jetty).
from bootique-job.
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.
note for myself:
- Introduce contributed listeners, that will receive "job lifecycle events". Execution params can be moved to listener method params and isRunning indicator can be removed.
- Think about using metrics to track job execution stats (number of jobs executed, running times, and such)
from bootique-job.
Corresponding PR is #31
from bootique-job.
Related Issues (20)
- Job listeners are not notified when a job throws an exception
- Jobs with dependencies and job groups cause deadlocks on pool starvation HOT 3
- Job group to reuse the group dispatch thread when possible
- @SerialJob should be part of the Job metadata
- Reorg JobFuture hierarchy HOT 1
- Refactoring to classic module layout
- Upgrade Consul client to 1.5.3
- Unify job decoration approach
- Package reorg
- Add job dependencies to the JobMetadata
- Unify configuration of jobs and groups
- Distinguish between repeating and unique jobs in job graphs
- ExecCommand status reporting: "message: null"
- NPE during registry startup when a job with dependencies delcares params
- Refactor JobModule into two module classes within the same jar
- bootique-job: remove optional dependency on curator ZK client
- TriggerFactory should create a mutable parameters map
- Upgrade Spring to 5.3.34
- Jobs as lambdas
- Align job result API with Bootique "CommandOutcome"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootique-job.