Re: [Standards] Proposed changes to XEP-0135

2011-12-09 Thread Peter Saint-Andre
Jefry has sent me a patch. I'll work to process it soon.

On 11/28/11 3:07 PM, Jefry Lagrange wrote:
 Thanks for your response. ;-)
 
 I'm not sure it's a good idea to overload the disco request this way.
 Perhaps having the filter in a separate namespace would be ok, but I
 think perhaps it would be better to use another protocol for this.
 
 
 Yeah, I wasn't sure about it either. But this way is at least
 consistent with what the XEP says about asking for file information.
 
 The XEP currently uses disco requests extensively in section 4 and 5.
 If disco overuse is a problem, wouldn't it be better to stop using it
 in those sections as well?
 
 Alternatively we could use a new stanza, like match /match, with a
 new namespace. But it wouldn't be consistent. We would want to keep
 requesting file list and requesting file information, within the
 same namespace as finding specific files.
 
 The filter I propose has no new elements. Everything is reused from
 XEP-122. A new extension for it would be small, and it wouldn't
 contain new information.
 
 
 Cheers,
 
 On Mon, Nov 28, 2011 at 9:41 AM, Matthew Wild mwi...@gmail.com wrote:
 On 27 November 2011 03:50, Jefry Lagrange jefry.re...@gmail.com wrote:
 Hi, I been working on some changes to XEP-0135.

 * Replacing SI file transfer with jingle FT

 Good :)

 * Replacing section 6, with a link pointing to section 5 of XEP-0234,
 which already covers the same function.

 Makes sense.

 * Adding support for pubsub, only for finding files using the method I
 introduce bellow. It doesn't make much sense to traverse the directory
 of every user subscribed to a pubsub, but it will make a lot of sense
 searching for specific files. (XEP-0137 does not suffice for this)

 Agreed.

 5.5 Finding Specific Files

 Finding files by asking for a file list is not very practical if there
 are too many files being shared. It is very resource intensive and it
 is understood that the user may not be interested in all of the files,
 but rather he or she would be interested in finding one specific file
 or one specific kind of file (text, image or videos).

 In order to do this, the identity stanza is used to match files by one
 or more fields i.e. 'name', 'date', 'size', etc...

 Example XX. Finding Specific Files

 iq type='get'
from='ha...@shakespeare.lit/pda'
to='darkc...@shakespeare.lit'
id='find45'
  query xmlns='http://jabber.org/protocol/disco#info'
 node='files'
 identity category='filesys' type='file' name='file1' /
  /query
 /iq


 I'm not sure it's a good idea to overload the disco request this way.
 Perhaps having the filter in a separate namespace would be ok, but I
 think perhaps it would be better to use another protocol for this.

 Example XX. Finding files using Regular Expressions


 Another useful feature, but I even more strongly feel this shouldn't
 be done over disco.

 Any feedback would be greatly appreciated, I just want to know if I am
 on the right track here.

 Absolutely, I'd love to see this spec revived. I look forward to
 seeing a new XEP draft :)

 Regards,
 Matthew



Re: [Standards] Proposed changes to XEP-0135

2011-11-28 Thread Jefry Lagrange
Thanks for your response. ;-)

I'm not sure it's a good idea to overload the disco request this way.
Perhaps having the filter in a separate namespace would be ok, but I
think perhaps it would be better to use another protocol for this.


Yeah, I wasn't sure about it either. But this way is at least
consistent with what the XEP says about asking for file information.

The XEP currently uses disco requests extensively in section 4 and 5.
If disco overuse is a problem, wouldn't it be better to stop using it
in those sections as well?

Alternatively we could use a new stanza, like match /match, with a
new namespace. But it wouldn't be consistent. We would want to keep
requesting file list and requesting file information, within the
same namespace as finding specific files.

The filter I propose has no new elements. Everything is reused from
XEP-122. A new extension for it would be small, and it wouldn't
contain new information.


Cheers,

