All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: Re: [PATCH 0/4 v2] Network Time plugin
Date: Mon, 03 Jan 2011 12:47:36 -0800	[thread overview]
Message-ID: <1294087656.5852.22.camel@aeonflux> (raw)
In-Reply-To: <201101031700.17266.remi.denis-courmont@nokia.com>

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

Hi Remi,

> > So the idea of having an oFono D-Bus API to export time information is
> > just wrong from my point of view. The plugin inside oFono should tell
> > the time daemon about this.
> 
> That would be race-prone by design. For all we know, the time daemon might be 
> started after oFono (or restarted). It's pretty basic design to have a getter 
> and a change signal for any kind of value.

there is no race here. The timed plugin inside oFono can just keep the
time and only send it out when timed starts. You can easily monitor
deamons lifetime with D-Bus.

> Besides, I find hard-coding The One time daemon in the oFono plugin rather 
> silly. It's really nothing but an arbitrary design limitation that would be 
> overcome with a clean D-Bus API like we proposed several times.

It is a plugin that monitors the existence of such a daemon. So we can
have multiple plugins for each daemon. And we can even have them all
active at the same time. So where do you see a problem here?

> > And not the time daemon go out and bother
> > with additional sources etc.
> 
> Last time I checked, NTP clients "go out and bother" to ask the configured NTP 
> server, not the other way around. I fail to see reason why oFono should work 
> the other way around. I do see several reasons why it should not.

You need to tell NTP client (or the ntpd running) the time servers to
use. Check how we do that in ConnMan. we tell ntpd about time servers
and not the other way around.

> > And if you take the normalized time based on a monotonic clock, such a
> > plugin that just send a D-Bus message to a time daemon is actually a lot
> > simpler than exposing a full blown D-Bus interface.
> 
> It's very marginally simpler: one signal against one signal plus one getter 
> that will share much marshalling code with the signal. But that's irrelevant. 
> It actually works. The sole signal design is broken.

I was talking about a method call to timed and not a signal.

> > So the plugin just has to store the normalized time in memory. And if a
> > time daemon is present, then send out an update if needed, otherwise
> > don't bother.
> 
> Oh? That would actualy be far more complicated, as the plugin would then need 
> to track down the presence of the time daemon. I see some contradiction here.

And that is a problem with D-Bus how? With g_dbus_add_service_watch this
is dead simple actually. Simpler than providing a D-Bus interface.

Regards

Marcel



  reply	other threads:[~2011-01-03 20:47 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-10  7:53 [PATCH 0/4 v2] Network Time plugin Antti Paila
2010-12-10  7:53 ` [PATCH 1/4 v2] plugins: Implementation of " Antti Paila
2010-12-10  7:53 ` [PATCH 2/4 v2] plugins: Enabling nettime plugin in Makefile.am Antti Paila
2010-12-10  7:53 ` [PATCH 3/4 v2] plugins: Test scripts for nettime plugin Antti Paila
2010-12-10  7:53 ` [PATCH 4/4 v2] plugins: Documentation " Antti Paila
2010-12-21  7:34 ` [PATCH 0/4 v2] Network Time plugin Antti Paila
2010-12-21 14:17   ` Marcel Holtmann
2010-12-21 15:54     ` Aki Niemi
2010-12-21 16:25       ` Marcel Holtmann
2010-12-21 17:04         ` Aki Niemi
2010-12-21 16:39       ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2010-12-21 17:02         ` Aki Niemi
2010-12-23  2:44       ` Marcel Holtmann
2011-01-03 15:00         ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-03 20:47           ` Marcel Holtmann [this message]
2011-01-04  8:54             ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-04  9:41               ` Marcel Holtmann
2011-01-04 13:37                 ` Aki Niemi
2011-01-04 21:49                   ` Marcel Holtmann
2011-01-05  8:29                     ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-05 10:14                       ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-07 10:32                     ` Antti Paila
2011-01-07 21:05                       ` Marcel Holtmann
2011-01-10  8:01                         ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont

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=1294087656.5852.22.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=ofono@ofono.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.