diff options
author | Pablo Polvorin <pablo.polvorin@process-one.net> | 2009-08-06 15:45:13 +0000 |
---|---|---|
committer | Pablo Polvorin <pablo.polvorin@process-one.net> | 2009-08-06 15:45:13 +0000 |
commit | 53626d16e31e72b8dab96711de07a730586b040b (patch) | |
tree | 7bdfcf719dc124f4ab3952c522172d189ffed88d /src/jlib.hrl | |
parent | * src/odbc/ejabberd_odbc_sup.erl: make requests return a timeout if (diff) |
Support for roster versioning (EJAB-964)
Introduces two options for mod_roster and mod_roster_odbc:
- {versioning, true | false} Enable or disable roster versioning on ejabberd.
- {store_current_id, true | false} If true, the current roster version is stored on DB (internal or odbc). Otherwise it is calculated on the fly each time.
Performance:
Setting store_current_id to true should help in reducing the load for both ejabberd and the DB.
Details:
If store_current_id is false, the roster version is a hash of the entire roster. If store_current_id is true, the roster version is a hash, but of the current time
(this has to do with transactional semantics; we need to perform both the roster update and the version update on the same transaction, but we don't
have the entire roster when we are changing a single item on DB. Loading it there requires significant changes to be introduced, so I opted for this simpler approach).
In either case, there is no difference for the clients, the roster version ID is opaque.
IMPORTANT:
mod_shared_roster is not compatible with the option 'store_current_id'. Shared roster and roster versioning can be both enabled, but store_current_id MUST be set to false.
SVN Revision: 2428
Diffstat (limited to '')
-rw-r--r-- | src/jlib.hrl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/jlib.hrl b/src/jlib.hrl index 8051fc0a9..3ed25d3ca 100644 --- a/src/jlib.hrl +++ b/src/jlib.hrl @@ -27,6 +27,7 @@ -define(NS_REGISTER, "jabber:iq:register"). -define(NS_SEARCH, "jabber:iq:search"). -define(NS_ROSTER, "jabber:iq:roster"). +-define(NS_ROSTER_VER, "urn:xmpp:features:rosterver"). -define(NS_PRIVACY, "jabber:iq:privacy"). -define(NS_PRIVATE, "jabber:iq:private"). -define(NS_VERSION, "jabber:iq:version"). |