[SAGA-RG] Service Discovery spec updated at last ...

Andre Merzky andre at merzky.net
Thu Dec 18 16:19:48 CST 2008


Quoting [Steve Fisher] (Dec 18 2008):
> 
> >> I would like to be consistent - however the url here is not a string
> >> but a SAGA URL object - so it cannot have a default value of "".
> >
> > Basically, it means that the URL would be created by giving
> > an empty string to the URL's constructor.
> >
> > Thus
> >
> >  object (saga::url u = "");
> >
> > is a short form for
> >
> >  object (saga::url u = saga::url (""));
> >
> >
> >
> >> Whatever syntax is appropriate for an optional session parameter is
> >> also good for an optional url parameter.
> >
> > Well, we describe the session parameter default explicitely
> > in section 3.5.2 in the Core spec, but we do not describe it
> > for other parameter types anywhere, in particular not for
> > URL.
> 
> This discoverer class should have has the same constructor as the
> job_service. Where the spec says:

Exactly!


> CONSTRUCTOR (in session s,
> in url rm = "",
> out job_service obj);
> 
> However the Java interface has got 3 "constructors" in the job factory
> with arguments:
> 
> (session, url)
> (session)
> ()
> 
> I want the Java API to be like this but, for convenience,  with the addition of:
> 
> (url)

Sure, but that is a language binding issue.  And again, that
probably should follow the language binding for the
job_service, although I do not know how that is rendered in
Java at the moment.


> I am happy to express this in the spec with a single constructor with
> 2 optional arguments - so our *only* concern is the precise notation.
> I don't want to rely upon people having read section 3.5.2 of the main
> spec to appreciate that session parameters are always optional and I
> don't like a notation which implies using a url from the default
> constructor being used to represent a default url.

I added an explicit reference to section 3.5.2 and 2.2.2 of
the core spec, where the handling of session, and of other
default parameters, is descibed in some detailed.

2.2.2 says that default parameters are to expressed in the
language bindings in a way native to the languge, and should
give you enough freedom for Java.

With that, is the notation precise enough for you?

Best, Andre.

------------------------------------------
    - CONSTRUCTOR
      Purpose:  create a new discoverer object
      Format:   CONSTRUCTOR     (in session session,
!                                in url url = "",  
                                 out discoverer dis);
      Inputs:   session:         session handle 
                url:             URL to guide the implementation               
      Outputs:  dis:             new discoverer object
      Throws:   NotImplemented
                IncorrectURL
+               DoesNotExist
+               AuthorizationFailed
+               AuthenticationFailed
+               TimeOut
                NoSuccess
      Notes:    - the url specified as in input parameter is to
                  assist the implementation to locate the 
                  underlying information system such that it 
                  can be queried.
+               - if the url is syntactically valid, but no 
+                 backend service can be contacted at that URL,
+                 a 'DoesNotExist' exception is thrown.
+               - the semantics for the other exceptions is as
+                 outlined in the SAGA Core API specification.
+               - note that the session parameter is optional,
+                 as described in the SAGA Core API
+                 specification, section 3.5.2.  Also Section 
+                 2.2.2 of the same document applies to 
+                 url and its default value.
------------------------------------------



-- 
Nothing is ever easy.


More information about the saga-rg mailing list