[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [tosca] Event Interface Proposal
Hi Chris, Please find my answers inline. BR, /C From: Chris Lauwers <lauwers@ubicity.com> Hi Calin, Thanks for putting this together. This is excellent work. Adding support for asynchronous notifications will increase the usefulness of TOSCA tremendously, and it will allow us to integrate policies and workflows much more cleanly into
the rest of the orchestration logic. I have one main comment on your proposal, and a couple of smaller observations about specifics of the syntax.
Yes, I tried to connect it to the existing policy grammar. Nevertheless, there are some objective
reasons:
This said, I have no objection for the notification to define intrinsically an event. We can
add the following to the notification description: Whenever a notification arrives, it will always generate an event of a âtypeâ equal to the name of the notification (i.e. org.ego.event.interfaces.Upgrade.completed).
a.
It would be helpful to give examples of ânotification implementationsâ using artifacts. I assume that ânotificationâ grammar will just re-use the existing âoperation implementationâ grammar, but we need to make sure weâre not missing
anything. See answer to Priya in a the mail I just sent before. b.
Your examples show a difference between âoutput definitionsâ and âoutput assignmentsâ.
However, the operation output grammar we decided on does not make such a distinction. Instead, it only uses âoutput assignmentsâ (or âattribute_mappingsâ to be correct), both in node templates and node types, as shown in Section 3.16.17. (However, I
just noticed that section 3.16.17.2.3 in the latest 1.3 draft doesnât include operation output support in node templates, even though section 2.15 shows examples of this. Iâll fix this in a future draft). I modeled the output definitions in the node type, in a similar way to input definitions (section
3.6.17.1 Keynames - where input definitions are for the node type, while input assignments are for the node template). I wanted to keep the symmetry between inputs and outputs. Now I realized that if we define the outputs mapping directly in the node type (as you mention
above), then we donât need to use a âdefinitionâ to set a datatype to the ouptput (since it maps to an attribute of a certain type). Nevertheless, if we want to use the mapping in the template, then we should have some definition of the output datatype in
the node type (which is an information that the node type creator has, but which the node template creator may no longer possess).
Finally, again in the name of symmetry, is it possible today to use default: {get_property: [SELF,
some_property]} as a default value when defining inputs in the node type? If not, then we should also allow it.
c.
You include an example of a âcallbackâ that provides a node and a callback notification as inputs to an operation.
Wouldnât it be cleaner to support this use case by defining a new âasynchronousâ lifecycle management interface where a separate âon_successâ notification is defined for each operation. Using the asynchronous interface, operations would return immediately
(indicating that the operation has been started), and then the âon_successâ for that operation is called as soon as the operation completes. The âcallbackâ would then be implemented using the âpolicy triggerâ support that is already part of the language. I donât think it would be good to connect the on_success with asynchronous behavior (i.e. when it returns). As it is now, in the synch case, it still returns, even if it has failed. Also, can
fail even if it returns asynchronously, we just know that when it returned. Now, we could use a non-mandatory keyname âasynchronousâ in the operation definition, that we
set to yes (default is no) when defining an asynchronous operation. That would imply that the operation returns immediately, and that a notification of the same name is created and will be called asynchronously from the outside (i.e. the return will behave
like a notification). The outputs will be mapped after the associated notification returns:
All in all I think the advantage > disadvantage. But I would prefer the asynchronous keyword instead the on_success.
Then we can define synchronous operations, asynchronous operations, and notifications in the same interface. d.
I notice youâre reading the âpolicy triggerâ grammar in the spec differently than I did: in your examples triggers are named. I didnât think the spec included trigger names. Of course, since there are no policy
examples in the spec and the grammar itself is ambiguous, it is hard to know which is correct. Iâm currently working on a project that requires TOSCA policies, and I must admit I find the whole policy section confusing. I would love a separate discussion on
policies after we talk about notifications. Named triggers are defined in the trigger definition (see section 3.6.20.3.1 / 3.6.20.3.2). Actually
I have a small error in the policy definition since the triggers are not a list but a map. e.
On a related note, there are a lot of similarities between âpolicy triggersâ and âworkflow stepsâ, especially in the area of defining (pre)conditions. At the same time, there are enough syntax differences to make it difficult to keep
the concepts straight. I think there is an opportunity to clean things up here. How I understand it: the workflow steps are evaluated as specified in the workflow, and that
is the time when the preconditions in the workflow step are evaluated. If they correspond, the actions are executed, if not they are skipped. What I donât understand is if the on_success is triggered in the skipping case. I guess not. Which means that no subsequent
steps are evaluated (neither on_success nor on_failure). Thanks again for taking the initiative to write this contribution. Letâs discuss next week so we can make this an important part of the 1.3 specification.
Thanks for the insightful comments. Chris From: Calin Curescu <calin.curescu@ericsson.com> Dear all, Based on the suggestion from Priya I have renamed the âevent callâ to ânotificationâ and based on Chris proposal I have included the notifications as a section in a generic Interface definition. I have submitted a new proposal document
https://www.oasis-open.org/apps/org/workgroup/tosca/download.php/63994 We still need to discuss the 2 comments from Priya:
Priya: Please review my answers with green in the mailthread below. BR, /Calin From: Chris Lauwers <lauwers@ubicity.com> Yes, I had assumed that ânotificationsâ or âeventsâ would be grouped under their own keyword to keep them separate from the operations. In fact, my parser creates an âoperationsâ grouping behind the scenes to
gather the various operations. Iâm all for making this explicit in the spec and obsolete the current practice of defining operations at the same level as the âinputsâ keyword. Thanks, Chris From: Calin Curescu [mailto:calin.curescu@ericsson.com]
Chris: Sure. However the reader should be aware of the important difference here:
Then I would lobby to introduce in the interface definition the keyword âoperationsâ to gather the operations symbolic name and the keyword ânotificationsâ to gather the notifications symbolic names. Anyway the former is already required since not having it clashes with the âinputsâ section of the interfaces (see matt comment in section 3.7.5.2. Grammar of Interface Type Definitions). Priya: please fins some inline comments in your text below. Btw, I think the ânotificationâ name fits very well, so I will use that from now on. BR, /Calin From: Chris Lauwers <lauwers@ubicity.com> I like these concepts, but Iâd like to avoid having to create new âinterface typesâ just for events or notifications. We already have too many types of types. Canât we just add a notifications or events keyname to the existing interface definitions? Chris From: Priya T G <priya.g@netcracker.com>
Calin, Thanks for responding. Clarifications below:
What I mean is that anybody can invoke the notifications, the association with the artifact is not useful since we are just exposing an API here.
a.
Attribute - by means of get_operation_ouput function in attribute definition/assignment b.
Operation â by means of output section Topology attributes can be filled through substitution mapping. We could adhere to a common approach and provide possibility to fill topology attributes through operation (or event) and read topology attribute
values from node instances inside topology. In the case of substitution mapping, the properties of the substituted node are mapped to the inputs of the substitution topology template, and the outputs of the topology template
are mapped back to the attributes of the substituted node. So we could use the outputs here, where they could get assigned using get_attribute from a specific node. Then we do not need the TOPOLOGY keyword (and anyway there are no global attributes
section of a topology template. Let me know your views. Regards, Priya From:
tosca@lists.oasis-open.org [mailto:tosca@lists.oasis-open.org]
On Behalf Of Calin Curescu Hi Priya, I realized I have not answered to your mail, I was hoping to discuss it all in the WG meeting before we go further. Anyway, some first thoughts on your proposals inline. BR, /Calin From: <tosca@lists.oasis-open.org> on behalf of Priya T G <priya.g@netcracker.com> Hello Calin, Chris, This is regarding the event interface proposal that was uploaded in OASIS portal recently: https://www.oasis-open.org/apps/org/workgroup/tosca/download.php/63289/EventInterface2018_06_20.docx
I believe this has not yet been discussed in TOSCA Simple Profile meetings, but is in plan for TOSCA YAML v1.3. I have a few comments and suggestions on this:
I was thinking initially that the orchestrator will provide a couple of standard interface technologies (HTTP/REST, RPC, â) to accept these notifications, where the data model exchanged is YAML/JSON. So an external
implementation would know exactly how to format data and use the API. The only effect in the orchestrator is that attributes values are updated and specific orchestrator events are generated. The events may then trigger workflows
are already defined in TOSCA, and these workflows can then call operations that artifact implementations can be attached to.
If we want to have a shortcut for the latter step (i.e. not needing to set up and specify an entire workflow), Iâm more inclined that we provide an extra âcall_operationâ keyword in the definition that will call
a specific operation i.e: fault_report: outputs: name: fault value: [ SELF, monitor, failure ] event_types: - failure_processing call_operation: #new - SELF.alarm_processing #new
Notification is a good alternative. Letâs propose it to the group.
I donât think I understand the TOPOLOGY reference. Afaik, there are no attributes that are connected to the topology_template. BR, /Calin The information transmitted herein is intended only for the person or entity to which it is addressed and may contain confidential, proprietary and/or privileged
material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender
and delete the material from any computer. |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]