On Wed, Jun 30, 2010 at 12:39 AM, Don Werve <d...@madwombat.com> wrote:
> 2010/6/27 Jason Chaffee <jchaf...@ebates.com>
>
>> The solr docs say it is RESTful, yet it seems that it doesn't use http
>> headers in a RESTful way.  For example, it doesn't seem to use the Accept:
>> request header to determine the media-type to be returned.  Instead, it
>> requires a query parameter to be used in the URL.  Also, it doesn't seem to
>> use return 304 Not Modified if the request header "if-modified-since" is
>> used.
>>
>
> The summary:
>
> Solr is restful, and does a very good job of it.

I'm not so sure...

> The long version:
>
> There is no official 'REST' standard that dictates the behavior of the
> implementation; rather, REST is a set of guidelines on building APIs that
> are both discoverable and easily usable without having to resort to
> third-party libraries.
>
> Generally speaking, an application is RESTful if it provides an API that
> accepts arguments passed as HTTP form variables, returns results in an open
> format (XML, JSON, YAML, etc.), and respects certain semantics relating to
> HTTP verbs; e.g., GET/HEAD return the resource without modification, DELETEs
> are destructive, POST creates a resource, PUT alters it.
>
> Solr meets all of these requirements.

With fairly limited knowledge of Solr (I'm a lucene user), I'd like to
offer an alternate view.

- Solr seems to violate the hypermedia-driven constraint.  (e.g. it
seems not to be hypertext driven at all) [1]

- Solr seems to violate the uniform interface constraint and the
identification of resources constraint.(E.g. by having "commands" in
the entity body instead of exposing resources with state that is
manipulated through the standard methods and, I gather, overloading
methods instead of using standard ones (e.g. deletes).

I'd conclude Solr is not RESTful.

The representation argument is a bit of a red-herring, btw.  Not using
Accept for conneg isn't the problem, using agent-driven negotiation
without being hypertext driven is [from a REST pov].

--tim

[1] - http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven

Reply via email to