JPPF, java, parallel computing, distributed computing, grid computing, parallel, distributed, cluster, grid, cloud, open source, android, .net
JPPF

The open source
grid computing
solution

 Home   About   Features   Download   Documentation   On Github   Forums 
November 17, 2019, 12:29:52 AM *
Welcome,
Please login or register.

Login with username, password and session length
Advanced search  
News: New users, please read this message. Thank you!
  Home Help Search Login Register  
Pages: [1]   Go Down

Author Topic: Attach to running job  (Read 2283 times)

brian

  • JPPF Master
  • ***
  • Posts: 46
Attach to running job
« on: September 21, 2016, 04:41:41 AM »

Can a JVM which did not submit a job attach a JobListener to a currently running job and get JobEvent callbacks? I'm thinking of cases where I'd like the client who submits the job to die immediately, and have another process do the monitoring.
Thanks.
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2256
    • JPPF Web site
Re: Attach to running job
« Reply #1 on: September 21, 2016, 07:01:23 AM »

Hello,

Quote
Can a JVM which did not submit a job attach a JobListener  to a currently running job [...]?

Unfortunately, this is not possible. There are  two ways to monitor a job that was not submitted locally:
  • using the related management APIs
  • or, more conveniently, with the job monitoring API which provides a more consistent object model and event listener mechanism. This is the API used by the administration console to monitor jobs
Sincerely,
-Laurent
Logged

brian

  • JPPF Master
  • ***
  • Posts: 46
Re: Attach to running job
« Reply #2 on: September 22, 2016, 12:52:27 AM »

Hi Laurent,

Ok, I think there is a feature request brewing here! My clients who submit jobs are unreliable. They often run on machines which are automatically rebooted over the weekend. A client bouncing should not mean that the task results are no longer available to be processed!

One option would be allowing re-attach, where a client process can bounce and re-attach to running jobs with a JobListener, fetching their task results. This sounds a bit complicated to get right.

I think a better option would be providing support for a job to be submitted with a JobListener, allowing client to submit the job+listener then exit. The highly available JPPF driver would ensure the listener is invoked for each task, just as it does for clients which don't detach. Your JobDependencies sample exhibits somewhat similar behavior, but (a) it's not based on builtin API and (b) results are not provided to downstream jobs. So it doesn't quite work. Letting the client submit a listener would be great. It reminds me of MapReduce, where this submitted listener is like a reducer, so I guess could fit under issue JPPF-7.
Logged

brian

  • JPPF Master
  • ***
  • Posts: 46
Re: Attach to running job
« Reply #3 on: November 05, 2016, 07:37:50 PM »

Hi,
Have you had a chance to consider these ideas?
Thanks.
Logged

brian

  • JPPF Master
  • ***
  • Posts: 46
Re: Attach to running job
« Reply #4 on: March 15, 2017, 03:12:24 PM »

Hi,
Have you had a chance to consider these ideas?
Thanks.
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2256
    • JPPF Web site
Re: Attach to running job
« Reply #5 on: March 16, 2017, 05:46:32 PM »

Hello,

Can you please take a look at this feature request, and comment if you have any feedback: JPPF-480 Jobs persistence in the driver. I believe this covers the case of a client re-attaching to a job.

As to a job listener/callback that a driver can call, I willl investigate as to a possible ad-hoc solution that can be implemented as a sample in the 5.2 branch, then as a built-in API in 6.0. As far as I can see, it is not doable as a built-in feature in 5.2 without breaking compatibility.

-Laurent
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2256
    • JPPF Web site
Re: Attach to running job
« Reply #6 on: March 19, 2017, 08:49:15 AM »

Hello,

I have created an enhancement request for a job listener available to the driver, which should satisfy your requirements: JPPF-494 Extend the driver's JobTaskListener facility. Would you mind taking a peek and let us know if this would work for you?

This approach is not very disruptive (it will only break exisiting implementation of this plugin and its just a matter of adding an empty method to the listener), so it can be delivered in the next maintenance release v5.2.6.

Thanks,
-Laurent
Logged

brian

  • JPPF Master
  • ***
  • Posts: 46
Re: Attach to running job
« Reply #7 on: April 05, 2017, 08:31:20 PM »

Thanks for your feedback. I think 494 would solve my problem. With it, I would not need 480 too, clients would fire and forget, letting jppf exec the "continuation".
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2256
    • JPPF Web site
Re: Attach to running job
« Reply #8 on: April 07, 2017, 08:15:46 AM »

Great! You're invited to give it a try, as it was released earlier this week in v5.2.6.

-Laurent
Logged
Pages: [1]   Go Up
 
JPPF Powered by SMF 2.0 RC5 | SMF © 2006–2011, Simple Machines LLC Get JPPF at SourceForge.net. Fast, secure and Free Open Source software downloads