> The ZeroMQ XRAP spec has nothing to do with RestTL, just to be clear. Well, other than the fact that the words are lifted almost verbatim? The design of the pieces I'm interested in here is essentially the same. Public, private resources, URI form etc. I only mentioned RestTL because I was hoping it might have provided some background
But what if I wanted albums to be public resources too? What would GET /music then return? Playlists or albums? Surely it would be more natural to have GET /music/playlist and GET /music/album as appears normal "resource oriented" practice? -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Pieter Hintjens Sent: 15 October 2015 11:32 To: ZeroMQ development list <[email protected]> Subject: Re: [zeromq-dev] Listing public resources in the XRAP Resource model The ZeroMQ XRAP spec has nothing to do with RestTL, just to be clear. Different generations of the same design over different transports. To answer your question, I guess you'd fetch a URN like /music, and it'd return all public objects. The goal is, indeed, to avoid magic URNs except at the root level. On Thu, Oct 15, 2015 at 12:18 PM, Tom Quarendon <[email protected]> wrote: > I’ve a few questions about the resource model described in the XRAP > rfc (and related RestTL), to clarify my understanding if that’s OK? > > > > First, a couple of statements. The following is true? > > The URNs of public resources are (can be) known, a client has (can > have) a priori knowledge of them, and the client is allowed, intended, > to construct those URNs. These URNs represent the “roots”, the “entry > points” if you like. A client is supposed to know in advance what > public URNs they want to access. However a client can also follow > links to get to other public resources, it is not necessarily the case > that all links point to private resources. > > Private resources, by definition, can only be discovered by following > an href link from a public resource. However not all links would point > to private resources. > > > > How do I list public resources? So in the example in the RFC, how > would I get a list of the play lists? My suspicion is that you are not > supposed to, that that’s not the intention. That is, I don’t think > that the intention is that I do a GET on /music/playlist in the naive > way. I suspect my question indicates a basic lack of understanding. > > > > So how would I get a list of the playlists? If I want to do that, is > there some other public resource that I have to request instead? Not > sure what that would be though. /music/collections/playlists? That > wouldn’t work presumably because different resources under > /music/collections would have different schemas. > > > > I think I understand the intention of the public/private division, in > terms of forcing clients to follow links and not construct URNs, I’m > just struggling to apply it to things like collections and child > resources (where a child is existentially dependent on a parent). > > > > Clearly I *could* design my resource model in any way I choose and > still use the XRAP protocol to access it. My suspicion is that the > intention of the resource model is to lead you to a design that is > “Richardson Maturity Model level 3” (i.e follow links, rather than > construct URNs), rather than level 2, and I’m wanting to understand > how to apply that to try and understand the advantages that it might bring. > > > > Any clarification would be excellent! > > Thanks. > > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
