brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (BROOKLYN-49) Catalogue should be persisted and used when rebinding
Date Fri, 19 Sep 2014 14:10:34 GMT


ASF GitHub Bot commented on BROOKLYN-49:

Github user aledsage commented on the pull request:
    Note sure about how catalog persistence is being disabled. There is the CLI `--persistCatalog`
and there is the brooklyn feature enablement `brooklyn.experimental.feature.catalogPersistence`.
I don't think the latter is not respected everywhere. For example, `PeriodicDeltaChangeListener.onChanged`
will persist the catalog item if given it (policies and enrichers have the same problem).
This could would for example be called from `BasicBrooklynCatalog.addItem`. If we want to
be able to entirely turn off the persistence of the catalog, then I think we need to use this
feature-enablement in more places.
    For `--persistCatalog` (description is `"Persist the server's catalog along with other
state"`), will that really prevent the catalog being persisted to the object store if false?
Or will it just force loading from the catalog.xml rather than the object store?
    For the CLI, it feels like we might want a range of persistence options (similar idea
to the `--persist` options). Off the top-of-my-head, these could be:
    * `clean`: starts fresh, getting catalog content from catalog.xml / URL.
    * `rebind`: uses the existing persisted state rather than the catalog.xml
    * `auto`: if there is persisted state, then use it; otherwise look at catalog.xml to load
the initial catalog.
    * `disabled`: don't read or write from the persisted state; only use the catalog.xml
    Those options are the same values as for `--persist`. Perhaps we should just piggie back
on that, rather than having a separate option for `--persistCatalog`? It could be toggled
by just the feature enablement (so if disabled, fall back to old behaviour of just catalog.xml).

> Catalogue should be persisted and used when rebinding
> -----------------------------------------------------
>                 Key: BROOKLYN-49
>                 URL:
>             Project: Brooklyn
>          Issue Type: Improvement
>            Reporter: Sam Corbett
>            Assignee: Sam Corbett
> Proposal:
> The catalogue, consisting of application templates, entities, policies and 'configuration'
(whose purpose is unknown to me and is unused in general), will be persisted to a `catalog`
directory alongside enrichers, entities, locations, nodes, plane and policies. Location definitions
(that are conceptually linked but are unrelated in code) will be stored too.
> Modes of operation:
> * If persistence if disabled load the default catalogue;
> * If persistence is enabled but there is no persisted catalogue (i.e. the server is running
for the first time) then load the default catalogue;
> * Otherwise load the persisted catalogue. Do _not_ load the default catalogue. 

This message was sent by Atlassian JIRA

View raw message