-
Notifications
You must be signed in to change notification settings - Fork 25
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
State machine for interfaces #147
Comments
I understand and agree with the requirement. |
There is one aspect of the above syntax (which is based on the 1.3 workflow syntax) that bugs me a bit: it assumes a synchronous execution model where an operation is called and then either returns successfully or returns an error. Real-world implementations will likely adopt an asynchronous event-driven model where calling an operation kicks off a state transition, and at some later point there will be a notification that signals completion. This means that instead of using a general-purpose If we did this, would we avoid the need to support state transitions based on return values (since presumably we would just expect different notifications instead for this purpose)? |
The |
It seems to me that the same syntax could be used for modeling synchronous interfaces as for asynchronous interfaces. For example, here is (part of) a synchronous version of an interface: ---
title: Synchronous Interface
---
stateDiagram-v2
initial --> created: create
created --> started: start
Here is an asynchronous version of the same interface. This version models the intermediate transitioning states and the ---
title: Asynchronous Interface
---
stateDiagram-v2
initial --> creating: create
creating --> created: on_created
created --> starting: start
starting --> started: on_started
It is up to the designer to decide which way they want to model this. |
Is a true With the proposed syntax you can easily have There are two ways an orchestrator might interpret a case where two operations have true preconditions:
As for asynchronous operations, this means that the actual underlying state-machine must split each state into two (or three) sub-states, and I believe that is what you are doing with the I am not fond of having to re-write the state-machine depending on the operation being synchronous or asynchronous. It would be far more elegant if a synchronous implementation could be substituted with an asynchronous one without having that propagate up into a change of the model that was supposed to be abstract. In HPE SD we have automatic sub-states ( You could of course always specify the |
Actually, I had assumed the former: if the |
Ok. So operations become enabled when their precondition becomes true, but it takes a separate even (or human action?) to execute one of the enabled operations. |
Presumably, the preconditions can only become true as a result of some event. That same event could also trigger the (enabled) operation. Or, said a different way, in model space nothing ever happens or changes without some event resulting in the change. |
In this standard state model, what is the difference between "reserve" and "provision"? I'm trying to figure out how these translate into TOSCA concepts such as:
|
As a general input, there is also work in other fields w.r.t. to the requirements. Work has started on Arazzo. An initial observation was that there is no concept of partners; which in the context of TOSCA is not needed. In general, this seems to be "Message Exchange Patterns". BPELlight was one idea to specify those: https://ieeexplore.ieee.org/document/4578482 Regarding the instantiation, the process instantiation patterns might be of help. General thoughts:
|
Since Version 2.0 no longer defines normative interface types, orchestrators no longer have the ability to automatically create workflows based on the service topology. We have identified a requirement to re-introduce support for automatically-generated declarative workflows in #91
As a first step, I propose that we introduce additional grammar for defining state machines associated with interfaces:
The following provides a suggestion for how this could work (leveraging some of our imperative workflow syntax):
The text was updated successfully, but these errors were encountered: