[Registry-dev] Extensible search API - coming back

Sanjiva Weerawarana sanjiva at wso2.com
Wed Sep 26 12:13:21 PDT 2007


Paul Fremantle wrote:
> 
>  From an APP perspective, a query is a read-only collection - correct? 
> (I can't post a new entry to a query is what I mean by read-only). So in 

I'd rather not go APP crazy either. We're talking about a URI .. forget 
APP against that for a second. Doing a GET on it returns something .. a 
representation of it. That's it.

> other words from a pure APP/REST perspective, I think the following is 
> true.
> 
> To create a query, I post a new thing to an existing collection (e.g. 
> /users/paul/queries). The thing has a content-type of whatever we define 
> for queries. Our registry now auto-creates a "query collection" based on 
> that. Now if I GET the returned Location, I get back a collection 

Interesting .. so your view of executing a query is to just GET the query 
resource URI.

> dynamically formed by executing the query - correct? So I think the 
> above is correct - the interface should be
> 
> public Resource executeQuery(String queryPath, Object[] parameters)
> 
> Maybe the query parameters should all be Strings? Since basically we are 
> going to pass them as ?a=b&c=d&e=f I assume on the end of the URL.

Then we don't even need this API- we can simply say do a get(String 
queryPath) .. just form a path with query params etc. and execute it.

No that's not right.

I think we need to be careful to separate the Java API from the REST API. 
For Java, I think your API is correct. For REST, basically this approach 
means there's no special API to execute a query- simply GET the query 
resource's URI, possibly with query parameters.

I like it!

Sanjiva.
-- 
Sanjiva Weerawarana, Ph.D.
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
email: sanjiva at wso2.com; cell: +94 77 787 6880; fax: +1 509 691 2000

"Oxygenating the Web Service Platform."



More information about the Registry-dev mailing list