Hello,
I just need to know if kamailio can communicate with Voltdb for sqlops operations for example.
Regards, Ali Taher
Is VoltDB’s wire protocol binary-compatible with Postgres, MySQL, Oracle, or anything reachable via UnixODBC?
From what I understand, no. So, you can’t use SQL-native modules to talk to it.
You can, of course, get Kamailio to talk to it “manually” for select purposes.
— Sent from mobile, with due apologies for brevity and errors.
On Dec 14, 2020, at 11:28 AM, Ali Taher ataher@vanrise.com wrote:
Hello,
I just need to know if kamailio can communicate with Voltdb for sqlops operations for example.
Regards, Ali Taher _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hi Alex,
Thanks for your answer. How to proceed to let Kamailio talk manually to VoltDB ?
Regards, Ali Taher
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alex Balashov Sent: Monday, December 14, 2020 6:38 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: Re: [SR-Users] voltdb support
Is VoltDB’s wire protocol binary-compatible with Postgres, MySQL, Oracle, or anything reachable via UnixODBC?
From what I understand, no. So, you can’t use SQL-native modules to talk to it.
You can, of course, get Kamailio to talk to it “manually” for select purposes. — Sent from mobile, with due apologies for brevity and errors.
On Dec 14, 2020, at 11:28 AM, Ali Taher <ataher@vanrise.commailto:ataher@vanrise.com> wrote: Hello,
I just need to know if kamailio can communicate with Voltdb for sqlops operations for example.
Regards, Ali Taher _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
You'd have to devise some sort of API or use something that Kamailio can talk to, unless you're inclined to write a custom module that uses a library[1].
Otherwise, the usual integration paths are available, e.g.
1) You could put a REST API server in front of VoltDB and use:
https://kamailio.org/docs/modules/5.4.x/modules/http_async_client.html
https://kamailio.org/docs/modules/5.4.x/modules/http_client.html
2) Or, you could write a server of some kind which mediates these requests using EVAPI:
https://kamailio.org/docs/modules/5.4.x/modules/evapi.html
3) Or, you could write a minimal SIP redirect service using a library such as PJSUA/PJSIP, or JAIN,
https://www.oracle.com/technical-resources/articles/enterprise-architecture/...
which would allow Kamailio to consume 3xx redirects as a transport for information queries. That is a common pattern for external routing services, for example.
It's also worth keeping in mind that even if you invent such a shim, you're not going to be able to use VoltDB to provide database backing for Kamailio's database-backed modules (e.g. htable, usrloc, dispatcher, carrierroute, etc). If your aim is to make VoltDB work transparently with those modules, then this isn't a viable project.
What you can do is query an API for some limited purposes. For example, you could get authentication credentials from VoltDB and store them in pseudovariables so as to feed them into functions which can use them, such as:
https://kamailio.org/docs/modules/5.4.x/modules/auth.html#auth.f.pv_auth_che...
But most Kamailio modules which extensively utilise a relational database don't expose capabilities like that. That would, after all, contradict the basic purpose for which a lot of them exist, which is to transparently manage database interactions for you while providing terse and easy-to-use syntactical sugar.
So, it depends on what exactly you want to do. If it's something very specific, like getting routes or authentication credentials, you could potentially use an unsupported database if you devise a means of communicating with it indirectly, using a generic channel that Kamailio does support.
But if you're asking if Kamailio supports VoltDB in a rather general sense, the answer is no.
-- Alex
[1] https://docs.voltdb.com/UsingVoltDB/ChapAppDesign.php
On 12/14/20 2:57 PM, Ali Taher wrote:
Hi Alex,
Thanks for your answer. How to proceed to let Kamailio talk manually to VoltDB ?
Regards,
Ali Taher
A colleague clued me into the fact that VoltDB has a native HTTP / JSON interface, so you might not need any middleware to talk to it using the Kamailio HTTP modules:
https://docs.voltdb.com/UsingVoltDB/ProgLangJson.php
But again, it depends on what exactly you're trying to do. It won't work for built-in database backing for the various popular modules.
-- Alex
What I need is to fetch routing from VoltDB and send it back to switch using 3xx response. So I think the API solution is the best approach here. Thanks for all this useful info.
-----Original Message----- From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alex Balashov Sent: Monday, December 14, 2020 10:16 PM To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] voltdb support
You'd have to devise some sort of API or use something that Kamailio can talk to, unless you're inclined to write a custom module that uses a library[1].
Otherwise, the usual integration paths are available, e.g.
1) You could put a REST API server in front of VoltDB and use:
https://kamailio.org/docs/modules/5.4.x/modules/http_async_client.html
https://kamailio.org/docs/modules/5.4.x/modules/http_client.html
2) Or, you could write a server of some kind which mediates these requests using EVAPI:
https://kamailio.org/docs/modules/5.4.x/modules/evapi.html
3) Or, you could write a minimal SIP redirect service using a library such as PJSUA/PJSIP, or JAIN,
https://www.oracle.com/technical-resources/articles/enterprise-architecture/...
which would allow Kamailio to consume 3xx redirects as a transport for information queries. That is a common pattern for external routing services, for example.
It's also worth keeping in mind that even if you invent such a shim, you're not going to be able to use VoltDB to provide database backing for Kamailio's database-backed modules (e.g. htable, usrloc, dispatcher, carrierroute, etc). If your aim is to make VoltDB work transparently with those modules, then this isn't a viable project.
What you can do is query an API for some limited purposes. For example, you could get authentication credentials from VoltDB and store them in pseudovariables so as to feed them into functions which can use them, such as:
https://kamailio.org/docs/modules/5.4.x/modules/auth.html#auth.f.pv_auth_che...
But most Kamailio modules which extensively utilise a relational database don't expose capabilities like that. That would, after all, contradict the basic purpose for which a lot of them exist, which is to transparently manage database interactions for you while providing terse and easy-to-use syntactical sugar.
So, it depends on what exactly you want to do. If it's something very specific, like getting routes or authentication credentials, you could potentially use an unsupported database if you devise a means of communicating with it indirectly, using a generic channel that Kamailio does support.
But if you're asking if Kamailio supports VoltDB in a rather general sense, the answer is no.
-- Alex
[1] https://docs.voltdb.com/UsingVoltDB/ChapAppDesign.php
On 12/14/20 2:57 PM, Ali Taher wrote:
Hi Alex,
Thanks for your answer. How to proceed to let Kamailio talk manually to VoltDB ?
Regards,
Ali Taher
-- Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
On 12/14/20 3:28 PM, Ali Taher wrote:
What I need is to fetch routing from VoltDB and send it back to switch using 3xx response. So I think the API solution is the best approach here. Thanks for all this useful info. >
If Kamailio is sending the 3xx response, then it sounds like using the HTTP modules to interact with VoltDB's JSON interface might be the best way to go.
You'll have to account for the latency inherent in such queries and make sure you have a sufficient number of worker processes to handle the load, whether you use the async or synchronous HTTP modules. For more information on that topic, you can read an old blog post of mine:
http://www.evaristesys.com/blog/tuning-kamailio-for-high-throughput-and-perf...
-- Alex
What do you recommend using : http sync or async client modules?
-----Original Message----- From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alex Balashov Sent: Monday, December 14, 2020 10:31 PM To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] voltdb support
On 12/14/20 3:28 PM, Ali Taher wrote:
What I need is to fetch routing from VoltDB and send it back to switch using 3xx response. So I think the API solution is the best approach here. Thanks for all this useful info. >
If Kamailio is sending the 3xx response, then it sounds like using the HTTP modules to interact with VoltDB's JSON interface might be the best way to go.
You'll have to account for the latency inherent in such queries and make sure you have a sufficient number of worker processes to handle the load, whether you use the async or synchronous HTTP modules. For more information on that topic, you can read an old blog post of mine:
http://www.evaristesys.com/blog/tuning-kamailio-for-high-throughput-and-perf...
-- Alex
-- Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Given a simple workflow where only one HTTP query is involved, I would recommend the async module. It's very straightforward to make the query out of the main request route, and pack the response into a 3xx redirect and send it out the door in the async reply route.
I've had to mix both modules in situations where there's a pipeline of HTTP requests -- what a pain.
I'm not sure of your request volumes, but I would set these to a relatively high number, e.g. 3x-4x the number of SIP children= processes you have.
https://kamailio.org/docs/modules/5.4.x/modules/http_async_client.html#idm55
-- Alex
On 12/14/20 3:35 PM, Ali Taher wrote:
What do you recommend using : http sync or async client modules?
-----Original Message----- From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alex Balashov Sent: Monday, December 14, 2020 10:31 PM To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] voltdb support
On 12/14/20 3:28 PM, Ali Taher wrote:
What I need is to fetch routing from VoltDB and send it back to switch using 3xx response. So I think the API solution is the best approach here. Thanks for all this useful info. >
If Kamailio is sending the 3xx response, then it sounds like using the HTTP modules to interact with VoltDB's JSON interface might be the best way to go.
You'll have to account for the latency inherent in such queries and make sure you have a sufficient number of worker processes to handle the load, whether you use the async or synchronous HTTP modules. For more information on that topic, you can read an old blog post of mine:
http://www.evaristesys.com/blog/tuning-kamailio-for-high-throughput-and-perf...
-- Alex
-- Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users