Skip to content

Conversation

@sbender9
Copy link
Member

@sbender9 sbender9 commented Sep 20, 2018

See #442 for past discussions on this.

This, like #506 and #505, this brings up the requirement to define the semantics for request/response over WS and other non HTTP protocols. See #508

TODO

@sbender9 sbender9 changed the title feature: PUT Requests [WIP] feature: PUT Requests Sep 26, 2018
@sbender9 sbender9 changed the title [WIP] feature: PUT Requests feature: PUT Requests Sep 28, 2018
@rob42
Copy link
Contributor

rob42 commented Sep 29, 2018

I think this needs some changes.

correlationId should be requestId.

When processing an incoming message its easy to look for update,put, subscribe etc in the body and process that accordingly.
The format here means thats more complex, having to look at the requestId and decide if its a reply etc.

I would use something like:

PUT Request

{
  "context": "vessels.self",
  "requestId": "184743-434373-348483",
  "put": {
    "path": "steering.autopilot.target.headingTrue",
    "source": "actisense.204",
    "value": 1.52
  }
}

Response

{
   "context" : "vessels.self",
   "requestId": "184743-434373-348483",
   "state": "COMPLETED"
   "result" : 200
   "message|percentComplete|etc"
}

The client should already know what they requested, and any changes will have been propagated by updates any way, in fact the following should be valid too (it is in artemis):

{
	"context": "vessels.self",
	"requestId": "184743-434373-348483",
	"state": "COMPLETED",
	"result": 200,
	"updates": [{
		"timestamp": "2013-10-08T15:47:28.263Z",
		"source": "actisense.204",
		"values": [{
			"path": "steering.autopilot.target.headingTrue",
			"value": 1.52
		}]
	}]
}

@sbender9
Copy link
Member Author

@rob42 agreed. I removed the details about the put request from the response.

@fabdrol
Copy link
Member

fabdrol commented Oct 1, 2018

See my notes on #508

@sbender9
Copy link
Member Author

Unless there are an objections, I think this is ready to go.

@tkurki tkurki merged commit 263a433 into master Oct 28, 2018
@tkurki tkurki deleted the put branch October 28, 2018 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants