All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brad Bishop <bradleyb@fuzziesquirrel.com>
To: Patrick Venture <venture@google.com>
Cc: Ratan Gupta <ratagupt@linux.vnet.ibm.com>,
	Andrew Jeffery <andrew@aj.id.au>,
	Ratan K Gupta <ratagupt@in.ibm.com>,
	OpenBMC Maillist <openbmc@lists.ozlabs.org>,
	"Tanous, Ed" <ed.tanous@intel.com>
Subject: Re: Sdbusplus-based Shared Library
Date: Wed, 28 Mar 2018 23:43:54 -0400	[thread overview]
Message-ID: <1598514C-EBA7-4CF8-A7F8-04BD39498B12@fuzziesquirrel.com> (raw)
In-Reply-To: <CAO=notz7gk5oF9BSpviz+1VrDRCeBCU7t8+zQxTGZOCDYy=VmQ@mail.gmail.com>


> On Mar 28, 2018, at 11:25 PM, Patrick Venture <venture@google.com> wrote:
> 
> On Wed, Mar 28, 2018 at 6:39 PM, Brad Bishop
> <bradleyb@fuzziesquirrel.com> wrote:
>> 
>>> On Mar 27, 2018, at 11:43 AM, Patrick Venture <venture@google.com> wrote:
>>> 
>>> Brad,
>>> 
>>> If you create a repository - phosphor-sdbus-utils or
>>> phosphor-sdbusplus-utils or something like that, I'll put together a
>>> starter pack on this and submit for review.
>> 
>> May I suggest
>> 
>> https://github.com/openbmc/phosphor-dbus-monitor/tree/master/src/sdevent
>> 
>> as a possibility for drawing ideas?  :-)
>> 
>>> 
>>> Patrick
>> 
>> Thanks Patrick! will do but I’d like to get a bit more clarity/discussion
>> on what the content of this new repo will be.
>> 
>> So today we have sdbusplus built around the sd-bus folder in libsystemd.
>> 
>> Do we envision something like separate repos for:
>> 
>> sdeventplus - wrappers for the sd-event folder in libsystemd
>> sddeviceplus - wrappers for the sd-device folder in libsystemd
>> …etc
>> 
>> Or should we just try and have a single c++ wrapper repository for all of
>> libsystemd?  In that case should we simply rename sdbusplus to libsystemdpp
>> and start putting more code in it?
> 
> I had envisioned all the sd-bus wrappers in one library, however, I'm
> quite flexible about any of that.  

I think sdbusplus has been forked for non-openbmc use so it probably
doesn’t make sense to add OpenBMC-isms to it, like the mapper for instance.
Do you agree?

I thought you were talking about extending the concept that was applied
to sdbus (thin raii wrappers around sdbus) to sdevent.  I definitely think
we need that.

I think C++ bindings around sdevent could also have general utility to someone
outside of OpenBMC so I’d again vote for not including OpenBMC-isms in a
library for something like that.

> My primary goal with pushing this
> line of thought it to reduce code duplication in openbmc.  So many
> daemons have the same methods that just talk to sdbusplus, etc.  So it
> makes sense to me to have a utility library for interfacing with
> sdbusplus for common tasks.  phosphor::util::getService(),
> phosphor::util::get... etc, so they can be maintained in one place.

I feel like a number of these are mapper related.  Could we add some
client bindings for the mapper that help here and put them in the
mapper repository?  Here is a possible example of how that could
look:

https://github.com/openbmc/phosphor-dbus-monitor/blob/master/src/sdbusplus.hpp

I wrote this class so I could mock sdbusplus calls.

> Even phosphor::util::network::... because those are becoming
> duplicated.  It might make sense to have multiple libraries for the
> utilities, which is also fine.

I guess I’m advocating for distributed utilities, aligned functionally.  I worry
about a monolithic library…it seems like it could easily become a free-for-all.

Thoughts?

> 
>> 
>> -brad

  reply	other threads:[~2018-03-29  3:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-19 17:11 Sdbusplus-based Shared Library Patrick Venture
2018-03-19 18:24 ` Tanous, Ed
2018-03-19 19:33   ` Patrick Venture
2018-03-20  2:32     ` Lei YU
2018-03-20  5:39     ` Tanous, Ed
2018-03-27  5:47     ` Andrew Jeffery
2018-03-27  6:04       ` Ratan Gupta
2018-03-27 15:43         ` Patrick Venture
2018-03-29  1:39           ` Brad Bishop
2018-03-29  3:25             ` Patrick Venture
2018-03-29  3:43               ` Brad Bishop [this message]
2018-07-18  8:36                 ` Lei YU
2018-03-20  6:36 ` Deepak Kodihalli
2018-07-18 11:34 ` vishwa
2018-07-18 13:53   ` Thomaiyar, Richard Marian

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=1598514C-EBA7-4CF8-A7F8-04BD39498B12@fuzziesquirrel.com \
    --to=bradleyb@fuzziesquirrel.com \
    --cc=andrew@aj.id.au \
    --cc=ed.tanous@intel.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=ratagupt@in.ibm.com \
    --cc=ratagupt@linux.vnet.ibm.com \
    --cc=venture@google.com \
    /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.