Github user neykov commented on the issue:
https://github.com/apache/brooklyn-server/pull/194
I'm fine with merging the proposed changes, but I think it's papering over
a broken abstraction. We can't hide the fact that we have deferred values in
the configuration so better expose it into the API and make use of it.
I propose that longer term we add methods that return something similar to
`ListenableFuture` (even for already resolved values). Then use the existing
`get` methods as a shorthand when we will make immediate use of the value. More
complex scenarios will push the futures around. This will even allow having
chains of dependent values so that when one changes all dependents change as
well - for example having a live `$brooklyn:formatString` updating as the
underlying sensors update.
This still leaves the case of complex objects - we are currently resolving
their parts ad-hoc (for example maps). Could we improve our parser so it knows
that an object contains futures and wrap the object itself in a future?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---