projectodd / wunderboss

The next-generation polyglot platform for TorqueBox and Immutant
Apache License 2.0
17 stars 11 forks source link

Clustered Quartz #9

Open prepor opened 9 years ago

prepor commented 9 years ago

Hi!

Are you going to support durable and clustered Quartz JobStores for scheduling?

tobias commented 9 years ago

We would like to, but don't have a concrete plan at the moment. The big hurdle is being able to serialize the job itself - that's difficult to do with block-based jobs in TorqueBox or the functions that may capture lexical scope in Immutant. One approach may be to place restrictions on jobs that will be stored, but we haven't looked at it too deeply. If we did support it, we would probably also provide an Infinispan-based JobStore for you to use in addition to existing JobStores.

prepor commented 9 years ago

I think it can be reasonable to make less "sexy" but more simple API without blocks and functions, only with simply serializable things like class name + method name + args and var name + args.

Anyway, there are some ways to serialize clojure's even anonymous fn with context. See https://github.com/nathanmarz/cascalog/blob/develop/cascalog-core/src/clj/cascalog/logic/fn.clj#L51

It also will be cool to have explicit way to start services like scheduling and pass to it context for all jobs. This makes possible Reloaded Workflow (https://github.com/stuartsierra/component) :)

tobias commented 9 years ago

Yes, adjustments to the API (like allowing a class that provides a run() method in addition to a block in TorqueBox) are what we've talked about to support this. Would you mind filing a jira on Immutant (https://issues.jboss.org/browse/IMMUTANT) requesting JobStore support?

For component support, are you wanting a way to stop/start the scheduler without having to unshedule the jobs? Can you file a jira for that as well?