[ejabberd] somes Few Questions about the Sql Way to do it :)

Pedro Melo melo at simplicidade.org
Fri Apr 25 13:19:55 MSD 2008


Hi,

On Apr 24, 2008, at 7:58 PM, Badlop wrote:
> 2008/4/24, Sig <ejabberd at sighq.net>:
>>  - i see there is two tables : rostersusers and rostergroups ,  
>> strangely the rostersgroups only have one field more
>>  (grp) than rosterusers and a common keyfield,  isn't it possible  
>> to join the two tables in one ?
>
> It seems that was the data structure of jabberd14 database. When
> Alexey implemented SQL support in ejabberd, he wanted to make the
> migration from jabberd14 to ejabberd easy.
>
> Maybe the schema could be improved. That would be a good time to
> abstract the database code into specific library-modules to avoid
> having several ejabberd modules with similar code. For example, I
> calculated that mod_roster.erl and mod_roster_odbc.erl share aprox 75%
> lines of code [1].

Well, if you are thinking on database abstraction, I would suggest a  
mod_roster_http:

  * specify a REST interface for roster operations;
  * implement said REST interface in mod_roster_odbc;
  * users that already have a big "social" site can map that REST  
interface to their database schema.

Instant XMPP gateway...
-- 
Pedro Melo
Blog: http://www.simplicidade.org/notes/
XMPP ID: melo at simplicidade.org
Use XMPP!




More information about the ejabberd mailing list