"quiet mode" / server-side stanza pausing

I have an application I'm working on using XMPP and ejabberd. I want to implement a "quiet mode" that does not send stanzas to clients when they are in a certain mode. This mode can be triggered in any way (it doesn't matter to me): a specific presence being sent, an adhoc command, etc.

Basically, I have very strict bandwidth requirements that I'm need to stay under. When the clients enter into the most sensitive portion (where bandwidth becomes limited), I'd like to cease all stanzas, but also not disconnect the client. When the bandwidth-sensitive portion completes, the client ideally should be able to toggle its state back to normal, and begin to receive all stanzas again, as if nothing occurred. For this application, I don't need to maintain a queue of "missed messages" or anything like that.

Is there a way to achieve something like this in a straightforward fashion? I'm comfortable enough with erlang to write a module if necessary, but I'd love some pointers.

Thanks.

XMPP describes "privacy

XMPP describes "privacy lists", and ejabberd implements that. A client can tell ejabberd to activate a privacy list with this rule: "deny all incoming traffic from any JID". Later the client can deactivate that list. The filtering is done by the server, the client only needs to tell the server what privacy list to activate, and what rules are in that list.

Some desktop XMPP clients provide privacy list editors, try Psi, Gajim, Tkabber... so you get an idea of how it works, and what exact rule you want. Use their XML Raw Window to see what XMPP stanzas they send to the server to setup the lists and rules.

badlop, Thanks! That

badlop,

Thanks! That suggestion put me on exactly the path I needed.

I didn't realize the extent that advanced privacy lists could be taken -- similar to firewall rules, very explicit, and as fine-graned as required to make "quiet mode" happen.

... now I just need another good excuse to take a step into writing modules. ;-) Thanks, again.

Syndicate content