On 3/27/12 3:22 PM, Jason Penton wrote:
wow Daniel, you've been busy ;)

nice!!!!
thanks, still a bit to tune it (add the feature of enable/disable connections), but should be workable as it is. Couldn't test all scenarios, so feedback would be welcome!

Cheers,
Daniel


On Tue, Mar 27, 2012 at 2:44 PM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
Module: sip-router
Branch: master
Commit: 201fc2d600e48fbb717531c79013c1b971f82d76
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=201fc2d600e48fbb717531c79013c1b971f82d76

Author: Daniel-Constantin Mierla <miconda@gmail.com>
Committer: Daniel-Constantin Mierla <miconda@gmail.com>
Date:   Tue Mar 27 14:38:57 2012 +0200

db_cluster: new module for generic database clustering

- the module allow to group several DB connections and perform commands
 over them, based on policies such as round robin, serial try or
 parallel execution
- any kind of db connection can make part from a cluster
- example use case: write in parallel to two databases and do round
 robin read from them
- the module is a middle layer between modules and databases, reusing
 existing db connectors. A module that wants to use such cluster, just
 have to set the db_url to "cluster://clusterid"
- the module allow definition of multiple clusters
- see README for more details
- todo: enable/disable connections at runtime and via rpc

---

 modules_k/db_cluster/Makefile                 |   15 +
 modules_k/db_cluster/README                   |  162 +++++++++
 modules_k/db_cluster/db_cluster_mod.c         |  112 ++++++
 modules_k/db_cluster/dbcl_api.c               |  437 ++++++++++++++++++++++
 modules_k/db_cluster/dbcl_api.h               |  142 ++++++++
 modules_k/db_cluster/dbcl_data.c              |  479 +++++++++++++++++++++++++
 modules_k/db_cluster/dbcl_data.h              |   89 +++++
 modules_k/db_cluster/doc/Makefile             |    4 +
 modules_k/db_cluster/doc/db_cluster.xml       |   37 ++
 modules_k/db_cluster/doc/db_cluster_admin.xml |  167 +++++++++
 10 files changed, 1644 insertions(+), 0 deletions(-)

Diff:   http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=201fc2d600e48fbb717531c79013c1b971f82d76

_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev



_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

-- 
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
http://www.asipto.com/index.php/kamailio-advanced-training/