Thanks a lot, your explanation helped me understand differences between jobs and services. I guess that "API - Quickguide" section of https://renderjs.nexedi.com/ could also include such description. Explaining that jobs are supposed to be called by parent gadgets and that calling a job will cancel the current running job if it was already running.
A service is launched after the gadget is added in the page and stopped only when the gadget is removed from the page
Just to be sure I understand correctly "launched" and "stopped" in that sentence: The function passed to declareService will be called when the gadget is added to the DOM. This function must return a (patched for cancellation support)RSVP.Promise and this promise will be cancelled when the gadget is removed from DOM. Is it ?