IPP Mail Archive: Re: IPP> NOT - Issue 1 - Add Subscription object?

IPP Mail Archive: Re: IPP> NOT - Issue 1 - Add Subscription object?

Re: IPP> NOT - Issue 1 - Add Subscription object?

Michael Sweet (mike@easysw.com)
Fri, 30 Jul 1999 08:29:25 -0400

Hugo Parra wrote:
> ...
> <HParra> I think (a) works well. (b) has the problem that it's
> done after the job has been created and runs the risk of missing

That's why a user can request notifications when the create-job,
print-job, or print-uri operation is done.

> relevant events. (c) presents the following challenges: there's
> no way to tell the printer what job to associate the subscription
> with since no job-id has been generated. How does the printer

Sigh... The create-job, print-job, and print-uri operations will
have added operation attributes to address this, either by specifying
a subscription ID or the notification attributes to create a new
subscription automatically.

> differentiate this subscription from an (a) subscription so that
> it doesn't start generating events until a job-to-subscription
> association is made? Also, what happens if the same suscription
> id is used with more than one subsequent job creations. How do

Each subscription will be associated with a single printer or job
object. There has been discussion of "subscription sets" that would
allow a subscription to be associated with more than one object
and/or set of conditions, but my feeling is that most people don't
want to add this complexity, especially since the client is free to
create additional subscriptions that do the same thing.

As for the case where the user sends another job that is associated
with an already assigned subscription, I don't think we've discussed
this possibility yet. My personal feeling is that reusing the
subscription ID should probably not be allowed, but we could also
treat it as a special renew operation that also changes the
subscription.

> we clean up subscriptions that are never associated with a job?

First, subscriptions have a "lease" time, which means that after a
certain amount of time the subscriptions are automatically expired
(cancelled.) Once a subscription is tied to a job, however, the
subscription will remain alive until the job is cancelled or
completed.

> What happens if a subscription is removed before the job

When the subscription is cancelled the user no longer gets
notifications.

> completes? Does the subscription go away automatically when the

As noted above, subscriptions that are tied to a job are cancelled
when the job is completed or cancelled.

> job is removed? I think it should. Keeping subscriptions and
> job objects in sync can be pretty involved.
> ...

We've already done some preliminary design work to work notifications
and subscriptions into CUPS 1.1, and the code to manage such things
is not all that complicated.

> <HParra> There has to be a way for end-users to request
> notification of events that are related or directly affect their
> jobs and nothing else.

Then they just subscribe when they send the job, so the subscription
applies to the job. Or they can do a create-subscription operation
and supply the subscription-id attribute with the job creation
operation.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products                  mike@easysw.com
Printing Software for UNIX                       http://www.easysw.com
    "Your logic is impeccable, Captain.  We are in grave danger."