GithubHelp home page GithubHelp logo

Comments (7)

Gaudon avatar Gaudon commented on September 25, 2024

Was this ever added? I presume to have a job ready to fire but be triggered externally by another web service for example.

from dropwizard-sundial.

timmolter avatar timmolter commented on September 25, 2024

Not yet, sorry. You could try programmatically creating a SimpleTrigger with repeat set to -1, which will fire only once.

from dropwizard-sundial.

Gaudon avatar Gaudon commented on September 25, 2024

Yeah it would be a very useful feature to have.. in the case of scaling infrastructures I would like to avoid having 'n' number of instances running the same jobs in parallel / at all. Instead, I'd like to have an external trigger hit the web api to launch the job on a single instance that may be passed the request through something like a router / load balancer.

from dropwizard-sundial.

timmolter avatar timmolter commented on September 25, 2024

In case you didn't see it and it's useful, if you set concurrency = false, then only one instance of the job will run.

from dropwizard-sundial.

Gaudon avatar Gaudon commented on September 25, 2024

I did see that setting, but in this case the same source / compiled code is deployed on additional scaling instances without any knowledge of one another (from the code's perspective). Considering this, I don't believe the concurrency feature is applicable to my use case.

I'm thinking of the case where a front end load balancer is serving X number of servers, all running the same code, which all contain the same sundial jobs. Externally a job request comes in (with a token) through the load balancer and is handed off to any single instance (usually the one with the least load) with instructions / credentials to execute a given job (such as a maintenance routine) on a common database between all instances.

from dropwizard-sundial.

timmolter avatar timmolter commented on September 25, 2024

you could try quartz, as it's been designed to run across multiple machines. the job statuses are coordinated via a central DB.

from dropwizard-sundial.

Gaudon avatar Gaudon commented on September 25, 2024

I've heard of Quartz, but Sundial just seemed "better" hah. But with that being said I'll look into it and see if it fits my use case any better.

Cheers.

from dropwizard-sundial.

Related Issues (15)

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.