[OpenSIPS-Users] store data locally

Brett Nemeroff brett at nemeroff.com
Tue Sep 22 18:28:02 EST 2020


I personally like memcached because of it's speed and the availability of
SDKs to work with it in so many languages. These are all good choices tho!
I think the quantity and how frequently your data changes is a big factor.
If you have a lot of data that tends to change, I'd use memcache. If it's a
little data and not likely to change, I'd probably do db_text. The other
thing to consider is that multiple opensips boxes can all talk to the same
memcache versus db_text is per instance.

Let us know which way you go and if you have any questions!
-Brett


On Tue, Sep 22, 2020 at 10:42 AM Ovidiu Sas <osas at voipembedded.com> wrote:

> Hello Alain,
>
> If you don't want to run a full blown db, then you can use db_text
> without cacheDB.
> The data is cached into memory at startup. If you update the text
> file, you can re-cache the data [1].
> You can also manipulate the data using the avpops module [2].
> Or, you can use cacheDB on top of the text db :)
>
> [1]: https://opensips.org/docs/modules/3.1.x/db_text.html#mi_dbt_reload
> [2]: https://opensips.org/docs/modules/3.1.x/avpops.html
>
> Regards,
> Ovidiu Sas
>
> On Tue, Sep 22, 2020 at 9:36 AM Liviu Chircu <liviu at opensips.org> wrote:
> >
> > On 22.09.2020 16:09, Alain Bieuzent wrote:
> >
> > I need to store some data locally but accessible by opensips.
> >
> > the data is almost 20 records made up of a couple IP: name
> >
> > From opensips script I want to retrieve the name associated with the IP
> (to put in place profiling).
> >
> > how do you set up this kind of solution without accessing each call to
> an external database?
> >
> > Hi, Alain!
> >
> > One way would be to use the local cacheDB [1] module through the generic
> cacheDB scripting functions [2].
> >
> > Alternatively, if you specifically need to load this data from an SQL
> DB, for example, the sql_cacher [3] module would be a perfect fit.
> >
> > Fun Fact:  if you decide to use any of these two modules, you will have
> to buy a guy named Vlad a beer, and they are not the same Vlad.
> >
> > Best regards,
> >
> > [1]: https://opensips.org/docs/modules/3.2.x/cachedb_local.html
> > [2]:
> https://www.opensips.org/Documentation/Script-CoreFunctions-3-2#toc4
> > [3]: https://opensips.org/docs/modules/3.2.x/sql_cacher.html
> >
> > --
> > Liviu Chircu
> > www.twitter.com/liviuchircu | www.opensips-solutions.com
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> --
> VoIP Embedded, Inc.
> http://www.voipembedded.com
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200922/6e38ce9b/attachment.html>


More information about the Users mailing list