On Mon, Nov 28, 2011 at 9:41 AM, Matthew Wild mwi...@gmail.com wrote:
 On 27 November 2011 03:50, Jefry Lagrange jefry.re...@gmail.com wrote:
 Hi, I been working on some changes to XEP-0135.

 * Replacing SI file transfer with jingle FT

 Good :)

 * Replacing section 6, with a link pointing to section 5 of XEP-0234,
 which already covers the same function.

 Makes sense.

 * Adding support for pubsub, only for finding files using the method I
 introduce bellow. It doesn't make much sense to traverse the directory
 of every user subscribed to a pubsub, but it will make a lot of sense
 searching for specific files. (XEP-0137 does not suffice for this)

 Agreed.

 5.5 Finding Specific Files

 Finding files by asking for a file list is not very practical if there
 are too many files being shared. It is very resource intensive and it
 is understood that the user may not be interested in all of the files,
 but rather he or she would be interested in finding one specific file
 or one specific kind of file (text, image or videos).

 In order to do this, the identity stanza is used to match files by one
 or more fields i.e. 'name', 'date', 'size', etc...

 Example XX. Finding Specific Files

 iq type='get'
    from='ha...@shakespeare.lit/pda'
    to='darkc...@shakespeare.lit'
    id='find45'
  query xmlns='http://jabber.org/protocol/disco#info'
         node='files'
     identity category='filesys' type='file' name='file1' /
  /query
 /iq


 I'm not sure it's a good idea to overload the disco request this way.
 Perhaps having the filter in a separate namespace would be ok, but I
 think perhaps it would be better to use another protocol for this.

 Example XX. Finding files using Regular Expressions


 Another useful feature, but I even more strongly feel this shouldn't
 be done over disco.

 Any feedback would be greatly appreciated, I just want to know if I am
 on the right track here.

 Absolutely, I'd love to see this spec revived. I look forward to
 seeing a new XEP draft :)

 Regards,
 Matthew




-- 
Jefry Lagrange


[Standards] Proposed changes to XEP-0135

2011-11-26 Thread Jefry Lagrange
Hi, I been working on some changes to XEP-0135.

* Replacing SI file transfer with jingle FT

* Replacing section 6, with a link pointing to section 5 of XEP-0234,
which already covers the same function.

* Adding support for pubsub, only for finding files using the method I
introduce bellow. It doesn't make much sense to traverse the directory
of every user subscribed to a pubsub, but it will make a lot of sense
searching for specific files. (XEP-0137 does not suffice for this)

For example:

A user is subscribed to the books pubsub channel. It sends a query,
looking for a book Romeo and Juliet - By Shakespeare. The
subscribers reply if they get a match with information about their
files. The initiator requests the file from whoever has what he wants
and file transfer starts.


* A new section should be added to cover finding files by providing a
criteria, instead of just asking for all the files.

For example:

5.5 Finding Specific Files

Finding files by asking for a file list is not very practical if there
are too many files being shared. It is very resource intensive and it
is understood that the user may not be interested in all of the files,
but rather he or she would be interested in finding one specific file
or one specific kind of file (text, image or videos).

In order to do this, the identity stanza is used to match files by one
or more fields i.e. 'name', 'date', 'size', etc...

Example XX. Finding Specific Files

iq type='get'
from='ha...@shakespeare.lit/pda'
to='darkc...@shakespeare.lit'
id='find45'
  query xmlns='http://jabber.org/protocol/disco#info'
 node='files'
 identity category='filesys' type='file' name='file1' /
  /query
/iq


The fields in the identity stanza, are optional, but at least one
field MUST be provided. In this example, the responders will match its
files looking for the file names that contain 'file1' and are of the
size 1024..

Example XX. Returning with Matched Files

iq type='result'
from='darkc...@macbeth.shakespeare.lit'
to='ha...@shakespeare.lit/pda'
id='find45'
  query xmlns='http://jabber.org/protocol/disco#info'
 node='files/somefile'
identity category='filesys' type='file' name='file1'
hash='552da749930852c69ae5d2141d3766b1'/
  /query
/iq


A responding entity MUST include the name and the hash of the file.
Since more than one responder may respond with the same file, it is
strongly suggested that the initiator makes use of ranged file
transfers (as defined in XEP-0234), to speed up the file transfer.

Example XX. Finding files using Regular Expressions

Regular expressions may be use to find files that match the
expression. One or more fields can be used. The label attribute is
optional.

iq type='get'
 from='ha...@shakespeare.lit/pda'
to='darkc...@shakespeare.lit'
id='find46'
query xmlns='http://jabber.org/protocol/disco#info'
 node='files'
 identity category='filesys' type='file' name='file1'/
x xmlns='jabber:x:data' type='get'
field var='ssn' type='text-single' label='Social Security Number'
regex([0-9]{3})-([0-9]{2})-([0-9]{4})/regex
  /field
  /query
/iq

The XML character data of this element is the pattern to apply. The
syntax of this content MUST be that defined for POSIX extended regular
expressions, including support for Unicode.

The regex/ element MUST contain character data only (i.e., not
contain any child elements) and MUST NOT possess any attributes.


Any feedback would be greatly appreciated, I just want to know if I am
on the right track here.


-- 
Jefry Lagrange