Re: [Standards] XEP-0012: Last Activity's future

2013-02-18 Thread Nathan Walp
On 02/18/2013 09:18 AM, Tobias Markmann wrote:
> Hi,
>
> So currently we have XEP-0012 which we don't like because of the
> relative time semantic, it uses. In addition that it is currently used
> for two different purposes:
> 1. Discover the time a disconnected user last accessed its account
> (i.e. was online).
> 2. Discover when a connected user was last active at the server. (The
> XEP calls it idle time, which would be some kind of server access idle
> time if i read it right)
>
> Note: XEP-0256 seems to do the same as 2) but using presence.
>
> I suggest we deprecate XEP-0012 and XEP-0256. Purpose 1) can be done
> using presence + delayed delivery, like described
> at http://tools.ietf.org/html/rfc6121#page-54. This would
> automatically use absolute time.
>
> Don't think 2) is the semantic we ever wanted. Under idle time I
> understand the time someone has been away from his machine/device. The
> most common way to detect this is missing input
> (keyboard/mouse/touch). In my opinion neither XEP-0012 nor XEP-0256
> describe such behavior.
> That's why I propose to use a new protocol, like
> this https://dl.dropbox.com/u/14672346/xmpp/extensions/xep-0256-replace.html
> .
>
> Not to forget the suggested security notice, suggested by Matt, to
> Date and Time Profiles on possible geo privacy leak. 
>
> Opinions? Feedback?
>
> Cheers,
> Tobi

+1

I had been drafting almost this exact spec in my spare time, but happy
for someone to actually get it done.


Re: [Standards] XEP-0012 And Absolute Time

2013-01-24 Thread Nathan Walp
On 01/23/2013 05:42 PM, Tobias Markmann wrote:
> Hi,
>
> kind of as follow up post to my recent lone message here a more
> general approach to the problem.
>
> How about adding an optional attribute to XEP-0012's query stanza (eg.
> stamp) for indicating absolute time. Depending on what you use the
> time for you might require the entities in XMPP to be synced in time.
> This would be backward-compatible, by still requiring seconds
> attribute and having an optional stamp attribute. So it would look like:
>
>  stamp='2012-09-10T23:41:07Z' />
>
>
> With relative time, the only way to do it now, to get absolute time
> you either have to ping the remote party for its current time (+
> transmission delay) or use your own time. Either way you get something
> but probably not the actual absolute time of the described event.
>
> Thoughts? Opinions?
>
> Cheers,
> Tobi

Somewhat related:
http://mail.jabber.org/pipermail/standards/2012-October/026887.html


[Standards] XEP-0256 (Last Activity in Presence) questions/issues

2012-10-15 Thread Nathan Walp
Hi All,

I apologize that I didn't bring this up several years ago when this XEP
first popped up, but I was on a (long) hiatus from my open source work,
and really wasn't following anything in XMPP-land.

I've been reviewing the XMPP code in libpurple (basis of Pidgin, Finch,
and Adium), and was looking into some issues with the XEP-0256
handling.  There are 2 separate issues that I feel need addressing. 
Apologies if this has been discussed on here before, I couldn't find
anything in the archives.

First, the spec (much like XEP-0012 which it derives from) tries to
serve multiple purposes, serving as a mechanism for both "idle time" and
time since last login.  From XEP-0012:
>
>
> 7. Implementation Notes
>
> The information contained in an IQ reply for this namespace is
> inherently ambiguous. Specifically, for a bare JID
>  the information is the time since the JID was
> last connected to its server; for a full JID
>  the information is the time since the
> resource was last active in the context of an existing session; and
> for a bare domain the information is the uptime for the server or
> component. An application MUST take these differences into account
> when presenting the information to a human user (if any).
>
>

In XEP-0256, the 2 different pieces of information are how long since
last login (similar to the bare JID case in 0012), and "idle time" (the
full JID case in 0012).  In XEP-0256, the distinguishing difference
seems to be "initial presence" vs "away or extended away".  I feel like
this distinction is a little ambiguous.  In my client(s) (and I believe
in several others) the concepts of "away" and "idle" are independent, so
there's nothing preventing you from being "idle" without being "away". 
Also, from my understanding of XMPP (and someone please correct me if
I'm wrong here), there's nothing wrong with an initial presence having a
'show' tag contianing 'away' or 'xa'.

So given a presence packet , I can't tell if I'm being told how idle a
user is, or how long it has been since they logged in. 


The second issue is that some servers (notably google/gmail) don't seem
to implement XEP-0203 (Delayed Delivery) for presence packets, so even
if I knew which piece of information is being conveyed to me, I can't
reliably tell how stale that information might be if I recently
reconnected, or if the servers recently went through some sort of
split/join event.  When I first log in, it looks like all my idle gmail
buddies have been idle for 5 minutes or 10 minutes (depending on how
they have their client set up).


Apple seems to have invented their own (undocumented as far as I can
tell, but pretty self-explanatory) protocol for idle time.  It looks like:


2012-10-15T16:37:07Z



Even without documentation, I like that this is much clearer about the
information being conveyed, and frankly I'd rather deal with the
(increasingly rare) problem of clock drift, than something not being
implemented by a particular server.  I think we could take this "style"
of protocol, and perhaps add "previous-login" and "online-since" to
cover all of the XEP-0012 bases.  I'm assuming it would be a bad idea to
just document their protocol, especially if we add to it (or they change
it).

Any thoughts?


-Nathan