<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>The lookup function could be extended to determine which node is responsible for a given SIP URI based on a one-way hashing function. Chord is an example of algorithm that can be used to map the hashes to the nodes (practically is a integer comparison where all SIP URIs are attracted by the next integer that corresponds to the IP of the server). Same lookup function can then be used to route traffic for a give user to the right node. If this is baked in, you need only to create some module that maintains a list of all active nodes. When one node joins, this is made known to the location table module so its lookup can take it into consideration. When one node leaves same process occurs, the node is removed from the table and lookup will find another node.</div><div><br></div><div>Adrian</div><div>&nbsp;</div><div><br></div><div><div><div>On Apr 5, 2013, at 2:34 PM, Bogdan-Andrei Iancu wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">

  
    <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
  
  <div bgcolor="#ffffff" text="#000000">
    <tt>Hello Adrian,<br>
      <br>
      The actual question is IF there is SOMETHING that can be done
      directly in the usrloc module to help with distributed scenario
      (to have some built-in functionality to have an auto-of-the-box
      solution). I'm fully aware you can combine the existing module
      with other kind of backends and do the work.<br>
      <br>
      Of course we can leave the usrloc module as it is and expect
      people to have their own fight to distributed it (as you did, as
      we did and many other did) - the idea is to have a ready to use
      approach here (if something like this exists) to address the most
      common and used cases.<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com/">http://www.opensips-solutions.com</a></pre>
    <br>
    On 04/05/2013 08:51 AM, Adrian Georgescu wrote:
    <blockquote cite="mid:B3F05B8E-A5E0-48C6-A57E-DBF47C95DBE4@ag-projects.com" type="cite">Hello Vlad,
      <div><br>
      </div>
      <div>We developed such a solution and is operational since 2005
        but not in the open source domain. The start point was P2P
        protocols used for file sharing. Is less of a SIP server issue
        (we used stock OpenSER and stock OpenSIPS for years) but rather
        a generic self-organizing network design where SIP accounts map
        to certain nodes using Chord style hashing function. The problem
        you need to solve is not necessarily SIP related (as it turns
        out that it works with any sip servers of client out there) but
        simply making a join/leave protocol that allows for horizontal
        scalability and adding this adapter to OpenSIPS. This layer if
        is abstract enough you can use it for any other thing not just
        OpenSIPS. We use it to horizontally scale Asterisk servers,
        OpenXCAP servers, MSRP Relay servers, Media Proxy servers for
        example. Here is the design document:
        <div><br>
        </div>
        <div><a moz-do-not-send="true" href="https://docs.sipthor.net/projects/documentation/wiki/SipThorDescription">https://docs.sipthor.net/projects/documentation/wiki/SipThorDescription</a></div>
        <div><br>
        </div>
        <div>And here is some papers we wrote back in 2005/2006 about
          this concept which can provide some clues for whomever wants
          to build this in OpenSIPS.</div>
        <div><br>
        </div>
        <div><a moz-do-not-send="true" href="http://www.ag-projects.com/presentations-corporate-285/41-sip2007">http://www.ag-projects.com/presentations-corporate-285/41-sip2007</a></div>
        <div><br>
        </div>
        <div>Adrian</div>
        <div><br>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>
            <div>
              <div>
                <div>
                  <div>On Apr 4, 2013, at 3:05 PM, Vlad Paiu wrote:</div>
                  <br class="Apple-interchange-newline">
                  <blockquote type="cite">
                    <div>Hello all,<br>
                      <br>
                      We would like to get suggestions and help on the
                      matter of distributing the user location
                      information.<br>
                      Extending the User Location with a built-in
                      distributed support is not straight forward - it
                      is not about simply sharing data - as it is really
                      SIP dependent and network limited<br>
                      <br>
                      While now, by using the OpenSIPS trunk, it is
                      possible to just share the actual usrloc info ( by
                      using the db_cachedb module and storing the
                      information in a MongoDB cluster ), you can
                      encounter real-life scenarios where just sharing
                      the info is not enough, like :<br>
                      &nbsp;&nbsp;&nbsp;- NAT-ed clients, where only the initial server
                      that received the Register has the pin-hole open,
                      and thus is the only server that can relay traffic
                      back to the respective client<br>
                      &nbsp;&nbsp;&nbsp;- the user has a SIP client that only accepts
                      traffic from the server IP that it's currently
                      registered against, and thus would reject direct
                      traffic from other IPs ( due to security reasons )<br>
                      <br>
                      We would like to implement a true general solution
                      for this issue, and would appreciate your feedback
                      on this. Also we'd appreciate if you could share
                      the needs that you would have from such a
                      distributed user location feature, and the
                      scenarios that you would use such a feature in
                      real-life setups.<br>
                      <br>
                      <br>
                      Best Regards,<br>
                      <br>
                      -- <br>
                      Vlad Paiu<br>
                      OpenSIPS Developer<br>
                      <a moz-do-not-send="true" href="http://www.opensips-solutions.com/">http://www.opensips-solutions.com</a><br>
                      <br>
                      <br>
                      _______________________________________________<br>
                      Users mailing list<br>
                      <a moz-do-not-send="true" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                      <br>
                    </div>
                  </blockquote>
                </div>
                <br>
              </div>
            </div>
          </div>
        </div>
      </div>
      <pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </div>

_______________________________________________<br>Devel mailing list<br><a href="mailto:Devel@lists.opensips.org">Devel@lists.opensips.org</a><br>http://lists.opensips.org/cgi-bin/mailman/listinfo/devel<br></blockquote></div><br></div></body></html>