All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jeffery <andrew@aj.id.au>
To: Andrew Geissler <geissonator@gmail.com>
Cc: Joel Stanley <joel@jms.id.au>,
	jdking@us.ibm.com, OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: BMC and Host State Management Refactor
Date: Wed, 23 Nov 2016 11:37:59 +1030	[thread overview]
Message-ID: <1479863279.2503.42.camel@aj.id.au> (raw)
In-Reply-To: <CALLMt=rNQSyYX6m--TKns1Hf1frFVmCfE+M77RVcADD8QyfuPg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2703 bytes --]

On Tue, 2016-11-22 at 11:23 -0600, Andrew Geissler wrote:
> > On Mon, Nov 21, 2016 at 9:40 PM, Andrew Jeffery <andrew@aj.id.au> wrote:
> > On Mon, 2016-11-21 at 20:28 -0600, Andrew Geissler wrote:
> > > > > > > > On Sun, Nov 20, 2016 at 11:55 PM, Joel Stanley <joel@jms.id.au> wrote:
> > > > Hi Andrew and Josh,
> > > > 
> > > > On Sat, Nov 19, 2016 at 7:01 AM, Andrew Geissler <geissonator@gmail.com> wrote:
> > > > > Josh and I are working two stories this sprint that deal with
> > > > > refactoring the bmc and host state management code out of skeleton
> > > > > (#772/#783).  Here’s the proposal on this work.
> > > > 
> > > > Thanks for sending out your plan, this is great. I have a few comments
> > > > that came up as I was reading.
> > > > 
> > > > > The overall design for both state management objects is that they will
> > > > > provide a set of properties on which to operate.
> > > > > - DesiredState
> > > > > - CurrentState
> > > > > 
> > > > > CurrentState will be a read only property.
> > > > 
> > > > You've chosen to make the desired and current states be separate,
> > > > which works. Another option would be to have them be the same list of
> > > > states, so you know that when current==desired you're not waiting on
> > > > anything to happen. What do you think?
> > > > 
> > > 
> > > Hmmm, I'm thinking from a DBUS/REST api perspective here.  2 seems
> > > more intuitive, but also I don't think I understand your proposal
> > > fully :)
> > 
> > I think you might be misinterpreting. I don't think Joel was suggesting
> > you eliminate one of the DesiredState or CurrentState "variables",
> > rather that the /types/ of the CurrentState and DesiredState variables
> > be equal. That is, that the same set of states can be assigned to both.
> > 
> 
> I see now.  I'm still not seeing any huge advantages on either
> proposal over my original. 

The advantage I see in Joel's proposal is that we have fewer types
involved in the problem. The alternative (as mentioned below) is you
rename DesiredState to Transition, in which case I think what you are
suggesting is okay. Transitions and states are distinct and well
defined concepts.

I don't like the idea of "desiring" a state that doesn't exist. Joel's
initial question suggests he thinks along these lines as well.

>  I think I'm just going to stick with it
> for now since there are times where the valid states associated with
> each (Desired vs. Current) are different

Can you expand on this to make it clear what you are arguing for?

>  and I think having the two as
> I've defined is a bit more user friendly.

In what way?

Cheers,

Andrew

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

  reply	other threads:[~2016-11-23  1:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-18 20:31 BMC and Host State Management Refactor Andrew Geissler
2016-11-21  5:55 ` Joel Stanley
2016-11-22  2:28   ` Andrew Geissler
2016-11-22  3:40     ` Andrew Jeffery
2016-11-22 17:23       ` Andrew Geissler
2016-11-23  1:07         ` Andrew Jeffery [this message]
2016-11-28  2:30           ` Andrew Geissler
2017-01-03 22:24             ` Andrew Geissler
2017-01-04  0:07               ` Stewart Smith
2017-01-04 16:28               ` Patrick Williams
2017-01-04 22:44                 ` Andrew Geissler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1479863279.2503.42.camel@aj.id.au \
    --to=andrew@aj.id.au \
    --cc=geissonator@gmail.com \
    --cc=jdking@us.ibm.com \
    --cc=joel@jms.id.au \
    --cc=openbmc@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.