Re: store_tools
Alejandro Guerrieri <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Sure, here it goes: The patch: http://www.blogalex.com/wp-content/uploads/2008/10/kannel-mysql-storage-engine.patch Docs on my blog: http://www.blogalex.com/archives/20 ============ MySQL Storage Engine This patch adds an alternative storage engine that uses mysql as backend, instead of a big file or a spool directory. This makes some interesting setups possible and also allows to ease the disk I/O on the server (by using an external MySQL engine). To use it, you first need to create a MySQL database, and a table to hold the store messages. We’ll use “kannel” as DB Name and “store” as the table name, but you can choose whatever you want and modify the config file to reflect your setup (more on this later). To create the “store” table, run the following SQL query: CREATE TABLE store ( uuid VARCHAR(36) NOT NULL PRIMARY KEY, message TEXT ); Again, you can rename the fields and modify the config to reflect your environment. Then, on kannel.conf, you need to add a store-db group, and a mysql- connection pool: group = mysql-connection id = mypool host = localhost username = <user> password = <password> database = kannel max-connections = 1 group = store-db id = mypool table = store field-uuid = uuid field-message = message Last but not least, set the store-type to use the mysql storage engine on the core group: store-type = mysql As you may have noticed, you can modify the fields table, field-uuid and field-message to suit your particular database schema. This needs further testing (do not use it for production -yet-), please try it and let me know if you find any problems. ============ [NOTE: Maybe I could extend this to use the DB abstraction layer, so other DB backends could be supported]. Regards, -- Alejandro Guerrieri [email protected] On 27/01/2009, at 16:21, Stipe Tolj wrote: > Alvaro Cornejo schrieb: >> What about the mysql store patch from Alejandro? >> >> Can it be also added to main head? I've tested it and work >> flawlessly. > > now, I'm fine with it from a architectural point of view. I have to > admit I had > no chance to test it so far. > > @Alejandro: can you raise the attention again to the devel@ list > with a new > posting, so we get some more people on board for the review, and > then can commit? > > Stipe > > -- > ------------------------------------------------------------------- > Kölner Landstrasse 419 > 40589 Düsseldorf, NRW, Germany > > tolj.org system architecture Kannel Software Foundation (KSF) > http://www.tolj.org/ http://www.kannel.org/ > > mailto:st_{at}_tolj.org mailto:stolj_{at}_kannel.org > ------------------------------------------------------------------- >