mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
53626d16e3
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
34 lines
1.1 KiB
Erlang
34 lines
1.1 KiB
Erlang
%%%----------------------------------------------------------------------
|
|
%%%
|
|
%%% ejabberd, Copyright (C) 2002-2009 ProcessOne
|
|
%%%
|
|
%%% This program is free software; you can redistribute it and/or
|
|
%%% modify it under the terms of the GNU General Public License as
|
|
%%% published by the Free Software Foundation; either version 2 of the
|
|
%%% License, or (at your option) any later version.
|
|
%%%
|
|
%%% This program is distributed in the hope that it will be useful,
|
|
%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
%%% General Public License for more details.
|
|
%%%
|
|
%%% You should have received a copy of the GNU General Public License
|
|
%%% along with this program; if not, write to the Free Software
|
|
%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
%%% 02111-1307 USA
|
|
%%%
|
|
%%%----------------------------------------------------------------------
|
|
|
|
-record(roster, {usj,
|
|
us,
|
|
jid,
|
|
name = "",
|
|
subscription = none,
|
|
ask = none,
|
|
groups = [],
|
|
askmessage = [],
|
|
xs = []}).
|
|
|
|
-record(roster_version, {us,
|
|
version}).
|