RE: How to differentiate between multiple Operations which use the same HTTP Action

On Wednesday, April 23, 2014 8:32 PM, Thomas Hoppe wrote:
> On 04/23/2014 05:52 PM, Markus Lanthaler wrote:
> > On Wednesday, April 23, 2014 4:38 PM, Thomas Hoppe wrote:
> >> So on the server side you are forced to distinguish two GET based
> >> requests. The only way is to consider the request body.
> >
> > Uuhhh... I would really urge you to use a different method. You will
> > probably run into heaps of problems if you use a GET with a request body
> > (even though it is not explicitely disallowed). Why don't you use a PUT
> > instead?
>
> I know that it is very uncommon, but we should have
> this discussion, just to illuminate another edge case.

Sure


> Generally speaking I think the state of the current REST API querying is
> pretty undeveloped yet
> if we take RDBMS as benchmark of what should be possible.

The thing ist hat you don't want to offer these things on the (open) web as
they are extremely costly run. For a long time, SPARQL and federated queries
were considered the panacea. As it turns out, it is impossible to operate
SPARQL endpoints reliably. It's quite trivial to construct a query that
brings your server down. The Web was heavily optimized for coarse-grained
interactions in order to increase cache-hit rates. This allows you to scale
easily and reduce your operation costs considerably. In my opinion, very
rudimentary query interfaces on the server are more than enough. If you want
something more sophisticated, retrieve the relevant data (and probably a bit
more) from the server and query it locally. That's why I'm so enthusiastic
about Ruben's Linked Data Fragments work.


> There should be a common practice (which is not related to hydra) for
> the case, no matter what querying language you use.
> Although theoretically possible, using PUT does not feel natural for
> data querying I think.

I agree. To most people, a POST would probably feel better but then you lose
impotency which may, or may not, matter.


--
Markus Lanthaler
@markuslanthaler

Received on Thursday, 24 April 2014 14:39:47 UTC