<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
On 11/12/11 1:28 PM, Javier Gallart wrote:
<blockquote
cite="mid:CACviLGajjf+zZLiNbZNE3aOmgkEEYU=R8UpjVerr_+Ywfg20Gw@mail.gmail.com"
type="cite">Thanks Daniel
<div><br>
</div>
<div>yes, I thought about that too, I like redis a lot, and the
redis module addition to kamailio is excellent news. However in
this context it's not trivial to write a function that looks for
the best match in a redis tree structure as mt_match does...</div>
</blockquote>
ok, in the same idea of a remote caching system, we have memcache
connector module, but probably it is the same situation as with
redis.<br>
<br>
Back to initial topic, I am not a user of db_berkeley, but afaik,
the module loads the content in memory of kamailio, so if you use
mtree, then it is practically a duplicate of content. Besides, I
guess db_berkeley will have some internal structure overhead that
will use a bit more memory.<br>
<br>
What I can think of at this moment for a solution will be
adding/removing prefixes from mtree using mi/rpc command, so in case
of change of records, instead of loading the database table, the
updates can be done from command line or so.<br>
<br>
Another option might be using database directly. With mysql, a good
solution is to define database table in memory, then add/updates
records there as needed. From config file, use sqlops with
sql_query, matching using 'IN' operator, against matching number
exapnded with s.prefixes transformation:<br>
<br>
<a class="moz-txt-link-freetext" href="http://www.kamailio.org/wiki/cookbooks/3.2.x/transformations#sprefixes_len">http://www.kamailio.org/wiki/cookbooks/3.2.x/transformations#sprefixes_len</a><br>
<br>
Also, afaik, if you want postgres, it has some sort of index plugin
that can be used to match on longest prefix.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote
cite="mid:CACviLGajjf+zZLiNbZNE3aOmgkEEYU=R8UpjVerr_+Ywfg20Gw@mail.gmail.com"
type="cite">
<div><br>
</div>
<div>Regards</div>
<div><br>
</div>
<div>Javi<br>
<br>
<div class="gmail_quote">On Sat, Nov 12, 2011 at 9:28 AM,
Daniel-Constantin Mierla <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:miconda@gmail.com">miconda@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#FFFFFF" text="#000000"> Hello,<br>
<br>
just mentioning ndb_redis module (in 3.2) - you may want
to look at, it is key based access memory system.
Otherwise, I haven't used personally berkeley db to
comment on this particular subject.<br>
<br>
Cheers,<br>
Daniel
<div>
<div class="h5"><br>
<br>
<br>
<br>
On 11/11/11 7:50 PM, Javier Gallart wrote: </div>
</div>
<blockquote type="cite">
<div>
<div class="h5">Hi list
<div><br>
</div>
<div>we've been happily using the mtree module for
months now. Lately the size of the tree has grown
a lot. The mtree table needs to be fully
repopulated and reloaded several times a day, and
we are looking for a fastest mechanism (for
populating the table, I guess the reload time does
not depend much on the db backend...). Does anyone
tried with Berkeley DB? Is this combination
mtree-berkeley actually feasible...?</div>
<div><br>
</div>
<div>Thanks</div>
<div><br>
</div>
<div><br>
</div>
<div>Javi</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<font color="#888888"> <br>
<pre cols="72">--
Daniel-Constantin Mierla -- <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
Kamailio Advanced Training, Dec 5-8, Berlin: <a moz-do-not-send="true" href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a>
<a moz-do-not-send="true" href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a> -- <a moz-do-not-send="true" href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a></pre>
</font></div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Kamailio Advanced Training, Dec 5-8, Berlin: <a class="moz-txt-link-freetext" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
</body>
</html>