-
Notifications
You must be signed in to change notification settings - Fork 8
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
Proposal for a way to handle multiple concurrent activations #15
Conversation
How are activation ids allocated? (By the server) Would this mechanism support/be extendable to support queued activations in the future? |
The example response to
Should this still be included or has all the information about pending activations moved to |
/activations is currently information about activations that are going to happen, whereas that would indicate information about the previous activation. |
What do you mean by "queued" in this context? It already supports scheduling activations into the future, is that what you mean? |
Yes, I meant chronologically. Would the idiomatic NMOS approach to this be UUIDs or (uniqued) TAI timestamps? (The usual syntax for the latter is currently ruled out by the regex.) What do we lose by mandating a particular approach (as we do for e.g. Query API subscriptions)?
Ah. It seems a bit odd to me that the response to a POST to create a single activation responds with all the future activations.
I meant multiple changes to the same input or output. I guess it does? If two activations for the same input/output at the same time are requested, is the second one rejected (e.g. 423)? |
The reason I've steered away from using UUIDs is that within NMOS they are usually used to represent system wide identifiers, rather than identifiers within a single API - as would be the case here. Something like hashing the system time would suffice.
I thought what I'd done was that the POST returned with an object with only one entry, which is indexed by the activation ID and contained the activation object created, but looking at the schemas that doesn't appear to be the case. That's the intention, I'll try update the docs so they reflect that!
Ah I see. My intention was that if an Output was already implicated in a staged activation it would be locked, and any attempt to involve it in another activation would cause it to be rejected with a 423. Or things get complicated very quickly... |
Personally, I don't like the inventiveness here. A (e.g. random or time-based) UUID would solve the issue in a consistent manner. (Query API WebSocket subscription is also API-local.)
Thanks!
That certainly makes sense. So each output can appear in at most one activation. With IS-05, because there is a one-to-one relationship between Sender/Receiver and the activation object, when you get a 423 Locked, it's clear what you need to do. That's a bit harder for the client here? |
I'm afraid its not the case, because the activation is now (in current proposal) on "per channel" basis. So there could be many pending (staged) activations for a single "output". I would also prefer the idea to have just 1 staged activation on "per output" basis. |
I think I meant channel: So each channel can appear in at most one activation. But this still applies:
I.e. you have to find which activation includes that channel. |
Would that be the most recent activation? |
The post response needs to contain the activation ID so that the client isn't forced to hunt down the activation ID in order to delete it. The example, at least, doesn't show such an ID. |
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.
The response of GET
on /map
should be updated to
[
"activations",
"active"
]
according these changes.
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.
The schema + example for GET
/map/active
does still contain one single activation object on the root level.
Not sure how to reflect the activation exactly on this endpoint, but I think that needs to be updated as well.
One question about your newest update in 8a03df4 @simonrankine : Here you added in the Activation Requests section:
and futher:
For me this reads like it would be possible to split an audio mapping change request into 2 separate I noticed that you mentioned in the very first comments on this PR that an |
In the section
First this is a bit misleading, as if the request is technically OK, it should return a
So either the request succeeded and you got the same Is a per-channel indication with a Related minor things which I noticed reading the changes:
|
Okay, I've just pushed up changes that I hope mop up all the comments above. I'm not sure how the status entries in the POST response crept in, I think it was an idea I was playing around with at some stage that ended up where it shouldn't have. Apologies for any confusion. The idea is that either the entire activation is acceptable, or the entire activation is rejected, and that state is reflected in the HTTP response code in reply to the POST. I've also added the ID into the post response, which was always meant to be there but got lost in a bit of copy-paste editing. I've tidied up the language around the POST requests that jasper queried.
This was only ever meant to convey that pending activations shouldn't make any changes until the actual activation time. Obvious if you've done NMOS stuff before, but an important point to make as I've seen this mistake made with IS-05 staged parameters before. The POSTs are all or nothing, the activation object and corresponding map are both in the request together.
I can see how this added to the confusion, there's a implicit "and map object" there which I've now added explicitly to the text. I think this clears up all the comments in this thread, but if not give me a shout. |
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.
changes look good to me.
thanks,
Chris
No description provided.