Opensips switch from SQL to NoSQL

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Opensips switch from SQL to NoSQL

feroze waris
Hi,

Can anyone tell me how to move opensips DB from SQL to NoSQL. I have seen a module name db_cachedb which has a support for mongodb but how to move mysql schema to mongodb schema.

Regards
Feroze

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Opensips switch from SQL to NoSQL

Daniel Zanutti
Hi Feroze

I think you should first understand exactly what is written to MySQL and answer yourself why do you want to move to NoSQL.

Opensips has many modules that access DB structures like ACC, Subscribers, Address, Location, Loadbalancer, cachedb, etc. Which do you want to move to NoSQL? And why? Is this a performance issue? 

Cachedb is for caching results and you can use NoSQL to have a persistent cache.

Regards


On Wed, Jul 13, 2016 at 10:44 AM, feroze waris <[hidden email]> wrote:
Hi,

Can anyone tell me how to move opensips DB from SQL to NoSQL. I have seen a module name db_cachedb which has a support for mongodb but how to move mysql schema to mongodb schema.

Regards
Feroze

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Opensips switch from SQL to NoSQL

Benjamin Cropley
In reply to this post by feroze waris
You don't have to explicitly define a schema when you insert a document into MongoDB.

For example, you could create a MongoDB database, and then immediately do an insert into an insert into a collection without even creating it or a 'schema'.

Maybe you should do some reading about MongoDB and NoSQL in general, as a basic understanding should have answered that question :)


On Wed, Jul 13, 2016 at 2:44 PM, feroze waris <[hidden email]> wrote:
Hi,

Can anyone tell me how to move opensips DB from SQL to NoSQL. I have seen a module name db_cachedb which has a support for mongodb but how to move mysql schema to mongodb schema.

Regards
Feroze

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




--
All the best,
Ben Cropley
07539 366 905

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Opensips switch from SQL to NoSQL

feroze waris
Hi Daniel and Benajmin,

Thank you for reply and sharing link of mongodb basics. Yes there is a performance issue. I want that opensips writes and get information of dialog, location, subscriber etc from cachedb(mongodb). For this task i came across with the module named db_cachedb ( http://www.opensips.org/html/docs/modules/2.1.x/db_cachedb.html ).

 According to documentation what this module do is " The db_cachedb module will expose the same front db api, however it will run on top of a NoSQL back-end, emulating the SQL calls to the back-end specific queries."

I implemented this module and also created collections in mongodb according to mysql tables list. Now when i start opensips it gives me following error

Jul 14 17:27:45 localhost [23610]: ERROR:core:db_check_api: module db_mongodb does not export db_use_table function
Jul 14 17:27:45 localhost [23610]: ERROR:uri:mod_init: No database module found
Jul 14 17:27:45 localhost [23610]: ERROR:core:init_mod: failed to initialize module uri
Jul 14 17:27:45 localhost [23610]: ERROR:core:main: error while initializing modules

my opensips version is 2.1.3


On Wed, Jul 13, 2016 at 6:52 PM, Benjamin Cropley <[hidden email]> wrote:
You don't have to explicitly define a schema when you insert a document into MongoDB.

For example, you could create a MongoDB database, and then immediately do an insert into an insert into a collection without even creating it or a 'schema'.

Maybe you should do some reading about MongoDB and NoSQL in general, as a basic understanding should have answered that question :)


On Wed, Jul 13, 2016 at 2:44 PM, feroze waris <[hidden email]> wrote:
Hi,

Can anyone tell me how to move opensips DB from SQL to NoSQL. I have seen a module name db_cachedb which has a support for mongodb but how to move mysql schema to mongodb schema.

Regards
Feroze

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




--
All the best,
Ben Cropley
07539 366 905

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Opensips switch from SQL to NoSQL

Eric Tamme-3
Not all cachedb backends have implementations that allow you to use all modules.   The db api exports specific functions that may not be implemented for a given cache db module.  You have found an example of one where a module requires a db api function implementation, and the cachedb module you are using does not implement it.
-Eric

On 07/14/2016 11:31 AM, feroze waris wrote:
Hi Daniel and Benajmin,

Thank you for reply and sharing link of mongodb basics. Yes there is a performance issue. I want that opensips writes and get information of dialog, location, subscriber etc from cachedb(mongodb). For this task i came across with the module named db_cachedb ( http://www.opensips.org/html/docs/modules/2.1.x/db_cachedb.html ).

 According to documentation what this module do is " The db_cachedb module will expose the same front db api, however it will run on top of a NoSQL back-end, emulating the SQL calls to the back-end specific queries."

I implemented this module and also created collections in mongodb according to mysql tables list. Now when i start opensips it gives me following error

Jul 14 17:27:45 localhost [23610]: ERROR:core:db_check_api: module db_mongodb does not export db_use_table function
Jul 14 17:27:45 localhost [23610]: ERROR:uri:mod_init: No database module found
Jul 14 17:27:45 localhost [23610]: ERROR:core:init_mod: failed to initialize module uri
Jul 14 17:27:45 localhost [23610]: ERROR:core:main: error while initializing modules

my opensips version is 2.1.3


On Wed, Jul 13, 2016 at 6:52 PM, Benjamin Cropley <[hidden email]> wrote:
You don't have to explicitly define a schema when you insert a document into MongoDB.

For example, you could create a MongoDB database, and then immediately do an insert into an insert into a collection without even creating it or a 'schema'.

Maybe you should do some reading about MongoDB and NoSQL in general, as a basic understanding should have answered that question :)


On Wed, Jul 13, 2016 at 2:44 PM, feroze waris <[hidden email]> wrote:
Hi,

Can anyone tell me how to move opensips DB from SQL to NoSQL. I have seen a module name db_cachedb which has a support for mongodb but how to move mysql schema to mongodb schema.

Regards
Feroze

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




--
All the best,
Ben Cropley
07539 366 905

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Opensips switch from SQL to NoSQL

Jim DeVito
In reply to this post by feroze waris
I addition to what Eric said I suspect you are failing to load
cachedb_mongodb as stated "The following modules must be loaded before
this module: At least one NoSQL cachedb_* module."

Thanks!!

---
Jim DeVito
Mobile 440.941.3860

On 2016-07-14 10:31, feroze waris wrote:

> Hi Daniel and Benajmin,
>
> Thank you for reply and sharing link of mongodb basics. Yes there is a
> performance issue. I want that opensips writes and get information of
> dialog, location, subscriber etc from cachedb(mongodb). For this task
> i came across with the module named DB_CACHEDB (
> http://www.opensips.org/html/docs/modules/2.1.x/db_cachedb.html [3] ).
>
>
>  According to documentation what this module do is " THE DB_CACHEDB
> MODULE WILL EXPOSE THE SAME FRONT DB API, HOWEVER IT WILL RUN ON TOP
> OF A NOSQL BACK-END, EMULATING THE SQL CALLS TO THE BACK-END SPECIFIC
> QUERIES."
>
> I implemented this module and also created collections in mongodb
> according to mysql tables list. Now when i start opensips it gives me
> following error
>
> Jul 14 17:27:45 localhost [23610]: ERROR:core:db_check_api: module
> db_mongodb does not export db_use_table function
> Jul 14 17:27:45 localhost [23610]: ERROR:uri:mod_init: No database
> module found
> Jul 14 17:27:45 localhost [23610]: ERROR:core:init_mod: failed to
> initialize module uri
> Jul 14 17:27:45 localhost [23610]: ERROR:core:main: error while
> initializing modules
>
> my opensips version is 2.1.3
>
> On Wed, Jul 13, 2016 at 6:52 PM, Benjamin Cropley
> <[hidden email]> wrote:
>
>> You don't have to explicitly define a schema when you insert a
>> document into MongoDB.
>>
>> For example, you could create a MongoDB database, and then
>> immediately do an insert into an insert into a collection without
>> even creating it or a 'schema'.
>>
>> Maybe you should do some reading about MongoDB and NoSQL in general,
>> as a basic understanding should have answered that question :)
>>
>> https://docs.mongodb.com/manual/faq/fundamentals/ [2]
>>
>> On Wed, Jul 13, 2016 at 2:44 PM, feroze waris
>> <[hidden email]> wrote:
>>
>>> Hi,
>>>
>>> Can anyone tell me how to move opensips DB from SQL to NoSQL. I
>>> have seen a module name db_cachedb which has a support for mongodb
>>> but how to move mysql schema to mongodb schema.
>>>
>>> Regards
>>> Feroze
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users [1]
>>
>> --
>>
>> All the best,
>> Ben Cropley
>> 07539 366 905
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users [1]
>
>
>
> Links:
> ------
> [1] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> [2] https://docs.mongodb.com/manual/faq/fundamentals/
> [3] http://www.opensips.org/html/docs/modules/2.1.x/db_cachedb.html
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Opensips switch from SQL to NoSQL

qasimakhan@gmail.com
Dear Feroz,

From past experience DO NOT ATTEMPT this :). You will surely run into many bottle necks from switching to NoSQL. NoSQL is good for caching during call processing not for storing persistent data.

Regards,
Qasim

On Thu, Jul 14, 2016 at 11:38 PM, Jim DeVito <[hidden email]> wrote:
I addition to what Eric said I suspect you are failing to load cachedb_mongodb as stated "The following modules must be loaded before this module: At least one NoSQL cachedb_* module."

Thanks!!

---
Jim DeVito
Mobile 440.941.3860

On 2016-07-14 10:31, feroze waris wrote:
Hi Daniel and Benajmin,

Thank you for reply and sharing link of mongodb basics. Yes there is a
performance issue. I want that opensips writes and get information of
dialog, location, subscriber etc from cachedb(mongodb). For this task
i came across with the module named DB_CACHEDB (
http://www.opensips.org/html/docs/modules/2.1.x/db_cachedb.html [3] ).


 According to documentation what this module do is " THE DB_CACHEDB
MODULE WILL EXPOSE THE SAME FRONT DB API, HOWEVER IT WILL RUN ON TOP
OF A NOSQL BACK-END, EMULATING THE SQL CALLS TO THE BACK-END SPECIFIC
QUERIES."

I implemented this module and also created collections in mongodb
according to mysql tables list. Now when i start opensips it gives me
following error

Jul 14 17:27:45 localhost [23610]: ERROR:core:db_check_api: module
db_mongodb does not export db_use_table function
Jul 14 17:27:45 localhost [23610]: ERROR:uri:mod_init: No database
module found
Jul 14 17:27:45 localhost [23610]: ERROR:core:init_mod: failed to
initialize module uri
Jul 14 17:27:45 localhost [23610]: ERROR:core:main: error while
initializing modules

my opensips version is 2.1.3

On Wed, Jul 13, 2016 at 6:52 PM, Benjamin Cropley
<[hidden email]> wrote:

You don't have to explicitly define a schema when you insert a
document into MongoDB.

For example, you could create a MongoDB database, and then
immediately do an insert into an insert into a collection without
even creating it or a 'schema'.

Maybe you should do some reading about MongoDB and NoSQL in general,
as a basic understanding should have answered that question :)

https://docs.mongodb.com/manual/faq/fundamentals/ [2]

On Wed, Jul 13, 2016 at 2:44 PM, feroze waris
<[hidden email]> wrote:

Hi,

Can anyone tell me how to move opensips DB from SQL to NoSQL. I
have seen a module name db_cachedb which has a support for mongodb
but how to move mysql schema to mongodb schema.

Regards
Feroze

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users [1]

--

All the best,
Ben Cropley
07539 366 905
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users [1]



Links:
------
[1] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[2] https://docs.mongodb.com/manual/faq/fundamentals/
[3] http://www.opensips.org/html/docs/modules/2.1.x/db_cachedb.html

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users