[OpenSIPS-Users] [NEW] MongoDB Database Driver

Vlad Paiu vladpaiu at opensips.org
Mon Jan 28 13:15:49 CET 2013


Hello,

A new *CACHEDB_MONGODB* module has been added to OpenSIPS trunk, and it 
will also be present in the future 1.9 release.

The module implements the Key-Value Interface [1] to allow the script 
writer and also the module writer to connect and do Key-Value type 
operations ( store,fetch,remove,counter_add,counter_sub ) on a MongoDB 
database.
The module supports both connection to a single MongoDB instance ( true 
single instance or mongos ) or to a MongoDB Replica Set.

Also, the CacheDB interface was enhanced in order to support RAW queries 
( [2] ). Due to the Key-Value nature of the CacheDB interface, the 
developer could not take full advantage of the capabilities of the NoSQL 
back-end. The raw queries should compensate that gap, allowing to run 
raw queries in a back-end dependent language.

The CACHEDB_MONGODB module implements the newly added RAW query from the 
interface, thus you can run whatever query that the MongoDB back-end 
supports, taking full advatange of it. The query syntax is a JSON-based 
one, very similar to the one that one would use to run commands in the 
mongo CLI. The query results are also returned as JSON documents, that 
one can further process in the OpenSIPS script by using the JSON module. 
For the full description of the raw query capabilities, see the 'Raw 
Query Syntax' section ( [3] ) in the module documentation.

For a full documentation of the module and usage examples, visit [4] .
Testing and feedback is very much welcome.

[1] http://www.opensips.org/Resources/DocsTutKvinterface
[2] http://www.opensips.org/Resources/DocsCoreFcn#toc116
[3] 
http://www.opensips.org/html/docs/modules/devel/cachedb_mongodb.html#id249157
[4] http://www.opensips.org/html/docs/modules/devel/cachedb_mongodb.html

Best Regards,

-- 
Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130128/8568bc02/attachment.htm>


More information about the Users mailing list