-
Notifications
You must be signed in to change notification settings - Fork 69
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
Feature: Additional Note attributes #544
base: master
Are you sure you want to change the base?
Conversation
Update description of `region`, `position` and `geohash` to clarify the use of `region` in addition to `position` and `geohash`
…llow all to be present.
…definition. Changed `published` to `draft` for clarity.
I am very keen for this PR to be adopted, as its absence is currently holding up my project. I can live with all the changes in the current PR. There are two open suggestions above which I’ve commented on. |
So two remaining questions:
|
With regards to |
Not to me. |
Something to consider: are some of the use cases and additions here specific to this @irandrews 's use case or are they generic? Not everything has to be in the specification from day zero, we can write software that extends Signal K, figure out the details with field use, maybe redo some of the stuff and then expand the specification. Naturally there is no specification for everybody to refer to. But often additions created from a purely theoretical standpoint don't stand the test of real use, or need to be extended anyway to be usable. |
For "use case" specific attributes is it maybe worth considering a mechanism to provide Since GeoJSON is used in a number of resources it's kind of already in place. |
Having a generic, non note specific method to represent access is something to consider, but we don't have one at this stage. I disagree with adopting the Unix access model wholesale. Some of the features are not relevant without further specification:
Even if we'd adopt the model as a whole we would still have to define the format to present this data in the API. I don't think encoding this in numbers or strings the way Unix-like utilities intended for human use makes sense, as programmatic access would require an extra step to interpret what the value means. Again even if we'd adopt the model in the future as a whole there is nothing stopping us from providing an application developer friendly, backwards compatible way to this information: what if we add |
I was about to add something about generic key-value pairs for use case specific values, but Adrian beat me to it. I think it would be a good idea. Already discussed in #539. Call them |
Definition for
|
As Ive said before unix style permissions arent perfect but they have stood the test of time and are already in the spec. As always it can be implemented by a server any way that suits, this is just a rendition of the permissions for sharing. AFAIK key level security is not implemented in node server, but it is in the artemis server. I learned a lot about the issues and problems involved, and parsing them at high speed. Simply put, it works for our needs. In application it works exactly the same as a Linux filesystem in what you can see and do. The use of BTW its |
Seems we need a 'published' flag. Should that be |
…key/value pairs. Removed `readOnly` and `draft` properties.
I have made the following changes..... So now |
I think the permissions issue is so important it deserves more thought and its own PR. owner/group/world may have a role to play in the context of, say, SignalK being used to crowdshare weather or navigation data, (with other boats or chart/met suppliers) but I don't think a discussion about notes is the right place to make the decision. |
Security was argued over endlessly in the past, the _attr is already in the spec. It doesnt need revisiting. Security and access to paths is critical to a viable server (at scale) but you cannot control the data once it leaves your servers. Look at the whole DRM mess, it just doesnt work. Remember the implementation of security is internal to the server, you can do it anyway you want. So the only need for
Before you flame me yet again consider how the I login to your server, load the note, see the Try this using the artemis server and the author ( If you really cant see past |
I don't mind how its done, but the purpose of the read/write flag on a note is to tell the client whether to put an 'edit' button on the screen next to the note. |
..one use for the |
Unless I am reading it wrong, it appears that there are no further changes required. |
Some clarifications, I hope:
I think the best course of action here is that for the use cases at hand we adopt Personally I am not too crazy about using unix command line numeric representation in an API that is supposed to be self documenting and obvious to the most casual observer, but it is one commonly understood way to do this. As Rob says it is just way to communicate the permissions - we have no Signal K API to modify the permissions. Further down the line we should clear the ambiguity related to That said this PR is mergeable to me. |
Sorry, I was a bit hasty saying that this is in mergeable status. I was only reading the discussion, not the actual schema files. Three problems:
@panaaj sorry about change request this late in the game - mea culpa. |
Now that I wrote |
I found this regarding the JSON schema and object properties:
So it seems to be valid but I could add |
The way I view I think it notes with multiple groups might be over-complicating it a little but happy to be wrong! I'm happy to draft something to show how notes can be used which will possibly clarify things.. (btw that is the motivation behind #541) |
Also thinking if a note needs to be related to a position, area or region should the schema include a
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This excludes notes that are not connected to geography. Why would we want to have everything tied to geography?
So then it is OK for a note not to be connected to anything (position, geography, group, another resource, signalk path), basically just a I have no problem with this.... it's just that notes generally relate to something. |
…urn notes to being geo-location independent.
I have completed the following:
Is there anything else required to finalize this PR to be merged? |
This PR looks to address Notes schema limitations outlined in Issue #539 (@irandrews)
The current Notes schema facilitates the following:
/resources/regions
Although
position
,region
andgeohash
are not defined asoneOf
they are described as alternatives to each other. This implies that one can not define a Note at a specific location within aregion
.Therefore the scenario where the area of a region is:
is not specifically supported with the current definitions.
Additionally there is no way to:
To facilitate these scenarios the following changes are proposed:
region
to be defined as additional toposition
orgeohash
position
andgeohash
to be defined as only being alternatives to each otherAdd a
group
attribute to allow the definition of a group or collection to which the Note belongsAdd an
author
attributeAdd a
readOnly
attribute to show whether the content of the Note is permitted to be changed.Add a
published
attribute, to show whether a Note is available to other Signal K servers or services.Adding these additional attributes would:
Facilitate the retrieval of notes that are part of a specific
group
by supplying the relevant parameter to/resources/notes?group=<group_name>
(as proposed in PR feature: Add Resources section #541).Identify the author of a Note.
Identify a Note as non-editable.
Identify a Note as available outside of the host Signal K server.