On Wed Jan 21 20:51:55 2009, Kevin Smith wrote:
4) Message Mine-ing
  What do we do?

Several objections, but agreement that a spec to address these problems
is needed, and rough agreement to publish both this and an upcoming
alternative to experimental and to compare them both once they're 'out
there'.

Attached is part of a solution to the (largely unstated) problem.

I consider this a logical, and relatively simple, extension to existing client logic for handling messages. It requires no server support. It's modular, explicit, and flexible.

The other parts of the solution are:

1) A refinement on the remote control ad-hoc commands to send only some pending messages. (Not really essential, but might be nice).

2) A mechanism Kev proposed for raising priority dynamically relative to other resources based on user activity (as opposed to current practise, which is lowering it due to use inactivity without looking at other clients).

Dave.
--
Dave Cridland - mailto:[email protected] - xmpp:[email protected]
 - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
 - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade
Title: XEP-: Intra-Jid State Exchange

XEP-: Intra-Jid State Exchange

Copyright (c) 1999 - 2009 XMPP Standards Foundation. See Legal Notices.


This document specifies both a generic method for clients to advertise state between resources of the same bare jid, and some concrete states useful for exchange.

WARNING: This Standards-Track document is Experimental. Publication as an XMPP Extension Protocol does not imply approval of this proposal by the XMPP Standards Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems should not deploy implementations of this protocol until it advances to a status of Draft.


Table of Contents


1. Introduction

There are times when it is beneficial for different client instances - ie, available resources - to exchange information on their current state which is not for public consumption.

One typical example is when messages are pending, apparently unread, perhaps because the user is currently physically present at a different client. This case arises whenever a user "walks away" from a client, and we address this case in .

However, since such a mechanism may be used for other kinds of state we have not forseen, the design is built to be extensible and adaptable.

2. Overview

<presence/> stanzas are typically send either broadcast (ie, with no to) or directed (ie, with a to address) by clients. If sent to a bare jid, they are broadcast to all available resources.

Therefore, by sending a directed <presence/> to the user's own bare jid (<[email protected]>), all the user's available resources will receive this <presence/> stanza, and not the user's contacts. If the client adds special private state to this broadcast, then that state can be consumed by the other resources, by displaying it to the user or acting directly upon it.

This specification proposes a single container element for such state; a <private> element qualified by the "urn:xmpp:private-state" namespace.

Example 1. A ficticious private state

<presence to="[email protected]">
  <private xmlns="urn:xmpp:private-state">
     <ovalkwik xmlns="http://ovalkwik.lit/">0.0</ovalkwik>
  </private>
</presence>
  

Since a further <presence/> broadcast will also be delivered to all available resources, and will be indistguishable from a self-directed <presence/>, a strategy is employed to distinguish between them: <presence/> stanzas containing private state data MUST NOT contain any other data, and MUST be self-directed.

3. Service Discovery

There is no disco feature for private state messages - individual payloads SHOULD define features, however, which will imply usage of private state.

4. Missing Messages

Typically, chat sessions in XMPP occur by one end sending a message from a full jid to a bare jid, and the server deciding (via priority) upon a resource to send the message to. The recipient then replies, stamping the message with his full jid, and both ends "lock" to this full jid combination.

For the most part, this strategy works fine, but two things can (and do) go wrong. Firstly, the initial selection of the correct resource can go awry, either because the user recently walked away from his desk (taking his mobile client, of course), or simply due to a misconfiguration of priority.

Equally, if either user walks away from the client during the conversation, then messages will still be "locked" to a full jid until an updated <presence/> is seen (assuming one is seen at all).

Clients are typically somewhat aware of whether a message has been seen. They already employ UI strategies such as flashing in the taskbar, or the system tray, when unread messages are likely to exist. These strategies won't work, of course, when the user isn't physically present to witness them, and so, using the private state mechanism described above, this document proposes a method for signalling unread messages over the network to all the user clients.

First off, a quick example:

Example 2. Taken from Schlock Mercenary 20081213

    <!-- Bare-jid message commences chat session -->
    <message from="[email protected]/foo"
               to="[email protected]">
      <body>Sarge, we are NOT falling straight! We're curving!</body>
    </message>

    <!-- Schlock replies with full jid message. -->
    <message from="[email protected]/bar"
               to="[email protected]/foo">
      <body>It's not us. It's the rotating reference frame.</body>
    </message>

    <!-- Elephant is now locked on. -->
    <message from="[email protected]/foo"
               to="[email protected]/bar">
      <body>MAKE IT STOP!</body>
    </message>

    <!-- Schlock is a bit busy -->

    <!-- After a while, his client decides to signal other resources. -->
    <presence from="[email protected]/bar"
                to="[email protected]">
      <private xmlns="urn:xmpp:private">
        <pending-messages xmlns="urn:xmpp:private:pending">
           <pending from="[email protected]" count="1"/>
        </pending-messages>
      </private>
    <presence>

    <!-- Ah, but Schlock has returned to his client. -->
    <presence from="[email protected]/bar"
                to="[email protected]">
      <private xmlns="urn:xmpp:private">
        <pending-messages xmlns="urn:xmpp:private:pending"/>
      </private>
    <presence>

    <!-- And replies -->
    <message from="[email protected]/bar"
               to="[email protected]/foo">
      <body>It'll stop when we hit.</body>
    </message>

5. Security Considerations

Clients MUST NOT send private data in presence broadcasts.

Self-directed presence is unencrypted and visible to the server, therefore it SHOULD be restricted to data that is already known to the server, and MUST be restricted to data which the user is happy for the server to be aware of.

6. IANA Considerations

This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [1].

7. XMPP Registrar Considerations

This document requires no interaction with the XMPP Registrar [2].


Appendices


Appendix A: Document Information

Series: XEP
Number:
Publisher: XMPP Standards Foundation
Status: Experimental
Type: Standards Track
Version: 0.0.1
Last Updated: 2009-01-21
Approving Body: XMPP Council
Dependencies: XMPP Core
Supersedes: None
Superseded By: None
Short Name: N/A
Source Control: HTMLRSS


Appendix B: Author Information

Dave Cridland

Email: [email protected]
JabberID: [email protected]


Appendix C: Legal Notices

Copyright

This XMPP Extension Protocol is copyright (c) 1999 - 2009 by the XMPP Standards Foundation (XSF).

Permissions

Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. In no event shall the XMPP Standards Foundation or the authors of this Specification be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising out of the use or inability to use the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which may be found at <http://xmpp.org/extensions/ipr-policy.shtml> or obtained by writing to XSF, P.O. Box 1641, Denver, CO 80201 USA).

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.


Appendix E: Discussion Venue

The primary venue for discussion of XMPP Extension Protocols is the <[email protected]> discussion list.

Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.

Errata may be sent to <[email protected]>.


Appendix F: Requirements Conformance

The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".


Appendix G: Notes

1. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.

2. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <http://xmpp.org/registrar/>.


Appendix H: Revision History

Version 0.0.1 (2009-01-21)

Init, innit?

(dwd)

END

Attachment: intra-jid-status.xml
Description: XML document

Reply via email to