XSF Discussion - 2023-03-18


  1. pep.

    So what should "publishing a pubsub item with an existing ID" do? keep the original published position? make it a new published item?

  2. singpolyma

    pep.: Remove the old item but bring to front the new item in order, sounds like

  3. pep.

    Should a retract be issued?

  4. pep.

    That'd be weird I guess..

  5. pep.

    edhelas, goffi ^

  6. pep.

    I guess as a client it "doesn't really matter", you'll want to use order-by when you depend on the order of items

  7. singpolyma

    I don't think you need a retract since you get the new item

  8. pep.

    But terminology matters for servers here, if we specify "discard-oldest" we need to know what oldest means so all implementations delete the same

  9. Guus

    What defines the age though? Creation date? Last update date?

  10. pep.

    To quote MattJ, "there is no date" :P

  11. pep.

    It'd be creation/publication time(date)

  12. pep.

    Guus, that's what we're trying to ""clarify""

  13. singpolyma

    Update "time"

  14. pep.

    "Update" isn't a specified operation it seems atm

  15. Guus

    To quote Buzz Lightyear: dates, dates everywhere

  16. pep.

    Only publication and retraction

  17. singpolyma

    Well, it is

  18. singpolyma

    That's what we're talking about

  19. singpolyma

    Publish with same ID overwrites

  20. pep.

    singpolyma, well the spec doesn't say, does it

  21. singpolyma

    And makes the item "new"

  22. pep.

    That's what we're trying to clarify

  23. singpolyma

    Sure, the discussion started because we need to add words that say that

  24. pep.

    Yes

  25. MattJ

    > If a publisher publishes an item and the ItemID matches that of an existing item, the pubsub service MUST overwrite the existing item and generate a new event notification.

  26. pep.

    > Note: If a publisher publishes an item with an Item ID and the ItemID matches that of an existing item, the pubsub service MUST NOT fail the publication but instead MUST overwrite the existing item and generate a new event notification (i.e., re-publication is equivalent to modification). This also.

  27. pep.

    > Note: If a publisher publishes an item with an Item ID and the ItemID matches that of an existing item, the pubsub service MUST NOT fail the publication but instead MUST overwrite the existing item and generate a new event notification (i.e., re-publication is equivalent to modification). This also.

  28. pep.

    So it's possible to modify an item?

  29. pep.

    But that still doesn't say much about the order IMO

  30. goffi

    pep.: publishing a item with existing ID is publishing a new item (i.e. not overwriting), so there is no position to keep. The Order-By XEP (XEP-0413) that I've authored introduces the overwriting notion, but with XEP-0060 alone, it's a new item, and the old one disappear (but I would not expect a retract).

  31. goffi

    and yes order-by is mentioned after, sorry I'm answering while reading.

  32. goffi

    with XEP-0060 alone, there is no "update"

  33. goffi

    again, it's introduced by XEP-0413

  34. pep.

    So.. there seems to be consensus already around the existing item being removed from the node and the new one to be published? In the two quotes above from 0060, it says "overwrite", which is confusing

  35. goffi

    yeah, no there is no overwrite, I remember talking about that with ralphm at some point.

  36. pep.

    So.. in 0060 there is no way to "update" an item. That settles it

  37. goffi

    yes

  38. goffi

    it's even said in XEP-0413: "In XEP-0060, there is no such thing as "updated item". This XEP changes the business logic as follow:" (in Glossary)

  39. pep.

    Yep thanks

  40. MattJ

    > It is RECOMMENDED for the service to follow the "first in, first out" rule and delete the oldest item. Depending on node configuration, deletion of an existing item MAY result in sending of a delete notification to the subscribers.

  41. pep.

    hmm

  42. pep.

    "Depending on node configuration"? Which one

  43. goffi

    BTW, slide topic change, but is the EDITOR situation fixed now?

  44. pep.

    EDITOR=vim. Fixed

  45. MattJ

    goffi: we had new editors step up before the resignation of the old one, so from that perspective there wasn't anything to fix

  46. pep.

    MattJ, pubsub#notify_delete? :/

  47. pep.

    So the default behaviour would be delete-oldest and not disacrd-oldest?

  48. MattJ

    Obviously there has been a period for the new editors to get up to speed, but we're getting there

  49. pep.

    Basically the "retract" I propose?

  50. pep. goes reading the difference between delete and retract

  51. MattJ

    pep.: I think it means retraction notifications

  52. MattJ

    I don't think there is anything else, but I'm prepared to be surprised by XEP-0060 as usual

  53. pep.

    Well there's notify_delete and notify_retract

  54. pep.

    Maybe delete applies to a node and not an item

  55. MattJ

    Makes sense, but do the notifications look any different to the recipient? 🤔

  56. goffi

    MattJ: OK thanks. I was wondering because I haven't seem much activities in XEPs lastly.

  57. pep.

    https://xmpp.org/extensions/xep-0060.html#publisher-delete Looks like it's the case yeah, delete -> node, retract -> items. Even though the use of "Delete" in the spec is confusing

  58. MattJ

    goffi: I think the email announcements of XEP changes are WIP, but stuff has been happening regardless

  59. goffi

    MattJ: OK great. And thanks to the people involved.

  60. MattJ

    Mostly Kev to thank right now 🙂

  61. goffi

    so thanks Kev :)

  62. pep.

    I'll modify this part of the spec as well then, the RECOMMENDED sentence

  63. goffi

    pep.: I have followed from a distance, but a delete by default would be niced from a caching point of view.

  64. goffi

    nicer*

  65. pep.

    what do you mean "a delete"?

  66. goffi

    I mean receiving a notification when items are retracted due to full node, instead of simply discarding them. Otherwise you don't know that you can remove the item from cache.

  67. pep.

    Well it seems the spec already recommends a retraction

  68. MattJ

    If the server's order is well-defined, and max_items is set and known, you should be able to work that out locally without the overhead of an additional notification on every publish

  69. pep.

    Yeah but the server should be able to do something about it anyway, when a publish happens in this case

  70. goffi

    if max_items is know it should be fine indeed, but is it given in node metadata by every pubsub service?

  71. MattJ

    I'm okay with that being configurable, and okay with it being default/recommended, but I would like it to be possible to silently discard old items if configured that way

  72. MattJ

    goffi: it should be

  73. MattJ

    It's one of the standard config fields

  74. pep.

    MattJ, if configured this way then sure. But that certainly shouldn't be the default as RECOMMENDED/SHOULD in the spec

  75. goffi

    I'm OK with it being configurable too, defintely, it should be configurable

  76. MattJ

    +1

  77. MattJ

    I'm pretty sure Prosody has no capability to notify in this case, but I can certainly add it

  78. goffi

    I don't think Libervia Pubsub does it either to be honest. Something to add in my (very very long) TODO list

  79. goffi

    That, and a way to redirect Prosody internal pubsub API to the component.