Replies: 0 comments 27 replies
-
Very good discussion. It looks like we're all working towards the common goal of having system-wide behavior emerge from elementary behaviors associated with smaller building blocks (i.e. nodes and relationships). This is fundamentally different from workflow-based orchestration systems. We should make a big deal about this in the introductory section of the specification where we highlight the unique capabilities of TOSCA. Here is a collection of initial comments and questions that I'll try to better organize over time. Most of my comments related to the fact that many of the concepts presented by Tal are somewhat similar to concepts already in 1.3. For example:
Let's continue to iterate and nail down these concepts ASAP. |
Beta Was this translation helpful? Give feedback.
-
So, I've been thinking on how policy triggers can be unified with this. Some interesting thoughts. Here's an example of how I think it should look from a user perspective: policy_types:
Redundancy:
properties:
minimum: { type: integer }
triggers:
- condition:
$lesser_than:
- { $get_attribute: [ TARGET, count ] }
- { $get_property: [ SELF, minimum ] }
events:
- target: $target
interface_type: NodeLifecycle
name: create
topology_template:
policies:
- type: Redundancy
properties:
minimum: 3
targets:
- node1
- node2 What's interesting here is that we want to set a condition not on one node but on a collection of nodes. So, somehow we need condition expressions that could operate on all the targets of the policy, hence the Basically, the main grammatical thrust of this proposal is that if we want a rich way to express trigger conditions we need to really beef up the TOSCA expression language for addressing entities in various function call contexts in which condition expressions can appear. |
Beta Was this translation helpful? Give feedback.
-
Another way would be to have a single target which is the name of a group; and then acknowledge that groups have attributes, one such attribute is the total number of leaf entities contained within the group. |
Beta Was this translation helpful? Give feedback.
-
The discussion above may provide us with an opportunity to fix an
Aside from the lack of formalism in defining these actions, it is
I believe we should add grammar to formally specify the set of actions This grammar would also allow us to formalize other implicit
As we continue to think about unifying the event handling model for |
Beta Was this translation helpful? Give feedback.
-
After today's TOSCA Language Ad-Hoc meeting, I believe a picture is starting to emerge of how our various proposals might converge on a significantly improved TOSCA interface model. The following table expands on my previous attempt to reconcile what has been proposed so far with what's currently in Version 1.3. Hopefully this comparison will provide additional context to drive this discussion towards conclusion.
|
Beta Was this translation helpful? Give feedback.
-
Some minor clarifications on the above table: Under handlers, delete
insert Tal's propsal above doesn't appear to use artifacts but instead has a command. I suggest that artifact type defintions should include the command string to execute them. Be consistent with naming - either they are 'handlers' or they are 'event handlers' delete
Insert |
Beta Was this translation helpful? Give feedback.
-
Can this new proposed syntax be used as a replacement for Version 1.3 imperative workflows? |
Beta Was this translation helpful? Give feedback.
-
Update -- I edited the original post with a small modification. Instead of the Note that this is slightly different in meaning from the |
Beta Was this translation helpful? Give feedback.
-
Based on the discussion in the TOSCA Language Ad-Hoc meeting of Aug. 23, 2023, it appears that we need to make a distinction between low-level and high-level concepts here:
Tal's example above seems to overload these two concepts. For example, it defines a I very much like the concepts introduced by Tal, but I believe we must extend them as follows:
We might be able to express intent by introducing additional interface attributes (e.g., a Thoughts? |
Beta Was this translation helpful? Give feedback.
-
What I would like is to be able as an option to connect also a graph traversal mechanism that triggers doing stuff. That would be for me something that would be "high level". For instance:
Then for instance, one could define an event-based triggering inside a node type, that is better understood already when defining the node type, with a representation-graph traversal that is better understood when working with the template. I would support both options, some problems are more suited to be fully-event based triggerd (e.g. event-assembled) while others would benefit to be more specified on the template level. |
Beta Was this translation helpful? Give feedback.
-
I do not like this. In an ideal nirvana of everything being cloud-native, declaratively deployed applications, there is no need for sequencing at all. That should be the default for TOSCA, I agree with @tliron about that. In practice, however, things tend to have sequencing dependencies, and the objective is to find a nice way of controlling the order of actions that is more abstract than explicit BPEL workflows and is easy for template designers and template users to understand. Yes, every workflow or declarative workflow can be reduced to some kind of event-passing and waiting mechanism in some implementations, but that means that event handling is a lower level construct than other mechanisms, such as arrows in an explicit workflow or declarative workflows derived from the topology. Arguing that all dependencies should be specified using the event mechanism because everything can be done using events is like arguing that loops and recursion are redundant in programming languages because they can be mapped to GOTOs or jumps in lower level machine code. Yes, events can be a useful language construct, just like some high-level programming languages have retained the GOTO construct. And by the way, in explicit workflows with boxes-and-arrows are exactly a GOTO mechanism. TOSCA introduces a lot of complexity with a node having potentially multiple interfaces with different state-models. This means that it is hard to express a "direction" in simple terms like "deploy the topology" or "undeploy the topology", and for day 2 scenarios this gets even harder. Still, at some level of abstraction, it should be possible to specify the "desired state" of a topology in some simple terms, if nothing else then at least because that is in our official TOSCA charter: "The TOSCA TC also aims to make the TOSCA language easy to use ..." In HPE SD we chose a different strategy: We standardized on a singe state model for all nodes; it happens to be the MTOSI TMF 518_SA_2 standard because we are primarily working with Telco services. Instead of interfaces, we defined that a node may have "child component nodes" and each of these have their own state following the same standard. In TOSCA, this would amount to a node-substitution with a "component"-type relationship between a main node in the substitution and a variable number of other nodes. It meets the same objective, that the abstract node ends up with a multiple states, but it simplifies the specification because all nodes have a well-defined direction from undeployed to deployed and back. Assuming, that somehow, we solve the problem of undeploy-deploy desired state in TOSCA, then relationship types should be able to define dependency rules. If an orchestrator chooses to implement that using an event-mechanism, a workflow engine or something else should not be mandated by TOSCA. I remember that @tliron had the objection deployment sequencing on relationship types, that this can be very hard to visualize and debug in case the dependencies are not as expected. I need to point out here, that an event-based mechanism is even harder to debug because both the template designers and the template users will have no good overview of the logic. Of course HPE SD also has events and triggers. So this does not mean that events should not be supported by the language. My point is only that, as with GOTOs, they should only be used in rare, exceptional cases. We analyzed the strength of declarative workflows based on the topology of relationship types, and with a low set of types, we can model everything that a standard workflow system can do - and a lot more. To have full functional coverage, the designer needs to be able to express:
Only the last one - backtracking - requires an imperative mechanism, possibly using an event-mechanism. Importantly, in a declarative context, backtracking is not the same as a loop in a classical workflow. Rather it amounts to a reevaluation of the execution strategy under modified conditions/assumptions. |
Beta Was this translation helpful? Give feedback.
-
Hi all, I want to try to streamline and clarify the original proposal (which has since evolved) and attempt to solve the workflow challenge. I recognize that I had a bit of a concept soup with the addition of "events" vs. "triggers". Let's simplify it and remove "triggers" from the proposal. And also let's go back to the idea that interface types contain "operations" (nice continuity with TOSCA 1.3!), but we will remove "notifications" because the feature is handled differently in this proposal (nice continuity with TOSCA 1.2!). What is proposed is four new entities: 1) EventsThese are generic entry points into the event model. All events can have an optional There are three types:
Putting these together: events:
- condition: { $equals: [ { $get_attribute: [ { $node: [ my-node ] }, state ] }, "Deployed" ] }
handle:
- type: Call
properties: { targets: { $node: [ my-node ] }, interface_type: MyInterface, operation: my-operation }
succeeded: # for just this handler
- type: Log
properties: { message: "my-operation succeeded!" }
succeeded: # for all `handle` handlers
- type: Log
properties: { message: "all handlers succeeded!" }
failed: # for all `handle` handlers
- type: Log
properties: { message: "a handler failed!" } 2) OperationsThese are named, typed (they have an Unlike events, which are triggered based on conditions, operations can only be triggered when explicitly called by a Like an event, you can add a Refinement of 3) HandlersZero or more of these can be attached to any event or operation via the The handlers are called when the event or operation is activated. Whether they are called sequentially (and in what order) or in parallel is up to the implementation. Handlers do not return a value per se, but rather can "succeed" or "fail". The orchestrator is in charge of collecting that success state and activating 4) Built-in handler types
I do recognize that there is a problem here in that the these types are meant to be a "standard" part of TOSCA 2.0, and when we removed the Simple Profile from TOSCA we specifically did not want to include any built-in types into TOSCA. However, I will point out that all the primitive data types (string, integer, scalars, etc.) are built-in. Likewise, we have built-in functions and also user-declared functions. So perhaps these can be an additional exception to our rule? Open to discussion. The
|
Beta Was this translation helpful? Give feedback.
-
I went back to some earlier proposals and came up with something a bit new.
There are various assumptions made along the way here. My goal is just to put out something that encompasses all the features I think we need: 1) a unified event model, 2) pluggable event handlers, and 3) the ability to send events to specific targets in response to internal and external triggers. I had to make up a bunch of $ functions and magic words along the way, I hope they make sense in context.
Classical "workflows" are emergent in this scheme. I'm far more interested in the primitives here, the underlying event model. Perhaps some sugar can be added for those who are addicted to workflows, to automatically build upon these primitives.
Also note that this is not an attempt create a state machine per se, because I see state machines as a very small subset of what you'd want to achieve with events. However, this example does show some state management.
Beta Was this translation helpful? Give feedback.
All reactions