[SR-Users] CockroachDB and Kamailio
Noah Mehl
noahmehl at gmail.com
Thu Aug 20 22:42:51 CEST 2020
Henning,
So, for the default config, it only has the option for: WITH_MYSQL. I was wondering if a WITH_PGSQL would be accepted.
As for the kamdbctl scripts, there are a few things I’ve noticed:
I would prefer UUID vs SERIAL. This actually is a little more annoying when dealing with the SEQUENCE entity in Postgres. The only change required, is to load the pgcrypto extension and switch to uuid instead of SERIAL. I have a tracking branch here:
https://github.com/reperio/kamailio/tree/postgres_uuid <https://github.com/reperio/kamailio/tree/postgres_uuid>
The other reason is that for cockroachdb, using gen_random_uuid() is documented to be more efficient <https://www.cockroachlabs.com/docs/stable/create-sequence.html> (in addition to being a preference).
As for cockroachdb, I have a tracking branch (based on the uuid branch) that seems to be working well:
https://github.com/reperio/kamailio/tree/cockroach <https://github.com/reperio/kamailio/tree/cockroach>
So far, the only issue in the creation/managment of the schema is: CREATE FUNCTION. But it looks like maybe concat() and random() are already supported by cockroackdb: https://www.cockroachlabs.com/docs/stable/functions-and-operators.html <https://www.cockroachlabs.com/docs/stable/functions-and-operators.html>. I will have to dig deeper into the lcr module to see where/if this is an issue.
Thanks!
~Noah
> On Aug 20, 2020, at 2:23 PM, Henning Westerholt <hw at skalatan.de> wrote:
>
> Hi Noah,
>
> if you find something that does not work with the default PostgreSQL schema from kamdbctl, create an issue. It some cases it is just a matter of formatting and it can work for PostgreSQL and CockroachDB. This is probably the easier path, from an maintenance point of view.
>
> What do you mean by default configuration?
>
> Cheers,
>
> Henning
>
> --
> Henning Westerholt - https://skalatan.de/blog/
> Kamailio services - https://gilawa.com
>
> -----Original Message-----
> From: Noah Mehl <noahmehl at gmail.com>
> Sent: Thursday, August 20, 2020 6:35 PM
> To: Henning Westerholt <hw at skalatan.de>
> Cc: Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
> Subject: Re: [SR-Users] CockroachDB and Kamailio
>
> Henning,
>
> Thanks for the reply! I am testing away. I will update with my findings.
>
> That being said, some things might be slightly different. Should I add a cockroachdb option to the kamdbctl and default configs as a PR?
>
> ~Noah
>
>> On Aug 20, 2020, at 2:35 AM, Henning Westerholt <hw at skalatan.de> wrote:
>>
>> Dear Noah,
>>
>> it was probably not discussed on the public list, at least I don't remember it. Cockroachdb claims to be compatible with PostgreSQL, so it should work with this DB Kamailio module.
>>
>> If you encounter issues, report on this list, or open a bug report if its something related to problems in the Kamailio db_postgres module.
>>
>> Cheers,
>>
>> Henning
>>
>> --
>> Henning Westerholt - https://skalatan.de/blog/ Kamailio services -
>> https://gilawa.com
>>
>> -----Original Message-----
>> From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Noah
>> Mehl
>> Sent: Wednesday, August 19, 2020 10:13 PM
>> To: sr-users at lists.kamailio.org
>> Subject: [SR-Users] CockroachDB and Kamailio
>>
>> Has anyone been down this path before? We are trying to test this out and the results are pretty promising so far.
>>
>> I realize the lack of Stored Procedures and Triggers make this untenable for many Postgres based implementations.
>>
>> Thanks!
>>
>> ~Noah
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users at lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200820/a6957c75/attachment.htm>
More information about the sr-users
mailing list