Skip to content
This repository was archived by the owner on Apr 13, 2020. It is now read-only.

server does not publish uuid to 'self' property #29

Closed
ph1l opened this issue Oct 26, 2016 · 10 comments
Closed

server does not publish uuid to 'self' property #29

ph1l opened this issue Oct 26, 2016 · 10 comments

Comments

@ph1l
Copy link
Contributor

ph1l commented Oct 26, 2016

as specified here: https://github.com/SignalK/specification/blob/master/schemas/signalk.json#L12, a signalk server shoud publish the self propery containing the uuid of the vessel on which the server is running.

@ph1l
Copy link
Contributor Author

ph1l commented Nov 5, 2016

Exception: More than one vessel present, and no self published...

@rob42
Copy link
Contributor

rob42 commented Nov 11, 2016

The current server publishes all data in the vessels.* subtree, so it will avoid self if its in the root. Not sure how it would do that in a delta. @tkurki ? It can easily be added to the full format but thats not often used....the value is available in the hello message, which was the first message sent on connection

{"self":"urn:mrn:signalk:uuid:6fb32f5b-7bd3-47a6-9e41-032a15faca55",
    "version":"v1.0.0",
     "timestamp":"2016-11-11T22:45:38.459Z"
}

@tkurki
Copy link
Member

tkurki commented Nov 12, 2016

I think the main use case for this is being able to retrieve self id explicitly via http for whatever purposes one might need it.

Fixed this in Node server SignalK/signalk-server#111

Not sure how it would do that in a delta.

Didn't get this - as I see it this is about full & http api, not delta.

@ph1l
Copy link
Contributor Author

ph1l commented Mar 26, 2017

I think my problem here is that the java-server doesn't publish the self property in the rest api.

I start up and load the initial data from the REST API and then fire off a thread to do websocket delta processing. If my background websocket thread hasn't processed the hello message, which actually does require a self property, I am not guaranteed to have a self property, unless I block on seeing a hello message.

should my client block on a hello message? maybe.. to know the websocket is connected, ne?

@ph1l ph1l closed this as completed Mar 26, 2017
@ph1l ph1l reopened this Mar 26, 2017
ph1l added a commit to ph1l/python-signalk-client that referenced this issue Mar 26, 2017
this insures we have had a chence to get the self value from the
signalk java server. It doesn't publish a self property in the reset
API.

SignalK/signalk-server-java#29
@tkurki
Copy link
Member

tkurki commented Mar 26, 2017

Well, I think that the spec says (a bit amibiguously maybe) that the rest api should provide self: http://signalk.org/specification/master/keys/#self

Here the appropriate action would be to add this functionality to the java server.

I think that with every move we should move towards more spec compliance and less towards workarounds for specific server implementation details.

And I am not saying that Node server is 100% compliant, just that this should be the general direction.

@sumps
Copy link

sumps commented Mar 26, 2017

We have already added a Hello in iKommunicate Deltas when a socket is opened and will be adding the RestAPI self call as well but it is not implemented yet.

@sumps
Copy link

sumps commented Mar 26, 2017

We agree that work arounds should be avoided and will do our best to get iKommunicate spec compliant ASAP

@ph1l
Copy link
Contributor Author

ph1l commented Mar 26, 2017

Well, to be fair, the spec does not mark self as required. So, technically, this does not break compliance with the spec.

ph1l added a commit to ph1l/python-signalk-client that referenced this issue Mar 26, 2017
this insures we have had a chence to get the self value from the
signalk java server. It doesn't publish a self property in the reset
API.

SignalK/signalk-server-java#29
@rob42
Copy link
Contributor

rob42 commented Mar 26, 2017

I will add it to the REST API

@rob42
Copy link
Contributor

rob42 commented Apr 3, 2017

Added in JIT-DEPLOY-34

@rob42 rob42 closed this as completed Apr 3, 2017
rob42 added a commit that referenced this issue Apr 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants