only if you want to tie into namespace bumps of either
jonasw
otherwise I’d suggest not to
jonasw
but I lack context
Seve/SouLhas joined
Ge0rG
Right. That might be unfortunate.
Ge0rG
Though I'd like to burn the notion of namespace bumps with fire anyway.
Dave Cridlandhas left
jonasw
what’s your suggestion what we should be doing instead?
Ge0rG
jonasw: feature-flags
Zash
and the difference is?
jonasw
hm, those help in some cases, but they don’t always make sense
Ge0rG
Zash: the difference is that it's a better protocol design and that it won't break people's expectations when they upgrade conversations without also upgrading ejabberd.
jonasw
Ge0rG, how?
dwdhas left
jonasw
the http upload update is a particularly bad example. it changed the whole syntax of the thing
jonaswhas joined
jonasw
even *if* that was represented by a feature, you’d still most likely implement only one variant.
Ge0rG
Hm.
Ge0rG
Maybe I haven't thought through this.
tuxhas joined
Zash
It's less terrible once the protocol becomes more stable
jonasw
it helps with small things; if there had not been a syntax change but merely the addition of support for http headers, sure, that would work fine as a feature. however, the server would also need to detect that the client supports that. requires either caps, an additional roundtrip or a payload in the request.
Alexhas left
Zash
More options doesn't equal better
dwdhas joined
Ge0rG
jonasw: https://github.com/xsf/xeps/pull/599
dwdhas left
jonasw
I don’t consider the URI change editorial fWIW
jonasw
but that doesn’t matter for you
Ge0rG
I don't even like the URI change.
jonasw
(it *does* matter in the sense that this would otherwise have been the trigger for a discussion on whether purely editorial changes should delay deferral)
Ge0rG
I could be asking for a Last Call instead, but somehow nobody implemented PARS in the last year.
jonasw
I’m sorry
jonasw
(I actually am)
marmistrzhas left
Ge0rG
I am as well, because I considered this a very effective way to make Jabber user onboarding easier.
Ge0rG
Unfortunately, some other widely-used implementation's author objected on formal grounds.
jonasw
C?
Ge0rG
Oh, in unrelated news: it seems like yaxim has over 100k total downloads on Google Play. I'm impressed
jonasw
lz
jonasw
(that’s like gz, but different)
Ge0rG
So different I'm not getting it. Sorry.
Zash
zstd?
jonasw
Ge0rG, man lzop
Ge0rG
jonasw: so while I'm impressed, you are compressed?
jonasw
Ge0rG, oh dear. so, gz is a short form of a leety "congratz" from back in the olden days when that was cool. or people thought it was cool.
jonasw
does that help?
Yagizahas joined
Ge0rG
jonasw: ah, now I see the arc you are bending. Thanks.
jonasw
docker hub has the worst web UI ever.
jonasw
i have no idea why I need to "cancel" a build like three times before it takes effect. the first time the UI just won’t respond at all, the second it’ll change the button to "cancelling" but nothing further happens (after a reload it’s back to normal), the third one is finally effective
jonasw
not to mention the "X minutes ago" timestamps which only refresh on areload
jonasw
but which somehow suggest that the view was live
jonasw
</rant>
danielhas left
Zash
Pray to the Browser overlords for magic no-js fuzzy styling of <time> tags
jonasw
Kev, wouldn’t a nicer way to do that "MAM <before/>+<after/>" be a form field in the query?
andyhas joined
Dave Cridlandhas left
lovetox
it not only nicer, anything else would be in every way wrong
Zash
But paging is defined by RSM.
jonasw
Zash, that’s exactly why I’d prefer to have this in the form. alternatively, define the direction in that case via the form.
jonasw
and update RSM accordingly
jonasw
lovetox, regarding "start to sync again from that ID", that might be arbitrarily inefficient.
dwdhas joined
lovetox
we already concluded that mam is sometimes inefficient
jonasw
no need to make it worse :)
lovetox
RSM has nothing to do with what you want to do
jonasw
lovetox, huh;
lovetox
you want to query archive-id 😶 to archive-id = Y
jonasw
there’s an emoji in your message
lovetox
that should be defined in the query to MAM, like startime and endtime
andyhas left
jonasw
that sounds reasonable, but everyone is just talking about using <before/> and <after/> for that
lovetox
RSM is only for browsing the result
jubalhhas joined
lovetox
that makes no sense
Zash
FWIW, in Prosody, direction is set to backwards if <before/> is present
Zash
What happens after that depends on the lower storage layer
MattJ
Zash, is that even standard?
lovetox
<before/> gives you the last page of a result
lovetox
that is standard
Zash
MattJ: What, exactly, are you asking?
jubalhhas left
MattJ
Zash, afair in XEP-0313 results are always transmitted chronologically
jonaswvotes to close MattJs question as "Unclear what you’re asking"
jonasw
(scnr and just kidding)
Zash
MattJ: That's taken care of. This is different.
ralphmhas joined
Zash
So you should get a page where the last item preceeds the one identified by <before>
Zash
If you set <after> ... then either the results include that item or they don't
Marandavotes for "they don't"
Zash
There's no voting
Maranda
Aw
jonasw
Zash, tell that to council
intosi
Zash: FWIW, in M-Link direction is set to backwards if <before/> is present, as well.
intosi
And specifying after never includes that item in the result set, regardless of whether you used before or not.
Maranda
I think that's how most implementations would do anyways? Is there any "black sheep" not doing that 🤔?
danielhas joined
Dave Cridlandhas left
Maranda
(about <before /> going backward from x)
intosi
MattJ: the way I read RSM, that's how it should behave. before/ is quite explicit about directionality :)
dwdhas left
Zash
I'm not promising that all Prosodys storage backends deal with the value of <after> if <before> is also present
dwdhas joined
danielhas left
Kev
> jonasw
> Kev, wouldn’t a nicer way to do that "MAM <before/>+<after/>" be a form field in the query?
Why? RSM's already defined.
Zash
Does RSM define what happens if you include both?
intosi
Zash: it does not. But it similarly doesn't tell you you can't.
jonasw
Kev, I checked the other day and didn’t find a definition of what happens both <before/> and <after/> are given.
Kev
Zash: No, but if we're just careful in 313 that we explain it, we're golden.
Kev
I'm not suggesting that no text tweak to 313 is needed. Just that we already have the protocol and don't need to invent more.
Marandajust checked, he doesn't handle a case if both are present.
Maranda
🤔
jonasw
Kev, I’d argue anything which specifies RSM behaviour should not be in 313, but in the RSM XEP.
Kev
jonasw: I think that, in this case, I'd disagree.
Kev
But equally I wouldn't really mind it being in 59 either.
Zash
Default file based storage doesn't support both, so results would include the item in <after>.
Maranda
<before /><after>uuid</after> glitches a bit in my mind <before>uuid</before><after>uuid</after> sounds like in between
Maranda
And glitches too
dwdhas left
intosi
Maranda: your first example asks for the last items according to your requested page size, or some server default (might be inifity), but nothing that's uuid or older.
jubalhhas joined
intosi
Note that servers are very likely not to allow infinity-sized pages, as that's quite a burden on resources ;)
tuxhas left
danielhas joined
Ge0rG
Is the RSM discussion led in the context of "Dusty Drafts"? :D
Ge0rG
intosi: I had to learn the hard way, that even with a limited page size a DB might still lock up the whole server for multiple minutes merely to count the total number of results.
Zash
O(n) all the things
Ge0rG
Mar 06 14:28:30 mod_log_slow_events warn Slow event 'iq-set/self/urn:xmpp:mam:2:query' took 12.01s: ...
intosi
YEs. Counting items is a terrible idea.
Ge0rG
intosi: except it's required by RSM
intosi
Just as expensive as generating the entire set, usually.
intosi
Ge0rG: read closely.
danielhas left
Holger
> <jonasw> Kev, I'd argue anything which specifies RSM behaviour should not be in 313, but in the RSM XEP.
+1. I don't want an RSM implementation and a separate MAM-RSM variant.
intosi
Obtaining the item count is, but including the number of items in 313 is weasleworded.
intosi
Obtaining the item count with RSM techniques is
Ge0rG
intosi: hm. "The responding entity then returns the item count, which MAY be approximate rather than precise if determining the exact number of items would be resource-intensive"
Zash
count=rand()
Holger
Just always return 42.
intosi
No, return requested+1 if you know there is more.
intosi
;)
Zash
intosi: Isn't that implied by complete=false
intosi
No.
Ge0rG
In SQLite, adding a `LIMIT` clause will change the order, unless you have an explicit `ORDER BY` in which case it's still going through the whole list.
intosi
That indicates that between the items specified, you may not have returned all items you think there could be in the set.
intosi
Ge0rG: depends on which data set you order-by.
ralphmhas joined
intosi
Query optimisation is an art more than a science.
rionhas left
rionhas joined
Ge0rG
intosi: Unforuntately it is. Especially if you have abstracted away DB access through some generic library.
danielhas joined
intosi
Simple. Never do such a silly thing, unless you own the abstraction as well ;)
rionhas left
rionhas joined
Ge0rG
intosi: tell that Zash :P
intosi
Zash: what I said^
Alexhas joined
Zash
intosi: Tell Ge0rG that SQL things are terrible and why we can't have nice things
Ge0rG
intosi: and don't tell me not to use software where I don't control the whole stack, down to CPU µcode.
intosi
;)
Ge0rG
Because I'd rather spend my time on Easy XMPP
Ge0rG
I mean Jabber.
Maranda
well counting isn't an issue here (as I never operate on the database directly), yet since at the time reading RSM spec I thought a before+after combo wasn't a possibility I don't handle those cases.
Ge0rG
I mean Zimpies.
Maranda
Metronome will handle before but not after if both are present.
jonasw
Maranda, at least return an error when you can’t handle a case and know it :<
Zash
Ge0rG: How much do you care about the total anyways?
Maranda
jonasw, I'll add something to handle those now.
Ge0rG
Zash: I care about my server not lagging to death.
Ge0rG
Zash: no idea how much MAM-enabled clients rely on the `count` value
jonasw
Zash, just exploit 313 and return number-of-items+1
Holger
Maranda: Yes, I think it's quite obvious that the idea behind 0059 is to specify *either* <before/> *or* <after/>, and this is just not made explicit because the author didn't even consider the possibility to specify both.
Zash
If you disable archive pruning, it stops counting.
Holger
So I think we can't just cheat and allow both in 0313.
ChaosKid42has joined
Holger
(Though I clearly see the use-case of course.)
andyhas joined
jonasw
lovetox suggested to use form fields instead of <before/>+<after/>, which I find sane
Kev
Holger: I don't think it's cheating, and we clearly can, because we have :)
Holger
jonasw: Yes, me too.
Zash
You break a MUST in 59 if you include both and the range is larger than one page
Zash
> first item [...] MUST be the item that immediately follows [...] in the <after/>
Holger
Kev: Well yes we can do ugly things, and I agree we have.
intosi
Zash: well spotted.
jonasw
Zash, only if you iterate backwards, or?
Zash
> last item in the page [...] MUST be the item that immediately preceeds [...]
Ge0rG
Zash: we can override a MUST with follow-up spec
jonasw
excellent
Kev
But doing before/after in 313 is possible. It's just going to get ugly specifying the same things twice.
jonasw
Ge0rG, but then clients need an implementation of RSM and one of MAM-RSM
jonasw
"just"
Kev
jonasw: They do anyway, in practical terms.
Ge0rG
jonasw: hm.
jonasw
Kev, do they?
Holger
jonasw: And servers.
intosi
RSM is very protocol specific anyway.
Holger
Kev: Why?
Kev
Sorry, not clients, servers. Clients don't.
Holger
Huh.
jonasw
I have an interface in mind which is completely agnostic to protocol which uses RSM by passing a function around.
Zash
jonasw: next?
jonasw
kinda
jonasw
where RSM would just be a building block to obtain an asynchronous iterator
Zash
jonasw: If I were building something today, I'd make it more like a file handle
MattJ
Requiring server-side state?
jonasw
and I’d like to keep it that way.
jonasw
server side state sounds awful
intosi
It is.
MattJ
It would be, yes
jonasw
(encode the state in an opaque base64 thing!)
Zash
MattJ: I have had the thought not limit ranges, and stash the iterator along with the current id, so one can resume from there :)
Maranda
and intosi, tbh why not just doing <before>uuid-that-was-after-then</before>...?
intosi
Cursors are not something you'd want to keep around for every query sent to your xmpp server :)
Maranda
intosi, that's what glitches
Zash
LRU cache or whatever
Zash
On the assumption that the client will likely ask for the next page right after the current, it might be worth it
intosi
Maranda: I don't understand your question, my head's only partially working.
Maranda
mine as well tbh lol, but <before/><after>uuid</after> sounds exactly like <before>uuid</before> in my head.
intosi
nope
Zash
Wat
intosi
<before/> is very specific: it's before EOF, which is something that doesn't have an UUID.
intosi
You can't specify before last uuid you know, because it will never return the last uuid you know, which may not even be the last uuid in the dataset in the first place.
Maranda
Hm ok.
lovetox
you try bend rsm to do what a simple query filter does a lot better
lovetox
if i can query MAM with end and start archive ids, and my result only contains whats in between
lovetox
i can use RSM to page forward backwards wahtever
intosi
That's exactly what RSM does.
lovetox
no
intosi
Yes
andyhas left
jonasw
no :)
jonasw
well, kinda
lovetox
RSM pages inside a Result
jonasw
yeah
Zash
<{dataform}x><field name=sql><value>SELECT * FROM archive WHERE whatever<///>
lovetox
it does not filter a result
jonasw
Zash, good idea
intosi
Zash: expecting your protoxep before CoB :)
lovetox
the Result of the server is the book, and with RSM you switch to a page
lovetox
what you try to do is to rip site 1-3 out of the result with rsm
lovetox
and create a new book
Kev
No, it's really not.
intosi
RSM is specific for a protocol, and we're talking 313, which clearly defines the uses of RSM.
Zash
lovetox: Hmm, epub over xmpp!
Holger
The part lovetox explained is not specific.
j.rhas joined
Holger
It's exactly the generic part specified in 0059.
Holger
If it's all specific then ditch 0059.
Maranda
...
Maranda
well, until I understand clearly what to do with both and my brain doesn't kernel panic trying to I just think I'll throw an error.
Zash
Throw it all out, define the archive as a giant XML blob and do binary serialized xml delta transmission and reinvent wave?
intosi
We should've gone with IMAP from the start.
Holger
I really dislike how we keep bending/breaking our specs in other specs.
j.rhas joined
Zash
Holger: Myeah. Consistency is nice.
lovetox
RSM does a simple thing, and it does it nice
lovetox
if you want to have more elaborate querys for mam, just define fields for it
lovetox
like start-id, end-id
Kev
lovetox: For queries, yes.
Kev
But for getting pages from results, RSM is good at that.
Kev
It's just a shame that dealing with before/after isn't well specified.
lovetox
maybe i dont get it, i request a query from MAM with start-id, end-id
Zash
Is there anything preventing us from clarifying that?
lovetox
what exactly would i need before and after in the RSM page query afterwards?
Zash
Given multiple implementations doing something, sometimes, with it
intosi
Zash: clarifying sounds like a good idea.
andyhas joined
Holger
Kev: It's not well-specified because it goes against the 0059 model. You can't take your result book and page forward from page 15 *and* backward from page 30 at the same time.
Maranda
jonasw, *ducks* actually if before and after are currently present I *already* throw an error.
Holger
Kev: Right now you specify a page and a direction. With your change, before/after are no longer directions but boundaries.
Maranda
huhu
Maranda
jonasw, both of 'em that is.
Zash
Presence or lack of <before/> sets the direction atm
lovetox
exactly, and boundaries you specify in the MAM query, and not in the paging mechanism afterwards
j.rhas joined
Zash
So I think you can read it as <before>+<after> = backwards but stop at <after>
Holger
Kev: And you sound as if it was obvious that specifying both boundaries should set direction=before. This sounds is totally arbitrary to me.
Holger
Zash: Ugh.
Maranda
+1
Zash
Or does it explicitly say 'forward' if <after>?
intosi
Only before tells you anything about direction, IIRC.
Kev
We could ditch RSM from 313 completely and just go for something with the same semantics but different syntax, it just seems wrong to me.
lovetox
Oo
Zash
Oh please no
Zash
Isn't MAM done yet?
Maranda
Are we about to go back to archiving..? 😋😘 *troll intended*
ChaosKid42has left
ChaosKid42has joined
dwdhas joined
lovetox
https://www.youtube.com/watch?v=Ysf5o5xOGYE
waqashas joined
ChaosKid42has left
ChaosKid42has joined
Zashhas left
andyhas left
rtq3has left
rtq3has joined
suzyohas joined
Zashhas left
Marandahas joined
Zashhas left
Zashhas joined
andyhas joined
ChaosKid42has left
jubalhhas left
jubalhhas joined
jubalhhas left
suzyohas joined
ChaosKid42has joined
andyhas left
andyhas joined
Guushas left
vanitasvitaehas left
marmistrzhas left
Guushas left
intosihas left
intosihas joined
Guushas left
marmistrzhas left
Steve Killehas left
Steve Killehas left
ChaosKid42has left
waqashas left
waqashas joined
Steve Killehas joined
andyhas left
danielhas left
Fabianhas left
jubalhhas joined
Zashhas left
Seve/SouLhas joined
Guushas left
had-hochas joined
mimi89999has left
Zashhas left
Fabianhas joined
intosihas left
danielhas left
peterhas joined
intosihas joined
Tobiashas joined
Guushas left
ralphmhas left
rionhas left
lovetoxhas left
SamWhitedhas left
Marandahas left
andyhas joined
Marandahas left
intosihas left
jjrhhas left
andyhas left
danielhas left
Guushas left
Guushas left
nycohas left
jjrhhas left
Guushas left
Guushas left
Guushas left
Seve/SouLhas joined
jjrhhas left
Ge0rG
jonasw: thanks once again for your editorial work today