[asterisk-commits] oej: branch oej/codename-appleraisin-trunk r179290 - in /team/oej/codename-ap...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 2 04:19:28 CST 2009


Author: oej
Date: Mon Mar  2 04:19:24 2009
New Revision: 179290

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=179290
Log:
Adding README

Added:
    team/oej/codename-appleraisin-trunk/README.appleraisin   (with props)
Modified:
    team/oej/codename-appleraisin-trunk/main/db.c

Added: team/oej/codename-appleraisin-trunk/README.appleraisin
URL: http://svn.digium.com/svn-view/asterisk/team/oej/codename-appleraisin-trunk/README.appleraisin?view=auto&rev=179290
==============================================================================
--- team/oej/codename-appleraisin-trunk/README.appleraisin (added)
+++ team/oej/codename-appleraisin-trunk/README.appleraisin Mon Mar  2 04:19:24 2009
@@ -1,0 +1,57 @@
+Edvina AB
+Olle E. Johansson					March 2009
+
+
+
+AppleRaisin - Moving Astdb to realtime
+--------------------------------------
+
+This branch, based on Asterisk svn trunk, implements storage of AstDB in ARA, the realtime data object
+manipulation abstraction something in Asterisk. The name "realtime" is getting more and more
+non-descriptive for what ARA has become. With the addition of delete and store operations,
+realtime fits very well for astdb.
+
+Why?
+----
+
+There are a lot of applications and GUI's out there that makes heavy use of astdb. In order
+to be able to have some sort of failover solution and provide scalability, astdb needs to
+move to another engine than Berkeley DB v1 that uses one single file. The GUI I had in 
+mind when working with this code was FreePBX from freepbx.org. 
+
+Howto:
+------
+
+1. This branch requires realtime drivers with the store and delete methods implemented. 
+   The regular asterisk-addons and Asterisk realtime drivers now implement this (in trunk).
+   I don't know the state of other than odbc and mysql drivers in this regard.
+
+2. Make sure you load the realtime driver before channel drivers and modules that use AstDb
+
+3. Note that because astdb is part of the Asterisk core, we have a chicken-and-egg issue. The AstDB
+   interface is initialized before any modules, so by default, astdb initializes to the
+   Berkeley DB interface. For each call, astdb checks if there's a realtime family activated
+   and switches as soon as this is available. If there's any code in-core using astdb
+   in your Asterisk version this will be an issue. I haven't identified any such issues
+   in the Digium distribution of Asterisk.
+
+4. Create a database with this table or something similar for non-SQL realtime drivers.
+   Configure this in the "astdb" family in extconfig.conf
+
+	CREATE TABLE `astdb` (
+  		`systemname` varchar(40) NOT NULL,
+  		`family` varchar(256) NOT NULL,
+  		`keyname` varchar(256) NOT NULL,
+  		`value` varchar(1050) NOT NULL,
+  		PRIMARY KEY  (`family`,`keyname`)
+	) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+5. Remember to set the systemname in asterisk.conf
+
+6. If you want to access an astdb variable in another server, just query using the normal
+   realtime or odbc functions.
+
+Thank you to...
+----------------
+- Jared Smith, who gently forced me into the #freepbx-dev IRC channel to discuss this project
+- During the process I've gotten a lot of information from Philippe @freepbx - thank you!

Propchange: team/oej/codename-appleraisin-trunk/README.appleraisin
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/oej/codename-appleraisin-trunk/README.appleraisin
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/oej/codename-appleraisin-trunk/README.appleraisin
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: team/oej/codename-appleraisin-trunk/main/db.c
URL: http://svn.digium.com/svn-view/asterisk/team/oej/codename-appleraisin-trunk/main/db.c?view=diff&rev=179290&r1=179289&r2=179290
==============================================================================
--- team/oej/codename-appleraisin-trunk/main/db.c (original)
+++ team/oej/codename-appleraisin-trunk/main/db.c Mon Mar  2 04:19:24 2009
@@ -877,7 +877,7 @@
 
 int astdb_init(void)
 {
-	/* When this routing is run, the realtime modules are not loaded so we can't initialize realtime yet. */
+	/* When this routine is run, the realtime modules are not loaded so we can't initialize realtime yet. */
 	db_rt = 0;
 
 	/* If you have multiple systems using the same database, set the systemname in asterisk.conf */




More information about the asterisk-commits mailing list