All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [RFC 2/2] doc: Add description for history agent interface
Date: Wed, 02 Feb 2011 13:22:52 -0600	[thread overview]
Message-ID: <4D49AF0C.4030809@gmail.com> (raw)
In-Reply-To: <A459777776EB4841B844E1134E7928740157A1C4@008-AM1MPN1-016.mgdnok.nokia.com>

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

Hi Mikhail,

> 
> Am I right in assuming that the SMS history roundtrip is not performed before acking the constituent TPDUs to the network? If it is, we have problems even regardless of D-Bus method call timeouts.
> 

This has been discussed to death a bazillion times.  So lets recap very
quickly:

AT modems have two ways of delivering SMS messages:
- CMTI
- CMT

CMTI delivery means the message goes to the SIM / ME store first, and
then signaled up.  The modem takes care of automatically acking the
message in this case.  CMT delivery gives the message straight to the
sms driver and expects messages to be acked.

Here's the problem, half the modems in this world don't support CMTI
delivery, the other half does not support CMT delivery.  oFono core does
not know or care what mechanism is used.  It is the driver's
responsibility to ack the received pdu.

If CMTI delivery is used, then the core has to care about SIM / ME
storage, reading of the SMS store and managing free space -> disaster
area.  Been there, got the t-shirt.

If CMT delivery is used, you have to ack the message in a 'reasonable'
period of time.  If you do not, then the modem silently (e.g. it does
not tell you) turns off SMS delivery.  Of course you can send a negative
ack, however, there is no mechanism that I'm aware of to tell the
network you can receive SMS messages again -> disaster area.

Another fun fact about CMT delivery is that if you do not ack in a
'reasonable' amount of time, the modem _silently_ turns off SMS
delivery.  So putting acks over D-Bus is simply a bad idea.

So oFono:
 1. Parses the SMS
 2. If the SMS is a multi-fragment SMS, it is written to store
2a. If the SMS is the last missing fragment goes to step 2b, otherwise
goes to step 5
2b. re-assembles the sms and removes intermediate store
 3. Signals the SMS over D-Bus / history
 4. Returns control to the driver which is responsible for acking the
SMS if needed.

All of this happens synchronously.  If oFono crashes in steps 1..3, the
message is never acked.  If your history plugin writes to its
intermediate store (which it has to anyway) and fsyncs, there are no issues.

So yes, there might be conditions where you crash before fsync really
completes and you lose the SMS.  However, there's nothing in the world
you can do about this case anyway, since both the write and the fsync
succeeded.

> 1. The history service may be activated on demand by a well-known name.

D-Bus service activation on system bus is not available, please stop
bringing this up.

> If this is in fact mandatory, we'll have problems in making telepathy-ring serve as the history plugin. We want it in the storage path for architectural simplicity: commhistory daemon is by design a Telepathy logger that works basically the same way for all connection managers.
> 
> 2. You don't want multiple entities to observe events pertaining to oFono communication history and be able to control spooling while not being regulated by oFono.
> If this is a concern, I think it's outweighed by greater simplicity and flexibility, and the idea that access policy should be defined outside of the implementation.
> 
> 3. For call history, you need reliable storage of call events before you can proceed handling the call with the interactive client signaling.
> I thought this is entirely up to the application and as such does not have to be in scope for oFono. Correct me if I'm wrong.
> 

Sorry but I do not understand the above two points.  Can you clarify
what exactly you mean here?  The actual history storage is indeed not in
scope of oFono.  That is up to the system integrator to figure out.

Regards,
-Denis

  reply	other threads:[~2011-02-02 19:22 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-01 17:29 [RFC 2/2] doc: Add description for history agent interface Marcel Holtmann
2011-02-02 13:23 ` Kai.Vehmanen
2011-02-02 16:43   ` Marcel Holtmann
2011-02-02 18:14     ` mikhail.zabaluev
2011-02-02 19:22       ` Denis Kenzior [this message]
2011-02-02 22:56         ` Kai.Vehmanen
2011-02-02 23:12           ` Marcel Holtmann
2011-02-03 10:54             ` mikhail.zabaluev
2011-02-03  7:13           ` Denis Kenzior
2011-02-03 10:11             ` Kai.Vehmanen
2011-02-03 12:42             ` mikhail.zabaluev
2011-02-03 11:57         ` mikhail.zabaluev
2011-02-03 15:58           ` Denis Kenzior
2011-02-02 19:32       ` Marcel Holtmann
2011-02-03 12:22         ` mikhail.zabaluev
2011-02-03 16:11           ` Denis Kenzior
2011-02-04  9:23             ` mikhail.zabaluev
2011-02-04 12:58               ` Marcel Holtmann
2011-02-04 16:52                 ` mikhail.zabaluev
2011-02-04 17:05                   ` Denis Kenzior
2011-02-04 18:07                     ` mikhail.zabaluev
2011-02-04 18:13                       ` Marcel Holtmann
2011-02-04 18:52                         ` mikhail.zabaluev
2011-02-04 19:01                           ` Denis Kenzior
2011-02-04 19:01                           ` Marcel Holtmann
2011-02-04 19:33                             ` mikhail.zabaluev
2011-02-04 19:48                               ` Marcel Holtmann
2011-02-04 18:27                       ` Denis Kenzior
2011-02-04 19:17                         ` mikhail.zabaluev
2011-02-04 19:22                           ` Marcel Holtmann
2011-02-04 19:27                           ` Denis Kenzior
2011-02-04 17:15                   ` Marcel Holtmann
2011-02-04 18:32                     ` mikhail.zabaluev
2011-02-02 22:55     ` Kai.Vehmanen
2011-02-02 23:06       ` Marcel Holtmann

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=4D49AF0C.4030809@gmail.com \
    --to=denkenz@gmail.com \
    --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.