Hi Alex, I haven't been involved with the Brooklyn team for a long while so take this suggestion with as little or as much importance as you see at face value. Your proposal for a richer specification language to guide realtime behavior is much appreciated and I think it is a great idea. You've obviously thought very deeply as to how it could be applied in different areas of a blueprint.
My one comment is whether going for a declarative solution, especially one based on YAML is optimal. Sure Yaml is well known, easy to eyeball, but it has two drawbacks that make me wonder if it is the best platform for your idea. The first is that it is a format-based language. Working in large infrastructure projects, small errors can have disastrous consequences, so as little as a missing or extra tab could result in destroying a data resource or bringing down a complex system. The other, more philosophical comment has to do with the clumsiness of describing procedural concepts in a declarative language. (anyone have fun with XSL doing anything significant?) So my suggestion would be to look into DSLs instead of Yaml. Very nice ones can be created with little effort in Ruby Python, JS - and even Java. In addition to having the language's own interpreter check the syntax for you, you get lots of freebies such as being able to do line by line debugging - and of course the obvious advantage that there is no code layer between the DSL and its implementation, whereas with Yaml, someone needs to write the code that converts the grammar into behavior, catch errors etc. What do you think? Peter On Wed, Aug 24, 2022 at 8:44 AM Alex Heneveld <a...@cloudsoft.io> wrote: > Hi folks, > > I'd like Apache Brooklyn to allow more sophisticated workflow to be written > in YAML. > > As many of you know, we have a powerful task framework in java, but only a > very limited subset is currently exposed via YAML. I think we could > generalize this without a mammoth effort, and get a very nice way for users > to write complex effectors, sensor feeds, etc, directly in YAML. > > At [1] please find details of the proposal. > > This includes the ability to branch and retry on error. It can also give > us the ability to retry/resume on an Apache Brooklyn server failover. > > Comments welcome! > > Best > Alex > > > [1] > > https://docs.google.com/document/d/1u02Bi6sS8Fkf1s7UzRRMnvLhA477bqcyxGa0nJesqkI/edit?usp=sharing >