[OpenSIPS-Users] store data locally
Ben Newlin
Ben.Newlin at genesys.com
Wed Sep 23 14:08:50 EST 2020
We use db_text and I agree with Ovidiu. We use it mostly for built-in datastores on our instances. So we build the DB and then bake it onto our AMIs before launch. The data is never modified during runtime, so we don’t need full SQL functionality. Using db_text removes dependencies on sqlite in both the build and runtime environments. We use Ansible/Jinja2 to template the db_text databases from text files. It’s very straightforward.
So if you need SQL features then sqlite is great, but db_text is a very fast, easy way to get a DB running with no overhead.
Ben Newlin
From: Users <users-bounces at lists.opensips.org>
Date: Wednesday, September 23, 2020 at 9:50 AM
To: OpenSIPS users mailling list <users at lists.opensips.org>
Subject: Re: [OpenSIPS-Users] store data locally
Hello Liviu,
SQLite is the way to go if you want something standard.
But having the ability to just use a text editor to add/remove/modify
records in db_text is golden for me.
I used db_text a lot on embedded platforms.
I would vote against obsolete-ing db_text.
For me, it's easier to use db_text instead of sqlite. For others, it
might be the other way around.
Regards,
Ovidiu Sas
On Wed, Sep 23, 2020 at 1:55 AM Liviu Chircu <liviu at opensips.org> wrote:
>
> On 22.09.2020 18:42, Ovidiu Sas wrote:
> > 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].
>
> Hi, Ovidiu!
>
> May I segue into discussing some questions that have been puzzling me
> for a while now?
>
> "In 2020, why should developers choose DB TEXT over DB SQLITE?
> Shouldn't DB TEXT be obsoleted?"
>
> As far as history goes, it seems DB TEXT was created by Daniel in 2003.
> Which, in my opinion, even for that time, it seems like a "reinvent the
> wheel" kind of effort, since SQLite had already been GA'ed for almost 3
> years [1].
>
> In order to come up with an answer, we can break down my original questions:
>
> * DB TEXT and SQLite both aim to be lightweight, serverless, file-based
> SQL databases with RAM caching. True or false?
> * does DB TEXT have any features that SQLite doesn't?
> * does DB TEXT support a richer SQL syntax than SQLite?
> * does DB TEXT have less bugs than SQLite?
> * does DB TEXT handle in-memory caching better than SQLite?
> * does DB TEXT handle disk files better than SQLite?
>
> Thank you in advance for the discussion!
>
> Best regards,
>
> [1]: https://sqlite.org/changes.html
>
> --
> Liviu Chircu
> www.twitter.com/liviuchircu<http://www.twitter.com/liviuchircu> | www.opensips-solutions.com<http://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/20200923/3d07ac48/attachment.html>
More information about the Users
mailing list