-
CR7
Hi i need email password data
-
lovetox
so about pep, say someone publishes something over pep, for example avatar or nickname
-
lovetox
and i cache that info so i can show it before i connect to the server
-
lovetox
if the contact deleted his node, im stuck forever wth the data
-
lovetox
there is nothing that informs me that the node was deleted, if i was offline at the time of deletion
-
lovetox
question is, should i care?
-
Zash
Some of the PEP XEPs talk about publishing a mostly empty payload to remove stuff.
-
lovetox
basically every pep xep says if you want the data to be deleted, you need to publish empty info, not delete the node
-
Zash
.
-
Zash
I've thought about implementing https://xmpp.org/extensions/xep-0312.html to help with that.
-
Zash
The minimum subset of PubSub features needed for PEP doesn't include node deletion (or creation for that matter)
-
Zash
Or
-
lovetox
i think i just dont care, and offer some kind of cache reset button
-
Zash
https://xmpp.org/extensions/xep-0163.html#defaults
-
Zash
It does
-
Zash
lovetox: Could roll a dice and have some expiry time.
-
lovetox
i thought about that
-
lovetox
i think i add the timestamp, can be useful and i can do some expiry magic
-
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.
-
lovetox
but i dont fetch all the items, i only fetch what i currently need and display
-
lovetox
also sound inefficient
-
lovetox
bascially if i have a table with 1000 rows, you say i should update all 1000 with "expired"
-
Zash
Could do it by having a generation number, that increases every time restart / reconnect or something
-
lovetox
i dont see the benefit over just storing the last received timestamp
-
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.
-
lovetox
hm, there is so much pep data
-
Zash
And when does anyone except me delete nodes anyway?
-
Zash
Is that a common thing?
-
lovetox
i dont think so whats more common is that someone uses a client that supports UserTune
-
lovetox
then switches client which does not support it
-
lovetox
from now on the tune is stuck forever
-
lovetox
thats why i want you to implement pubsub expiry feature :)
-
Zash
:)
-
lovetox
there are some pep xep where the data is simply not useful > 24 hours
-
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.
-
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.