Dnia 2014-01-07, wto o godzinie 02:14 +0100, Sylvain "Gugli" Guglielmi
pisze:
> As I understand it, the 
> "object-sequence" don't need to be an "UNIQUE" field. Am I right on
> that ?

object-sequence is used mainly for sorting - to keep stanza ordering,
etc.
There is no enforcement on uniqueness, but in cases when you do care on
ordering, these should be unique.
In roster table you should be fine with just incrementing ver.
BTW, you could just write your UPDATE queries setting ver with next
sequence number for the table. It will save you incrementing in code and
keep it in line with how the original module does things.


> Well, I have broken that clean separation early on. For example I
> needed [...]

Sure. In case of code tied to concrete SQL it's understandable.
I was expressing my concern on changing the generic roster module which
may store data in many formats.

> Also, with many more requests, I fear the jabberd2 load will be more 
> important when I switch our prod to this plugin, and the load is
> already noticeable (15% daily peak of our server)...

My bet is that loading user data for packet delivery causes that.
There is an old item on Rob's TODO list, to have two load-user events -
one when user logs in, and other used for delivery, which loads only
necessary user data. But it is still TODO ;-)


> in my experience mallocs and frees can be long, so I try to minimize 
> these calls as a rule. I assumed the same goes for MySQL requests).

One of the reasons we have memory pools in jabberd2.


-- 
Tomasz Sterna                            :(){ :|:&};:
Instant Messaging Consultant    Open Source Developer 
http://abadcafe.pl/   http://www.xiaoka.com/portfolio



Reply via email to