<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Alex&#039;s Adventures in CodeSpace &#187; storage</title>
	<atom:link href="http://www.blogalex.com/archives/tag/storage/feed" rel="self" type="application/rss+xml" />
	<link>http://www.blogalex.com</link>
	<description>Alex Guerrieri&#039;s Blog</description>
	<lastBuildDate>Wed, 22 Jun 2011 15:56:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>DLR extravaganza</title>
		<link>http://www.blogalex.com/archives/121</link>
		<comments>http://www.blogalex.com/archives/121#comments</comments>
		<pubDate>Mon, 04 May 2009 19:32:55 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Kannel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[dlr]]></category>
		<category><![CDATA[patches]]></category>
		<category><![CDATA[smsc]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://www.blogalex.com/?p=121</guid>
		<description><![CDATA[This patch adds a new configuration parameter to control the smsc name dlrs use when stored on the DB.]]></description>
			<content:encoded><![CDATA[<div style="margin:5px 0px 5px 0px" id="linksalpha_tag_773644154" class="linksalpha-email-button" data-url="http://www.blogalex.com/archives/121" data-text="DLR extravaganza" data-desc="NOTE: This patch was superseded by another one I've wrote that adds smsc-admin-id instead. The smsc-admin-id patch was already commited to CVS so the use of the smsc-dlr-alias is now officially deprecated.

A problem you may have faced with dlrs on Kannel: If you're using dlrs and have more than one bind to a given carrier, you need to name them all the same. Otherwise, if the dlr come back over a different bind than the one you've used to send the MT message in the first place, Kannel won't b" data-site="Alex&#039;s Adventures in CodeSpace"></div><script type="text/javascript" src="http://www.linksalpha.com/social/loader?script_type=buttons_counters&tag_id=linksalpha_tag_773644154&link=http%3A%2F%2Fwww.blogalex.com%2Farchives%2F121&gplus=1&twitter=1&fblike=1&linkedin=1&gbuzz=0&tumblr=0&reddit=0&pinterest=0&digg=0&stumbleupon=0&gpluslang=en-US&twitterlang=en&fblikelang=en_US&gbuzzlang=en&fblikeverb=like&fblikefont=arial&fblikeref=linksalpha&gplusctr=1&twitterctr=1&linkedinctr=1&gbuzzctr=1&redditctr=1&pinterestctr=1&diggctr=1&stumbleuponctr=1&twittermention=&twitterrelated1=&twitterrelated2=&halign=center"></script><p><strong>NOTE</strong>: This patch was superseded by another one I&#8217;ve wrote that adds <em>smsc-admin-id</em> instead. The s<em>msc-admin-id</em> patch was already commited to CVS so the use of th<em>e smsc-dlr-alias</em> is now officially <strong>deprecated</strong>.</p>
<p>A problem you may have faced with <em>dlrs</em> on Kannel: If you&#8217;re using <em>dlrs</em> and have more than one bind to a given carrier, you need to name them all the same. Otherwise, if the <em>dlr</em> come back over a different bind than the one you&#8217;ve used to send the <em>MT</em> message in the first place, Kannel won&#8217;t be able to match them, since they won&#8217;t share the same <em>&#8220;smsc&#8221;</em> field.</p>
<p>This is usually OK. However, you lose the ability to control the binds independently: you cannot shutdown a single bind, for example. The problem worsens yet more if your binds are to different data centers (some carriers have redundant <em>SMSC&#8217;s</em> on geographycally distant places).</p>
<p>That&#8217;s why I&#8217;ve created <a href="http://www.blogalex.com/wp-content/uploads/2009/05/kannel-dlr-alias.patch">this patch</a> that adds a new configuration option to <em>SMSC</em> groups:</p>
<blockquote><p>smsc-dlr-alias</p></blockquote>
<p>Using this parameter, you can define an alias to use when storing <em>dlrs</em>, so they will match despite being sent/received over different binds.</p>
<p>For example:</p>
<blockquote>
<div>&#8230;</div>
<div>#carrier link 1</div>
<div>
<div>group                      = smsc</div>
<div>smsc                       = smpp</div>
<div>smsc-id                  = &#8220;link1&#8243;</div>
<div>smsc-dlr-alias     = &#8220;myalias&#8221;</div>
<div>allowed-smsc-id = &#8220;link1;mylink&#8221;</div>
<div>host                        = &#8220;1.1.1.1&#8243;</div>
<div>&#8230;</div>
<div>
<div>#carrier link 2</div>
<div>
<div>group                      = smsc</div>
<div>smsc                       = smpp</div>
<div>smsc-id                  = &#8220;link2&#8243;</div>
<div>smsc-dlr-alias     = &#8220;myalias&#8221;</div>
<div>allowed-smsc-id = &#8220;link2;mylink&#8221;</div>
<div>host                        = &#8220;1.1.1.1&#8243;</div>
</div>
<div>&#8230;</div>
</div>
</div>
</blockquote>
<p>Using this configuration, you just have to use the <em>&#8220;&amp;smsc=mylink&#8221;</em> parameter on your <em>send-sms</em> url. The dlr will be stored using the alias <em>&#8220;myalias&#8221;</em> no matter which of these 2 routes the message takes. When getting the response back, again, it will be matched against <em>&#8220;myalias&#8221;</em>.</p>
<p>Download the patch <a href="http://www.blogalex.com/wp-content/uploads/2009/05/kannel-dlr-alias.patch">here</a>.</p>
<p>Please try it and let me know what you think.</p>
<p>Regards,</p>
<p>Alex</p>
<div style="margin:0px 0px 0px 0px" id="linksalpha_tag_1156547821" class="linksalpha-email-button" data-url="http://www.blogalex.com/archives/121" data-text="DLR extravaganza" data-desc="NOTE: This patch was superseded by another one I've wrote that adds smsc-admin-id instead. The smsc-admin-id patch was already commited to CVS so the use of the smsc-dlr-alias is now officially deprecated.

A problem you may have faced with dlrs on Kannel: If you're using dlrs and have more than one bind to a given carrier, you need to name them all the same. Otherwise, if the dlr come back over a different bind than the one you've used to send the MT message in the first place, Kannel won't b" data-site="Alex&#039;s Adventures in CodeSpace"></div><script type="text/javascript" src="http://www.linksalpha.com/social/loader?script_type=buttons_counters&tag_id=linksalpha_tag_1156547821&link=http%3A%2F%2Fwww.blogalex.com%2Farchives%2F121&gplus=1&twitter=1&fbsend=1&linkedin=1&gbuzz=0&tumblr=0&reddit=0&pinterest=1&digg=0&stumbleupon=1&gpluslang=en-US&twitterlang=en&fbsendlang=en_US&gbuzzlang=en&twittermention=&twitterrelated1=&twitterrelated2=&halign=center"></script>]]></content:encoded>
			<wfw:commentRss>http://www.blogalex.com/archives/121/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>MySQL Storage Engine</title>
		<link>http://www.blogalex.com/archives/20</link>
		<comments>http://www.blogalex.com/archives/20#comments</comments>
		<pubDate>Sat, 04 Oct 2008 17:57:30 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Kannel]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://www.blogalex.com/?p=20</guid>
		<description><![CDATA[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, [...]]]></description>
			<content:encoded><![CDATA[<div style="margin:5px 0px 5px 0px" id="linksalpha_tag_297558271" class="linksalpha-email-button" data-url="http://www.blogalex.com/archives/20" data-text="MySQL Storage Engine" data-desc="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 " data-site="Alex&#039;s Adventures in CodeSpace"></div><script type="text/javascript" src="http://www.linksalpha.com/social/loader?script_type=buttons_counters&tag_id=linksalpha_tag_297558271&link=http%3A%2F%2Fwww.blogalex.com%2Farchives%2F20&gplus=1&twitter=1&fblike=1&linkedin=1&gbuzz=0&tumblr=0&reddit=0&pinterest=0&digg=0&stumbleupon=0&gpluslang=en-US&twitterlang=en&fblikelang=en_US&gbuzzlang=en&fblikeverb=like&fblikefont=arial&fblikeref=linksalpha&gplusctr=1&twitterctr=1&linkedinctr=1&gbuzzctr=1&redditctr=1&pinterestctr=1&diggctr=1&stumbleuponctr=1&twittermention=&twitterrelated1=&twitterrelated2=&halign=center"></script><p>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).</p>
<p>To use it, you first need to create a MySQL database, and a table to hold the store messages. We&#8217;ll use &#8220;kannel&#8221; as DB Name and &#8220;store&#8221; as the table name, but you can choose whatever you want and modify the config file to reflect your setup (more on this later).</p>
<p>To create the &#8220;store&#8221; table, run the following SQL query:<em></em></p>
<p><em>CREATE TABLE store ( uuid VARCHAR(36) NOT NULL PRIMARY KEY, message TEXT );</em></p>
<p>Again, you can rename the fields and modify the config to reflect your environment.</p>
<p>Then, on kannel.conf, you need to add a store-db group, and a mysql-connection pool:</p>
<p><em>group = mysql-connection<br />
id = mypool<br />
host = localhost<br />
username = &lt;user&gt;<br />
password = &lt;password&gt;<br />
database = kannel<br />
max-connections = 1<br />
</em></p>
<p><em>group = store-db<br />
id = mypool<br />
table = store<br />
field-uuid = uuid<br />
field-message = message</em></p>
<p>Last but not least, set the store-type to use the mysql storage engine on the <em>core</em> group:</p>
<p><em>store-type = mysql</em></p>
<p>As you may have noticed, you can modify the fields <em>table</em>, <em>field-uuid</em> and <em>field-message</em> to suit your particular database schema.</p>
<p>Here&#8217;s the patch against latest CVS:</p>
<p><a href="http://www.blogalex.com/wp-content/uploads/2008/10/kannel-mysql-storage-engine.patch">kannel-mysql-storage-engine</a></p>
<p>This needs further testing (do not use it for production -yet-), please try it and let me know if you find any problems.</p>
<div style="margin:0px 0px 0px 0px" id="linksalpha_tag_1729385211" class="linksalpha-email-button" data-url="http://www.blogalex.com/archives/20" data-text="MySQL Storage Engine" data-desc="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 " data-site="Alex&#039;s Adventures in CodeSpace"></div><script type="text/javascript" src="http://www.linksalpha.com/social/loader?script_type=buttons_counters&tag_id=linksalpha_tag_1729385211&link=http%3A%2F%2Fwww.blogalex.com%2Farchives%2F20&gplus=1&twitter=1&fbsend=1&linkedin=1&gbuzz=0&tumblr=0&reddit=0&pinterest=1&digg=0&stumbleupon=1&gpluslang=en-US&twitterlang=en&fbsendlang=en_US&gbuzzlang=en&twittermention=&twitterrelated1=&twitterrelated2=&halign=center"></script>]]></content:encoded>
			<wfw:commentRss>http://www.blogalex.com/archives/20/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

