[JDEV] Re: BIG Roster in Jabber
Raditha Dissanayake
jabber at raditha.com
Sat Sep 7 09:57:32 CDT 2002
Hi,
Man have i been away too long. I can help you out here i have worked on most
of these irregularities and fixed a few. I will try to mail some of my fixes
to bentoit so that everyone can get hold of this.
Murali P writes:
>
>
>
> Here goes my list of found irregularities.
>
> 1.) While replying to a jabber.iq:roster, if the jid is part of a group (passed
> to it by the client), the group name is sent back to it in the </grp> tag & not
> in the well known </group> tag.
>
> A small change by changing "grp" to "group" in xdbsql_roster_get fn in
> xdb_sql_roster.c
>
> 2.) If the client wants to add a buddy in a different group, it is taken care of
> by rostergroups table, but the client cannot add more than 1 entry (meaning one
> user can store only one jid corresponding to one group). This is because in
> xdbsql_roster_set, a call is made to roster_purge function.
>
> Instead can't we remove roster_purge call in xdbsql_roster_set fn. & change the
> "insert" command (in mysql) into "replace delayed" (in xdb_sql.xml)??
>
> 3.) If I were to add a buddy with the buddy not online, but offline, the request
> is saved in mysql with subscription=none. Now when the buddy logs in, the result
> of jabber:iq:roster should contain a </presence> tag with a type='subscribe'
> attribute' for the client to know its a subscription request, after the normal
> </iq> response , but it does not happen this way. As mod_roster_out_iq fn. in
> mod_roster.c sends out the additional </presence> tag only if subscription
> attribute is not null, this condition is not matched & the presence tag is not
> sent to the client.
>
> It goes into a major loop when you try to modify this. Am currently working on
> just this (looks like its working now for me, but some more testing to be done).
>
> 4.) Does not handle html tags in offline messages in load_query fn in
> xdb_sql_offline.c.
>
> A small change by adding the following: as xmlnode_get_name would not match
> "body" but needs to match "html".
>
> 249,257d248
> < else if (j_strcmp(xmlnode_get_name(x2),"html")==0)
> < {
> < if(!data_body || !*data_body)
> < {
> < b=xmlnode_get_tag(x2,"body");
> < data_body = xmlnode2str(b);
> < }
> < }
>
>
> Murali
>
>
>
> Placed At :
>
>
> "Glenn MacGregor" <gtm at almeric.com> on 09/06/2002 05:54:16 PM
>
> Please respond to jdev at jabber.org
>
> To: jdev at jabber.org
> cc: (bcc: Murali P/Satyam)
>
> Subject: Re: [JDEV] BIG Roster in Jabber
>
>
>
>
>
> ----- Original Message -----
> From: "Murali P" <Murali_P at sifycorp.com>
> To: <jdev at jabber.org>
> Sent: Friday, September 06, 2002 1:37 AM
> Subject: Re: [JDEV] BIG Roster in Jabber
>
>
>>
>>
>>
>> Hi All,
>> This being the order (900 items in roster), the way xdb_sql has been
>> written is totally screwed.
>>
>> It first does a select from the rosterusers table to fetch the list of
> jid's for
>> that username and then for each & every jid, it selects from rostergroups
> table
>> to get the group name.
>>
>> So for every client while logging in it does a jabber:iq:roster, there
> would be
>> a minimum of 901 questions on the db :) & subsequently, whenever this
> client who
>> has now logged in wants to add/modify an existing buddy , jabber
> internally
>> would do a jabber.Iq:roster & fetch his current roster list , only to go
> into an
>> eternal sleep mode :) (this is the case for just one user)
>
> I have made some fixes to xdb_sql for this problem. The first one is easily
> fixed by putting a join in that select statement so there is only one call
> to the db. I have not see the second problem, but if you elaborate a bit I
> can test it and post a fix.
>
>>
>> As regards the functionality of buddy add's in the offline mode, it is
> better
>> not to comment as it does not work at all in xdb_sql (or atleast in mysql
> as
>> db).
>>
>>
>> Regards
>> P.Murali
>>
>>
>>
>> Placed At :
>>
>>
>> Peter Saint-Andre <stpeter at jabber.org> on 09/06/2002 03:54:37 AM
>>
>> Please respond to jdev at jabber.org
>>
>> To: "Jdev (E-mail)" <jdev at jabber.org>
>> cc: (bcc: Murali P/Satyam)
>>
>> Subject: Re: [JDEV] BIG Roster in Jabber
>>
>>
>>
>>
>> I agree with temas -- large rosters cause a lot of packets to fly around
>> in the server, so it's better to write this as a component. My roster (900
>> items) probably hogs ridiculous amounts of memory. Maybe I need to be a
>> component. :)
>>
>> Anyone have a good roster-cleaner? Maybe I need to write one...
>>
>> Peter
>>
>> --
>> Peter Saint-Andre
>> Jabber Software Foundation
>> http://www.jabber.org/people/stpeter.html
>>
>> On Tue, 3 Sep 2002, Agustin Sanchez wrote:
>>
>> > Hi All:
>> >
>> > I'd like to know if it's possible to store a really big user roster in a
>> > jabber server (could be as much as 5000/6000 users). This is meant to
> have a
>> > large distribution list send information to users who subscribe a news
>> > service implemented on jabber. How about the MSN transport? Does this
>> > imposes any limitation on the number of users?
>> >
>> > Thanks in advance
>> >
>> > Agustin Sanchez
>> >
>> >
>>
>> _______________________________________________
>> jdev mailing list
>> jdev at jabber.org
>> http://mailman.jabber.org/listinfo/jdev
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> jdev mailing list
>> jdev at jabber.org
>> http://mailman.jabber.org/listinfo/jdev
>>
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
>
>
>
>
>
>
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
More information about the JDev
mailing list