<div dir="ltr">Hi Julien,<div><br></div><div>It's a good point and I agree it could be a concern in some cases.</div><div><br></div><div>I'm not sure, however, the DMQ module itself is the place to do it. DMQ is purely a transport mechanism and has no knowledge or context of what's being relayed. This limits its scope to the ordering of messages only, rather than the replicated data.</div><div><br></div><div>Limiting DMQ to a single process could have performance implications, and at the same time does nothing to affect the ordering of messages sent to or received from multiple nodes (in a cluster of more than two) with varying distance/latency between them.</div><div><br></div><div>The sensible thing to do, in my opinion, is to implement ordering/version checking within each of the modules that need it. Most of them do anyway, in some way or another, for messages received locally. It would not be a big job to extend that to replicated messages and provide some kind of feedback/reverse-sync to the sending node if the local version is higher or the timestamp is later.</div><div><br></div><div>What do you/others think?</div><div><br></div><div>Cheers,</div><div><br></div><div>Charles</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 9 May 2019 at 11:57, Julien Chavanton <<a href="mailto:jchavanton@gmail.com">jchavanton@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="auto">I guess, we could simply use tcp with t_relay using only one process in the module. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 9, 2019, 04:52 Julien Chavanton <<a href="mailto:jchavanton@gmail.com" target="_blank">jchavanton@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br>Yesterday at Kamailio World there was an interesting question, raising a concern about replication of user location and DMQ in general, we should track it in the mailing list and use it as a feature request and I can share my initial thoughts on the topic.</div><div dir="ltr"><br>The concern was about DMQ reordering transactions.<br></div><br><div dir="ltr">With SIP registration this seems like a minor concern, high responsiveness at the cost of potential small inconsistency seems like a good option.<br>Considering that, the state will automatically correct itself and that this can be controlled using the expiration timer.  This will become even more insignificant when the replicas can only be used as primary server failover. (it becomes a very small concern only when the primary server fails)<br><br>With other type of data re-ordering may result in more problematic use cases.<br>My impression is that DMQ should try to be good only with 
volatile data, data that will expire anyway, like caching with 
expiration, registration, Dialogs, etc. </div><div dir="ltr"><br></div><div dir="ltr">I think it may be worth looking at adding support for ordering/queuing in DMQ.<br></div><div dir="ltr"><br>Performance and simplicity could be maintained by doing mainly transactions in parallel with a configurable re-ordering best effort to minimize the impact of the problem.<br><br>For example :<br>1- trying to re-order for a configurable amount of time. (32 seconds to match the RFC for SIP re-transmissions)<br>2- adding tractability for failed transactions.<br>3- the possibility to trigger a re-sync. <br><br>Another option is to look at preserving strict ordering but I can imagine this could add more problems in some cases ...<br></div><div><br></div><div><br></div></div>
</blockquote></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font face="arial, helvetica, sans-serif"><b><font size="2">Charles Chance</font></b><br><font size="2">Managing Director</font></font><br><div><font face="arial, helvetica, sans-serif"><font size="2"><br></font></font></div><div><font face="arial, helvetica, sans-serif"><font size="2">t. 0330 120 1200    m. 07932 063 891</font></font></div></div></div></div></div>

<br>
<div><font color="gray" style="font-size:10pt;font-family:Helvetica,Arial,sans-serif">Sipcentric Ltd.
                Company registered in England & Wales no. 7365592.</font><span style="font-size:10pt;font-family:Helvetica,Arial,sans-serif"> </span><font color="gray" style="font-size:10pt;font-family:Helvetica,Arial,sans-serif">Registered
                office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.</font></div>