[SAGA-RG] Timeout exception in SAGA?

Andre Merzky andre at merzky.net
Thu Nov 19 06:32:49 CST 2009


Hi Mathijs, 

I put that on the list, maybe others have feedback.

Summary so far:  You see an inconsistency:

  - methods which have a timeout value usually don't throw on a
    timeout (like: wait simply returns after timeout)

  - two exceptions so far:
    - stream::server.serve (timeout) 
      throws Timeout if no client connected while waiting
    - close(timeout)/cancel(timeout) calls throw NoSuccess after
      that time if resources could not be released

My opinion:

Given that the close/cancel timeouts are less frequently used, those
exceptions should probably be changed to TimeOut, to be in sync with
stream::server.serve().  I don't think we can get rid off with the
exceptions for the three listed calls altogether, at least not
without changing semantics.

Cheers Andre.


Quoting [Mathijs den Burger] (Nov 19 2009):
> Subject: Re: Timeout exception in SAGA?
> From:    Mathijs den Burger  <mathijs at cs.vu.nl>
> To:      Andre Merzky        <andre at merzky.net>
> Date:    Thu, 19 Nov 2009 13:13:41 +0100
> 
> On Wed, 2009-11-18 at 21:50 +0100, Andre Merzky wrote:
> > Quoting [Mathijs den Burger] (Nov 18 2009):
> > > On Tue, 2009-11-17 at 23:36 +0100, Andre Merzky wrote:
> > > > Hi Mathijs, 
> > > > 
> > > > Quoting [Mathijs den Burger] (Nov 17 2009):
> > > > > 
> > > > > Hi Andre,
> > > > > 
> > > > > Page 23 of GFD.90-plus-errata says (in the section on "Freeing of
> > > > > resource and garbage collections"):
> > > > > 
> > > > > "Methods whose semantics depend on successful or unsuccessful de-allo-
> > > > > cation of resources (such as task.cancel() or file.close()) allow for
> > > > > an optional float argument, which defines a timeout for this operation
> > > > > (see Section 2.6.3). If resource de-allocation does not succeed within
> > > > > this timeout period, a NoSuccess exception MUST be thrown."
> > > > > 
> > > > > Shouldn't that be a 'Timeout' exception instead?
> > > > 
> > > > The 'Timeout' exception usually implies that communication with a
> > > > backend is delayed, and that there is a chance that the operation
> > > > may succeed later on (see description of TimeOut exception).  This
> > > > does also hold for close() and cancel(), which can throw TimeOut in
> > > > fact, and can be retried.  This exception is independent from the
> > > > timeout parameter though!  All calls which *do* have a timeout
> > > > parameter do *not* throw TimeOut when that time has passed, but
> > > > simply return (no error).  
> > > 
> > > But the notes of the stream_service.close() call say:
> > > 
> > > "if no client connects within the specified timeout, a 
> > > ???Timeout??? exception is thrown."
> > > 
> > > I'm confused... :)
> > 
> > Me too! ;-)  Let me check that stuff again, will answer later...
> 
> Do you have time to reply soonish?
> 
> Reason: we're current writing an XtreemOS document that includes a SAGA
> extension package in which we also have an object with a serve() call.
> I'd like it to mimic stream_service.serve(), but I'm hesistating because
> it seems inconsistent with the rest of the spec.
> 
> The problem is that the description of the Timeout exception does not
> prescribe what should be the return value of a non-void method when the
> timeout value is exceeded. The method stream_service.serve() could, for
> example, return NULL. Still, it seems that throwing a Timeout exception
> is more logical.
> 
> -Mathijs
> 
> 



-- 
Nothing is ever easy.


More information about the saga-rg mailing list