Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for semantic descriptor options #8

Open
fosdev opened this issue Nov 4, 2013 · 8 comments
Open

Support for semantic descriptor options #8

fosdev opened this issue Nov 4, 2013 · 8 comments
Assignees

Comments

@fosdev
Copy link
Contributor

fosdev commented Nov 4, 2013

I think the idea of values (options) for a descriptor is an idea that I think should be in ALPS vs. an extension like https://github.com/alps-io/spec/blob/master/draft-00.txt#L978. One could then have a profile for that information, etc.

I think ALPS reflects everything one could expect for understanding a profile except for being aware that there is some constrained list of values for a descriptor associated with one.

@mamund
Copy link
Member

mamund commented Jan 25, 2014

we discussed this a while back when i was in SF. adding a constraining list to a description (ala HTML.SELECT) sets that constraint for every server that ever wants to implement that profile. that's too much. however, i could see how individual implementors may need to have constraints of this type in order to actually create a single implementation of the profile.

so... how can we make it possible for the ALPS document to remain the same when individual implementations need local constraints? One way to do this would be to have something in the profile (like a "well-known" URL) that points to the configuration details or constraint details for this profile.

maybe we just need a new link rel value (++) defined that can be shipped along with the profile link (two links, two rels)

REQUEST
GET /service-root/ HTTP/1.1
...

RESPONSE
200 OK HTTP/1.1
Content-Type: application/alps+xml
Length: XXXX
Link: <http://alps.io/profiles/accounting>; rel="profile";
<http://example.com/amundsen/accounting/config>; rel="config";
...

other ideas? maybe this is just out-of-scope for the first release.

@ghost ghost assigned mamund Jan 25, 2014
@fosrias
Copy link
Contributor

fosrias commented Feb 15, 2017

@mamund So, in the recent google group discussion, it got my wheels turning about this topic again. It seems to me that options are semantics too and could possibly be used reused elsewhere, so they are probably better as descriptors than values in an ext element.

Not sure I have gotten all the way there, but the following is grappling with an idea.

<alps version="1.0">
  <descriptor id="color" type="semantic" rt="#colors"/>
  <descriptor id="blue" type="semantic"/>
  <descriptor id="red" type="semantic"/>
  <descriptor id="colors" type="enum">
    <descriptor href="#blue"/>
    <descriptor href="#green"/>
  </descriptor>
</alps>

Here notice introducing a type enum that indicates a list. We could add metadata or other info using ext value property on the individual color descriptors.

I debated adding an enum="#colors" property to a descriptor vs rt="#colors" but given rt currently is only scoped to transitions, I thought it might make sense to extend that to semantic descriptors as what you MAY get for that value or SHOULD/MAY use for that value.

I think we could add something along these lines as a MAY so we don't force every API to use that list, but then this makes for an easy way to extend the profile at runtime possibly using something like:

<descriptor href="#color" rt="#my-colors"/>

Make any sense?

@fosrias
Copy link
Contributor

fosrias commented Sep 19, 2020

So, I think this could be solved using an optional data property, e.g. data="enum"

@mamund
Copy link
Member

mamund commented Sep 19, 2020

or `

or <descriptor id="colors" type="semantic" enum="red blue green" />

or

<descriptor id="colors" type="semantic">
  <ext id="colorEnum" type="enum" value="red blue green" />
</descriptor>

note in the last solution, type property is added to the ext element. i think this is an important change we need to do not withstanding this particular change request.

@fosrias
Copy link
Contributor

fosrias commented Sep 19, 2020

@mamund I think type is a good idea and one could get a lot of mileage out of that for data annotations. I think you could also do something like:

<descriptor id="collection", type="safe", rt="contact">
  <ext id="list" type="array" />
</descriptor>

etc.

@mamund
Copy link
Member

mamund commented Sep 19, 2020

Yep. And can help with reuse in general. I'll write up a change for the spec and we can review.

Thanks

@fosrias
Copy link
Contributor

fosrias commented Sep 19, 2020

@mamund I will note that for data annotations, that will get really verbose. And so adding ext to every descriptor would be a pain.

I think or xml this would be fairly verbose, but less so for JSON.

<descriptor ...>
  <ext href="#list-extension />
  <descriptor id="color" >
     <ext href="#colors-enum"/>
  </descriptor>
</descriptor>

Just spit balling, but his might be interesting the ability to ref inline:

<descriptor ext="#list-extension" >
  <descriptor id="color" ext=#colors-enum"/>
</descriptor>

@mamund
Copy link
Member

mamund commented Sep 19, 2020

Not getting it yet but maybe some larger examples will help me. Feel free to write it up and we can discuss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants