-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
64 lines (48 loc) · 2.65 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
TODO for 2.0
------------
Roster templates may not be working properly (esp. with multiple items).
Check and fix if necessary.
Make sure that available presence in response to a s10n accept arrives
after the type='subscribed' (see chat with Nathan Walp)
c2s may not be properly detecting client connections dropping. I feel
like I've checked this numerous times, so check once more, once and for
all.
Modify user-load chain calls to indicate if the user is being loaded for
a session, or just for delivery. Don't load rosters (and other large
things) in that case.
==========
The requirement for this is that large presence broadcasts (for the
same host) result in many users being loaded for delivery, only to
find out that they have no sessions online, and then being unloaded
again. If we could stop some parts of the user data being loaded when
the user is loaded only for packet delivery, then the overhead could
be kept to a minimum.
Privacy lists make this hard, if not impossible. Privacy lists must be
loaded at packet delivery time, because the user may have a default
list. That default list may have rules based on roster group, so the
roster must be loaded.
A partial solution might be to have a module that runs in in-router
before mod_privacy, that watches for presence packets and drops them
if the user is not online. This should work, because even if the
presence packet was allowed by the default privacy list, it'll get
dropped anyway because mod_deliver would find later that there are no
sessions online.
This doesn't fix the problem completely though because mod_privacy
needs the user's roster loaded in order to process a default list with
rules based on roster group. There's no way for mod_privacy to call
into mod_roster to get it to load the roster on demand.
Long term, there's a couple of possibilities. In general, I believe
its reasonable to either have all user data loaded, or none of it -
anything in between requires a measure of the "importance" of certain
data (which doesn't scale and is highly subjective) or a on-demand
system of loading data, which requires dependency graphs and
inter-module communication. This stuff isn't impossible, but I don't
want to go there if I can help it.
It might be better to simply implement a (configurable) delay before
unused user data is unloaded. This will still mean that the first
presence broadcast can get sluggish, but after this things should chug
along nicely.
A patch for the partial soltuion mentioned above has been implemented,
as _presence_in_router(). This is not a complete fix, but does
workaround the most common case.
==========