All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ell@lists.01.org
Subject: Re: [PATCH] dbus: Flush pending object manager signals in send_message
Date: Mon, 20 Mar 2017 13:17:59 -0500	[thread overview]
Message-ID: <483511e0-bb23-a0c8-3959-cccf04170729@gmail.com> (raw)
In-Reply-To: <CAOq732KffO_OX=8sZrPF4S9rCQfyNxXaagNX17LrwHYMSc1kZA@mail.gmail.com>

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

Hi Andrew,

>>
>> errors should not affect properties.
>
> I don't see why not, a Connect error will cause State to change for
> example, could also affect some KnownNetwork properties, but there
> will be some more obvious cases.

I think in our case we emit signals after returning from the Connect 
method call and KnownNetworks doesn't have properties.  But fair enough.

>
>>
>> Your signal + InterfacesAdded example is valid, though probably never occurs
>> in practice.  I can't think of any other situation where an in-order signal
>> reception was useful.
>
> In all cases it can be worked around by clients like in the Scan case.
> We can fix it on the iwd side just for this one case but I think
> instead we should have a policy that tells clients if they can rely on
> the order of the signals or not.  If not then the test utilities
> should deal with this.

In general the stated policy is that the client cannot rely on the order 
of signals.  However, in certain cases it is extremely advantageous for 
us to implement a logical order and stick to it.  This has the effect 
that a client with decent D-Bus bindings will 'just work'.

Scan() is one such example.

>>
>> I detect hand-waving :)  Can you describe specific situations where this is
>> a concern?
>
> The Scanning case is one but really it's same as other situations
> related to State and other properties, where the client code
> (including agent methods) need to take some decision based on the
> properties.

My original comment was about limiting the scope to a single object. 
E.g. if /foo emits a property change and then sends a method return, 
only property changed signals for /foo should be processed.  The rest 
can be still coalesced.

Can you see a situation where a signal order can be guaranteed across 
objects?

>
> Fixing it just for the Scanning case probably costs us about a line
> more or the same amount code as actually fixing it in general.
> Dropping the coalescing code would simplify the code even more though.
>

So that's the question.  My feeling is that if we don't limit the scope, 
then the coalescing logic is more trouble than it is worth and we should 
just send the signals directly.

Regards,
-Denis


  reply	other threads:[~2017-03-20 18:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-18  1:30 [PATCH] dbus: Flush pending object manager signals in send_message Andrew Zaborowski
2017-03-18  4:05 ` Denis Kenzior
2017-03-18 17:36   ` Andrew Zaborowski
2017-03-20 14:53     ` Denis Kenzior
2017-03-20 16:53       ` Andrew Zaborowski
2017-03-20 18:17         ` Denis Kenzior [this message]
2017-03-23 15:29           ` Andrew Zaborowski
2017-03-23 15:12 Andrew Zaborowski
2017-03-27  5:07 ` Denis Kenzior
2017-03-27 21:34   ` Andrew Zaborowski
2017-03-27 23:23 Andrew Zaborowski
2017-03-27  9:23 ` Denis Kenzior

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=483511e0-bb23-a0c8-3959-cccf04170729@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ell@lists.01.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.