keeping state in units

Cory Johns cory.johns at canonical.com
Wed Feb 11 14:45:04 UTC 2015


Awesome.  I've been looking forward to this being released.  I've
already been using the proof-of-concept version in the Big Data
charms, and it's great.

On Wed, Feb 11, 2015 at 8:12 AM, Kapil Thangavelu <kapilt at gmail.com> wrote:
>
> Hi Folks,
>
> Just merged a new charm helper that I wanted to highlight. I've seen quite a
> few charms tracking state in various ways, from ad hoc files per setting to
> the config settings helper, which leads to some charms having a half-dozen
> state tracking files.  Ideally charms can be written such that they just
> consider current state and write out and effect. However its quite natural
> for some charms to have the need for local state as they need to consider
> the application of deltas from multiple sources to the state they've already
> achieved on a unit.
>
> The charmhelper unitdata.py provides a versioned, transactional, kv store
> for a unit backed by a single sqlite file. It provides methods for returning
> deltas against previously known values to simplify delta calculation and
> application by charm. Docs embedded in implementation link below, feedback
> welcome.
>
> http://goo.gl/B0AdTR
>
> cheers,
>
> Kapil
>
>
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>



More information about the Juju mailing list