<div dir="ltr"><div class="gmail_default" style="font-size:small">I absolutely like this approach, John and I discussed more than once about it. And as a consequence, in a later cleanup, the API packages have to leave the state namespace. Wouldn't change a lot about the logic, but makes the separation more clear.<br>
<br></div><div class="gmail_default" style="font-size:small">mue<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 1, 2014 at 8:05 AM, David Cheney <span dir="ltr"><<a href="mailto:david.cheney@canonical.com" target="_blank">david.cheney@canonical.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The goal I have been tasked with is breaking the interdependency<br>
between the state package and the _client_ api types in<br>
state/api/params.<br>
<br>
I don't have any opinion on adding additional layers assuming that<br>
their dependancies flow downwards, ie<br>
<br>
<a href="http://labix.org/mgo" target="_blank">labix.org/mgo</a> <- juju/state <- juju/apiserver<br>
<div class="HOEnZb"><div class="h5"><br>
On Mon, Sep 1, 2014 at 4:03 PM, John Meinel <<a href="mailto:john@arbash-meinel.com">john@arbash-meinel.com</a>> wrote:<br>
> FWIW I'd favor 3 layers, though it does mean you have to do copying between<br>
> structs that would likely otherwise be almost identical. A State layer for<br>
> saving in the DB, an API layer for communication, and a Model layer for use<br>
> in the Agents/Clients.<br>
><br>
> John<br>
> =:-><br>
><br>
><br>
><br>
> On Mon, Sep 1, 2014 at 9:40 AM, David Cheney <<a href="mailto:david.cheney@canonical.com">david.cheney@canonical.com</a>><br>
> wrote:<br>
>><br>
>> Hello,<br>
>><br>
>> This is an introductory email to explain my upcoming series of pull<br>
>> requests.<br>
>><br>
>> The theme is simple: state must not depend on the api server.<br>
>><br>
>> This is currently not true, state depends on api/params because some<br>
>> of the api types have leaked into the state package and are being<br>
>> directly stored in mongo.<br>
>><br>
>> Please speak up if you disagree with this proposal.<br>
>><br>
>> Dave<br>
>><br>
>> --<br>
>> Juju-dev mailing list<br>
>> <a href="mailto:Juju-dev@lists.ubuntu.com">Juju-dev@lists.ubuntu.com</a><br>
>> Modify settings or unsubscribe at:<br>
>> <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
><br>
><br>
<br>
--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div>** Frank Mueller <<a href="mailto:frank.mueller@canonical.com" target="_blank">frank.mueller@canonical.com</a>></div><div>** Software Engineer - Juju Development</div>
<div>** Canonical</div>
</div>