jdev - 2021-02-20


  1. CR7

    Hi i need email password data

  2. lovetox

    so about pep, say someone publishes something over pep, for example avatar or nickname

  3. lovetox

    and i cache that info so i can show it before i connect to the server

  4. lovetox

    if the contact deleted his node, im stuck forever wth the data

  5. lovetox

    there is nothing that informs me that the node was deleted, if i was offline at the time of deletion

  6. lovetox

    question is, should i care?

  7. Zash

    Some of the PEP XEPs talk about publishing a mostly empty payload to remove stuff.

  8. lovetox

    basically every pep xep says if you want the data to be deleted, you need to publish empty info, not delete the node

  9. Zash

    .

  10. Zash

    I've thought about implementing https://xmpp.org/extensions/xep-0312.html to help with that.

  11. Zash

    The minimum subset of PubSub features needed for PEP doesn't include node deletion (or creation for that matter)

  12. Zash

    Or

  13. lovetox

    i think i just dont care, and offer some kind of cache reset button

  14. Zash

    https://xmpp.org/extensions/xep-0163.html#defaults

  15. Zash

    It does

  16. Zash

    lovetox: Could roll a dice and have some expiry time.

  17. lovetox

    i thought about that

  18. lovetox

    i think i add the timestamp, can be useful and i can do some expiry magic

  19. Zash

    What if, when connecting and going online and fetching all the cached items, you mark those as expired. If a new PEP notification comes in, that replaces the previously cached thing. Then next time, ignore those marked as expired.

  20. lovetox

    but i dont fetch all the items, i only fetch what i currently need and display

  21. lovetox

    also sound inefficient

  22. lovetox

    bascially if i have a table with 1000 rows, you say i should update all 1000 with "expired"

  23. Zash

    Could do it by having a generation number, that increases every time restart / reconnect or something

  24. lovetox

    i dont see the benefit over just storing the last received timestamp

  25. Zash

    So first time you start, generation=1, anything you receive is saved with generation=1. You reboot. generation=2. anyting in the database with generation>=1 is used as cache, purge generation<0. etc.

  26. lovetox

    hm, there is so much pep data

  27. Zash

    And when does anyone except me delete nodes anyway?

  28. Zash

    Is that a common thing?

  29. lovetox

    i dont think so whats more common is that someone uses a client that supports UserTune

  30. lovetox

    then switches client which does not support it

  31. lovetox

    from now on the tune is stuck forever

  32. lovetox

    thats why i want you to implement pubsub expiry feature :)

  33. Zash

    :)

  34. lovetox

    there are some pep xep where the data is simply not useful > 24 hours

  35. Zash

    We need an internal cron of some sort to keep track of all the time based expiry things we have now. MAM, HTTP upload, now this.

  36. Zash

    lovetox: The above is sorta like generational garbage collection, and based on that things should become stale once you go offline. So if you go offline then anything you have stored is stale, until you go online and it gets (maybe) refreshed.