On Thu, 17 Sep 2020 at 18:10, Tedd Sterr <[email protected]> wrote:
> Would it ever make sense to set the limit to zero? If not, maybe max='0'
> could be more appropriate ("no limit").
>
Yes, it makes sense - it means the node stores no items. I think the MIX
messaging node is like that (since you query an archive for old messages).
> Alternatively, I presume 31 bits would be a safe* maximum positive integer
> value (max='2147483647').
>
Generally, I'd avoid this. It smacks of "640k should be enough for anyone"
- not true back in 1981, which explains why Gates didn't say it.
Either:
-1 (though that might be annoying as it forces the thing to be signed).
A distinct boolean to say whether there is a limit, which is automatically
set to false if the max-items is explicitly set without explicitly setting
this field.
>
>
> * Limits are 'bad,' but I don't see anyone realistically needing 2 billion
> entries, nor a server storing them.
>
>
>
> ------------------------------
> *From:* Standards <[email protected]> on behalf of Maxime Buquet
> <[email protected]>
> *Sent:* 16 September 2020 23:49
> *To:* [email protected] <[email protected]>
> *Subject:* [Standards] XEP-0060: max #max_items
>
> Hi Standards,
>
>
> A year ago during a sprint we worked on implementing bookmarks2 and
> submitted a few changes to the spec at the same time.
>
> We also submitted a change to PubSub [0] [1] to allow a client to say
> “Set pubsub#max_items to whatever the server max is” so that multiple
> clients don't rewrite each other's max value every single time
> (alternatively saving the "get" step when configuring the node).
>
> This change to PubSub has been met with some ““resistance”” by the
> prosody team because the proposed value “max” is not a number and
> doesn't fit the way they currently handle things with XEP-0122 (Data
> Forms Validation), setting this value to “integer”.
>
> While this is more restrictive than what PubSub mandates (text-single),
> it does indeed make sense to have a “maximum number of items” be
> restricted to an int (not discussing which particular type of int, if
> there is). And while it's certainly not impossible for them to handle
> this “max” value, that would mean going through various hoops with 0122
> to get this right.
>
> “-1” was proposed as a placeholder instead.
>
> While it doesn't exactly sit right with me wrt. semantics, I don't
> particularly mind and I am currently looking for the path of least
> resistance.
>
> So I just opened a PR. https://github.com/xsf/xeps/pull/984
>
> Now I'm not entirely sure which path is gonna resist me most.. Prosody
> or Council? :x
>
> I'm indeed introducing breaking changes for a one-year old feature with
> this. I have to admit I'm not entirely fond of introducing yet another
> disco feature for the exact same meaning and for a feature that's
> probably not used[2], but I would update the PR with some guidance if
> necessary.
>
>
> Happy Hacking,
>
>
> [0]: https://mail.jabber.org/pipermail/standards/2019-October/036502.html
> [1]: https://github.com/xsf/xeps/pull/840
> [2]: Some clients implemented bookmarks2 during the sprint, but most
> have put it behind a flag and/or not even merged yet. I don't think
> any publicly available server implements it?
> _______________________________________________
> Standards mailing list
> Info: https://mail.jabber.org/mailman/listinfo/standards
> Unsubscribe: [email protected]
> _______________________________________________
>
_______________________________________________
Standards mailing list
Info: https://mail.jabber.org/mailman/listinfo/standards
Unsubscribe: [email protected]
_______________________________________________