<?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>indiegamr &#187; tech</title>
	<atom:link href="http://indiegamr.com/category/tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://indiegamr.com</link>
	<description>apps, indie &#38; beyond</description>
	<lastBuildDate>Sun, 30 Mar 2014 14:51:19 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.0.38</generator>
	<item>
		<title>&#8220;Can you make that loading screen stay longer?&#8221;</title>
		<link>http://indiegamr.com/can-you-make-that-loading-screen-stay-longer/</link>
		<comments>http://indiegamr.com/can-you-make-that-loading-screen-stay-longer/#comments</comments>
		<pubDate>Sun, 06 Jan 2013 04:58:42 +0000</pubDate>
		<dc:creator><![CDATA[olsn]]></dc:creator>
				<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://indiegamr.com/?p=569</guid>
		<description><![CDATA[Or in other words: When everything that can be wrong with a client is wrong! &#8211; The client had already made a couple requests that seemed odd or made no sense in my eyes, but this one really sums up &#8230; <a href="http://indiegamr.com/can-you-make-that-loading-screen-stay-longer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Or in other words: <strong>When everything that can be wrong with a client is wrong!</strong> &#8211; The client had already made a couple requests that seemed odd or made no sense in my eyes, but this one really sums up the nature of this client in one word.<br />
I&#8217;m currently working on a Phonegap App and the client&#8217;s latest request was to add a loading-screen to the app(not for initial loading), so we added a loading-screen.<br />
We didn&#8217;t think that one was necessary, but okay&#8230;the client wants a loading screen, so he gets one. Don&#8217;t get me wrong here, it&#8217;s not a splash-screen, it&#8217;s really just a loading-screen: <strong>a white screen, that says &#8220;loading&#8230;&#8221;</strong><br />
But it didn&#8217;t stop there: When he saw the thing implemented his reaction was like: &#8220;It dislays for less than a second, that makes the loading-screen seem kind of pointless. Can you make it stay longer?&#8221;</p>
<p>Long story short: This is probably the most senseless piece of code I have ever written and most likely will ever have written:</p><pre class="crayon-plain-tag">onComplete = function(e) {
  //...doing some other stuff

  // at this point everything is
  // loaded and ready to go
  // ...but ... you know ... the client ...
  setTimeout(
    function() {
      $('#loadingCover').hide();
    }, 3000
  );
}</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://indiegamr.com/can-you-make-that-loading-screen-stay-longer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MsgPack vs. JSON: Cut your client-server exchange traffic by 50% with one line of code</title>
		<link>http://indiegamr.com/cut-your-data-exchange-traffic-by-up-to-50-with-one-line-of-code-msgpack-vs-json/</link>
		<comments>http://indiegamr.com/cut-your-data-exchange-traffic-by-up-to-50-with-one-line-of-code-msgpack-vs-json/#comments</comments>
		<pubDate>Sun, 10 Jun 2012 12:00:01 +0000</pubDate>
		<dc:creator><![CDATA[olsn]]></dc:creator>
				<category><![CDATA[JSON]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[ZeroPilot]]></category>

		<guid isPermaLink="false">http://indiegamr.com/?p=72</guid>
		<description><![CDATA[As the previouse 2 articles were about optimizing performance and keeping the server cost as low as possible, this article will also cover this area and write about why I&#8217;m using MsgPack instead of JSON in ZeroPilot. In a web-app &#8230; <a href="http://indiegamr.com/cut-your-data-exchange-traffic-by-up-to-50-with-one-line-of-code-msgpack-vs-json/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>As the previouse 2 articles were about optimizing performance and keeping the server cost as low as possible, this article will also cover this area and write about why I&#8217;m using <a href="http://msgpack.org/" target="_blank">MsgPack </a>instead of <a href="http://json.org/" target="_blank">JSON </a>in <a title="ZeroPilot" href="http://indiegamr.com/zeropilot/" target="_blank">ZeroPilot</a>.</p>
<p>In a web-app there is allways data sent between the client and the server &#8211; would you believe me if I told you that after otimizing all the server-calls, bundeling them together ect. you can still save up to 40% (and some cases even 60%) of your traffic caused by client-server communication with not more than <strong>one line of code</strong>?</p>
<p><span id="more-72"></span></p>
<p>Well, the magic word is &#8220;<strong><a href="http://msgpack.org/" target="_blank">MsgPack</a></strong>&#8221; &#8211; it is a &#8216;<em>binary-based efficient object serialization library</em>&#8216;. The difference to <strong><a href="http://json.org/" target="_blank">JSON</a>&nbsp;</strong>is, that MsgPack is <strong>binary-based</strong>&nbsp;&#8211; this gives the possibility to make the exchanged data <strong>a) smaller and use less bytes</strong>, I guess we all know the advantages of that, however there is an even bigger advantage:<strong>&nbsp;b) It is faster to parse</strong> and <strong>encode</strong>, having a parser parse 40 bytes takes about twice as long as parsing 20 bytes. I know those advantages might seem marginal &#8211; however if you scale this up to a couple thousand (or even more) users you will see quite a bit of a difference there. And even if you don&#8217;t have a couple thousand users &#8211; why would you not want to take advantage of something like this? <img src="http://indiegamr.com/wp-includes/images/smilies/icon_wink.gif" alt=";-)" class="wp-smiley" /></p>
<p>To make this difference more visible i put together a small example:</p>
<div style="width: 100%; background-color: #efefef;">
<div style="width: 40%; margin-left: 5%; float: left;">
<p><strong>JSON</strong></p>
<hr />
<p>{&#8220;<span style="background-color: #cc8888; background-position: initial initial; background-repeat: initial initial;">name</span>&#8220;:&#8221;<span style="background-color: #88cc88; background-position: initial initial; background-repeat: initial initial;">John Doe</span>&#8220;,&#8221;<span style="background-color: #cccc88;">age</span>&#8220;:<span style="background-color: #88cccc;">12</span>}</p>
</div>
<div style="width: 40%; margin-left: 5%; float: left;">
<p><strong>MsgPack</strong></p>
<hr />
<p>‚¤<span style="background-color: #cc8888; background-position: initial initial; background-repeat: initial initial;">name</span>¨<span style="background-color: #88cc88; background-position: initial initial; background-repeat: initial initial;">John Doe</span>&pound;<span style="background-color: #cccc88; background-position: initial initial; background-repeat: initial initial;">age</span><span style="background-color: #88cccc; background-position: initial initial; background-repeat: initial initial;">.</span></p>
</div>
<div style="clear: both;">&nbsp;</div>
<div style="width: 40%; margin-left: 5%; float: left;">
<hr />
<p>7B 22 <span style="background-color: #cc8888; background-position: initial initial; background-repeat: initial initial;">6E 61 6D 65</span> 22 3A 22 <span style="background-color: #88cc88; background-position: initial initial; background-repeat: initial initial;">4A 6F 68 6E 20 44 6F 65</span> 22 2C 22 <span style="background-color: #cccc88; background-position: initial initial; background-repeat: initial initial;">61 67 65</span> 22 3A 20 <span style="background-color: #88cccc; background-position: initial initial; background-repeat: initial initial;">31 32</span>&nbsp;7D</p>
</div>
<div style="width: 40%; margin-left: 5%; float: left;">
<hr />
<p>82 A4 <span style="background-color: #cc8888; background-position: initial initial; background-repeat: initial initial;">6E 61 6D 65</span> A8 <span style="background-color: #88cc88; background-position: initial initial; background-repeat: initial initial;">4A 6F 68 6E 20 44 6F 65</span> A3 <span style="background-color: #cccc88; background-position: initial initial; background-repeat: initial initial;">61 67 65</span> <span style="background-color: #88cccc; background-position: initial initial; background-repeat: initial initial;">0C</span></p>
</div>
<div style="clear: both;">&nbsp;</div>
<div style="width: 40%; margin-left: 5%; float: left;"><span style="text-decoration: underline;"><span style="font-size: 20pt !important;"><strong>→ 29 bytes</strong></span></span></div>
<div style="width: 40%; margin-left: 5%; float: left;"><span style="text-decoration: underline;"><span style="font-size: 20pt;"><strong>→ 20 bytes</strong></span></span></div>
<div style="clear: both;">&nbsp;</div>
</div>
<p>As you can see, the MsgPack-encoded data is about 2/3 the size of JSON.</p>
<p>(edit: I previously had some&nbsp;unnecessary bytes in the JSON code, making the example to much in favour of MsgPack, I removed those. thx to charles leifer for noticing)</p>
<p>Additionally, the whole thing look less readable when you look at it &#8211; so as a small bonus this will probably repell some script-kiddies, who are trying to intercept your JSON- or XML-calls.</p>
<p><strong>One line of code you said?</strong></p>
<hr />
<p>That is correct, assuming that you are currently using JSON: (JavaScript-example)</p>
<p><code lang="javascript">//just exchange the encoding and decoding lines<br />
myJSONString = JSON.stringify(myObject);<br />
myObject = JSON.parse(myJSONString);<br />
//with<br />
var myByteArray = msgpack.pack(myObject);<br />
myObject = msgpack.unpack(myByteArray);</code></p>
<p>MsgPack returns Objects/Hashes or Arrays, Numbers and Strings just like JSON will do, so there is NO need to change anything further than the encoding- and decoding lines.</p>
<p><strong>Why havn&#8217;t I heared from MsgPack before?</strong></p>
<hr />
<p>As with all good things: They need time, MsgPack has first been introduced about 2 1/2 years ago I believe (at least according to their<a href="https://github.com/msgpack" target="_blank"> github-repo</a>) &#8211; it might be older, but without a github repository it is rather difficult to get noticed nowadays.</p>
<p>I can only <strong>encourage</strong> you to visit the <a href="http://msgpack.org/" target="_blank">MsgPack</a>-Site and download the implementation for your programming-language(every major language has one), even if your desired language has no official implementation, there are usually unofficial projects to be found via google or github. If you can&#8217;t find it &#8211; contribute to the community and write your own implementation and share it. <img src="http://indiegamr.com/wp-includes/images/smilies/icon_smile.gif" alt=":-)" class="wp-smiley" /></p>
<p>Edit #1: Looking at JavaScript it is true, that parsing JSON is faster than any custom parser. However, the field of usage is more than just JavaScript, considered that the serverload is probably more to be taken into account than your clients, as it won&#8217;t really matter if your clients need 0.1ms or 2ms to decode/encode something, however on the serverside MsgPack-parsing is usually faster than JSON &#8211; in the case of Ruby, MsgPack is faster by a factor of ~5.</p>
<p>Edit #2: Since there was quite a bit of critisism here and on Hacker News, Sadayuki &#8220;<a href="https://github.com/frsyuki" target="_blank">Sada</a>&#8221; Furuhashi, the creator of MessagePack posted some thoughts on MessagePack on gist: <a href="https://gist.github.com/2908191" target="_blank">https://gist.github.com/2908191</a> clarifying a few things, thank you for that Sadayuki.</p>
]]></content:encoded>
			<wfw:commentRss>http://indiegamr.com/cut-your-data-exchange-traffic-by-up-to-50-with-one-line-of-code-msgpack-vs-json/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Minimize server-side-calculations: Example Weekly Tournament</title>
		<link>http://indiegamr.com/minimize-server-side-calculations-example-weekly-tournament/</link>
		<comments>http://indiegamr.com/minimize-server-side-calculations-example-weekly-tournament/#comments</comments>
		<pubDate>Sat, 09 Jun 2012 11:47:27 +0000</pubDate>
		<dc:creator><![CDATA[olsn]]></dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[ZeroPilot]]></category>

		<guid isPermaLink="false">http://indiegamr.com/?p=53</guid>
		<description><![CDATA[As mentioned in my previous post, as a indie-developer you have to watch your butdget and therefore save with the more expensive things, like servercost &#8211; now having a free(or low cost) server-/app-system&#160;still won&#8217;t give you the freedom to do &#8230; <a href="http://indiegamr.com/minimize-server-side-calculations-example-weekly-tournament/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>As mentioned in my previous <a title="How to get free production-level hosting for your app" href="http://indiegamr.com/how-to-get-free-production-level-hosting-for-your-app/">post</a>, as a indie-developer you have to watch your butdget and therefore save with the more expensive things, like servercost &#8211; now having a <a title="How to get free production-level hosting for your app" href="http://indiegamr.com/how-to-get-free-production-level-hosting-for-your-app/">free(or low cost) server-/app-system</a>&nbsp;still won&#8217;t give you the freedom to do any amount of calculation you desire. So what your goal should be, is to keep the amount of caluclations and cron-jobs the server has to do to an absolut minimum, and optimize everything &#8211; trust me, there is ALLWAYS something you can optimize. I&#8217;m going to explain this now on the example of weekly tournaments of my facebook-app <a title="ZeroPilot" href="http://indiegamr.com/zeropilot/" target="_blank">ZeroPilot</a>&nbsp;&#8211; i know this is a rather extreme example, but non the less shows the point of doing calculations only when they are needed and at best: do them on the client-side.</p>
<p><span id="more-53"></span></p>
<p>So here are a few basic points what I&#8217;ve learned while coding the server-side of my app that you might be able to apply to your app:</p>
<ul>
<li>do calculations only when a user logs on to your app, especially if the calculation only affects the user</li>
<li>do NOT use bulk calculations/queries unless they&#8217;re absolutely neccessary
<p>e.g.: don&#8217;t run a cronjob, that involves a big amount of(or even all) users</li>
<li>MOST bulk calculations can be solved in another way, it&#8217;s usually more tricky to accomplish but it is possible in pretty much any case
<p>e.g.: in the case of time-based events, lets say &#8220;User A started a contract, that will be finished in 1h&#8221; &#8211; the worst thing you can do is to run a cronjob that checks every couple seconds if the contract is finished yet &#8211; instead save the timestamp when that contract will finish and whenever the user logs back on you do the actions according to the state &#8211; e.g.: if the contract was finished 2h ago, then add the according resources ect&#8230;</li>
</ul>
<p>Now to the specific example that I had to struggle with:</p>
<p>Weekly Tournament: At the end of every tournament the highscore is resetted and every player gets awarded a trophy: #1 = Gold, #2 = Silver, #3 = Bronce, &gt;#4 = Wooden. (ranking is based on the scores of friends, that are playing)</p>
<p>Now there are several ways to calculate who gets which trophy, i&#8217;m going to list two of them:</p>
<p><strong>1. Heavy server-side calculation(easy way)</strong></p>
<hr />
<p>The&nbsp;crowbar method of doing this is to run a cronjob and when the tournemt ends, the server goes through every user, will collect the score of each friend of this user und then compare their scores and assign a trophy to the selected player, then reset their highscores.</p>
<p>Some might say &#8220;Yea, works&#8230;and it&#8217;s only needed once a week, so where&#8217;s the problem, it doesn&#8217;t matter if the server needs a couple seconds to run this job.&#8221;</p>
<p>Okay &#8211; but if time is not the issue, then traffic and database-queries definitly are, based on my <a title="How to get free production-level hosting for your app" href="http://indiegamr.com/how-to-get-free-production-level-hosting-for-your-app/" target="_blank">server-setup</a>&nbsp;you are very likely to run into problems here if the database is and external service.</p>
<p><strong>Heavy-Version number of queries:</strong>&nbsp; min. 1 read + 1 (batch)write for every user (can be more, depending on the implementation)</p>
<p><strong>Heavy-Version queries at logon:</strong> 0 for calculation purposes, however 1 read is done anyways, that is not beeing utilized in this version</p>
<p><strong>2. Light server-side calculation(more tricky)</strong></p>
<hr />
<p>The light version is, to calculate the trophy the player earned the next time the player logs onto the game. However it&#8217;s not as easy as that &#8211; for example what happens if a player logs on and creates a new highscore after the tournament ended &#8211; how will players, that logon later know that this <strong>new</strong> highscore should not be held into account with the <strong>old</strong> tournament. I&#8217;m going to show how this is accomplished in ZeroPilot, it&#8217;s a little bit tricky but in terms of server-calculations totally worth it:</p>
<p>Every tournament has an ID, and every high score is saved with a reference to the current tournament ID. So whenever the player logs on, the server compares the ID from the current tournament with the ID of the latest player&#8217;s high score &#8211; if they don&#8217;t match then it&#8217;s probably because this is a new week and it&#8217;s time to check what trophy that player should get. To be certain this is checked only once, I also set a flag in the userdata, that this player already got awarded for that tournament. To make it more visible here&#8217;s a code-snippet:</p>
<p><code lang="ruby">servCt = server[:currentTournament]<br />
servLt = server[:lastTournament]<br />
if user[:currentTournament] != servCt<br />
     user[:lastTournament]    = user[:currentTournament]<br />
     user[:currentTournament] = servCt<br />
     calculateAndAssignTrophy(user, servLt)<br />
     user[:wasAwarded][servLt] = true<br />
     # Since I don't need any score that are older than 2 weeks<br />
     # I just delete the old ones to save datastorage, but this<br />
     # step is not neccessary if your db is big enough<br />
     deleteTournamentScoreBeforeLast(user)<br />
end</code></p>
<p>And the following is all that is done within the cron-job when the tournament ends:</p>
<p><code lang="ruby">server[:lastTournament] = server[:currentTournament]<br />
server[:currentTournament] += 1</code></p>
<p><strong><strong>Light-Version cron number of queries:&nbsp;</strong>&nbsp;</strong>1 read, 2 writes</p>
<p><strong>Light-Version queries on logon:</strong> &nbsp;1 read, 1 write per user, however it is very likely that users will logon over a period of time, and those queries are done anyways at logon.</p>
<hr />
<p>So as you can see it makes quite a difference, if you rely on easy-to-implement algorithms or if you use a less obviouse way of calculating things and do the calculations in single steps just in time when the data is needed. Another point for thisis, that the calculations and queries are spread out over a period of time as the user logon to the game, this will not cause any spikes like it is very likely the case with the heavy-version.<strong></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://indiegamr.com/minimize-server-side-calculations-example-weekly-tournament/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get free production-level hosting for your app</title>
		<link>http://indiegamr.com/how-to-get-free-production-level-hosting-for-your-app/</link>
		<comments>http://indiegamr.com/how-to-get-free-production-level-hosting-for-your-app/#comments</comments>
		<pubDate>Wed, 06 Jun 2012 21:23:45 +0000</pubDate>
		<dc:creator><![CDATA[olsn]]></dc:creator>
				<category><![CDATA[hosting]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[ZeroPilot]]></category>

		<guid isPermaLink="false">http://indiegamr.com/?p=5</guid>
		<description><![CDATA[&#160; As an indie developer i guess you are pretty familiar with the issue of a limited budget, and as we all know servers for hosting an application can be very expensive and you need quite some knowledge if you &#8230; <a href="http://indiegamr.com/how-to-get-free-production-level-hosting-for-your-app/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>&nbsp;</p>
<p>As an indie developer i guess you are pretty familiar with the issue of a limited budget, and as we all know servers for hosting an application can be very expensive and you need quite some knowledge if you want to manage and configure or even cluster a server yourself.</p>
<p>So here I&#8217;m going to cover my experiences on the hunt for a good solution for <a href="https://apps.facebook.com/zeropilot/" target="_blank">ZeroPilot </a>and what I found is one of the best solutions for this issue in terms of a good cost/benefit ratio.</p>
<p><span id="more-5"></span></p>
<p>So, before explaining why, I&#8217;m just going to tell you the solution I&#8217;m working with right now:</p>
<p><strong><a href="http://www.heroku.com/" target="_blank">Heroku </a>+ <a href="https://addons.heroku.com/redistogo" target="_blank">Redis To Go</a> + <a href="http://aws.amazon.com/dynamodb/" target="_blank">Amazon DynamoDB&nbsp;</a>+ <a href="https://developers.facebook.com/docs/score/" target="_blank">Facebook Score API</a></strong></p>
<p><a href="http://indiegamr.com/how-to-get-free-production-level-hosting-for-your-app/db_flow-3/" rel="attachment wp-att-11"><img class="aligncenter size-full wp-image-11" title="DB_flow" src="http://indiegamr.com/wp-content/uploads/DB_flow.png" alt="" width="500" height="500" /></a></p>
<p><strong>And here is how it works:</strong></p>
<p><em>Heroku</em> is used for the hosting of the app itself. All the persistent data is stored on <em>Amazon DynamoDB</em>, and <em>Redis </em>is being used for the data of all users, that are currently online playing the game.</p>
<p><strong>Why I chose a setup like this:</strong></p>
<p>As there is no single solution, that &#8220;has it all&#8221;, or at least non that I know of, that offers reasonable pricing, I tried to utilize all the good aspects of each service, starting with DynamoDB:</p>
<p><strong>1. Amazon DynamoDB</strong></p>
<hr />
<p><a href="http://aws.amazon.com/dynamodb/" target="_blank">Amazon DynamoDB</a> is a scaleable database solution by Amazon Web Services, that is based on SSD-drives and is VERY easy to integrate. The <strong>free</strong> plan includes 10 reads/sec, 5 writes/sec and 100MB of storage capacity &#8211; now if you just look at the numbers it may not sound like a very good deal &#8211; however if you use it the right way, this becomes actually pretty usefull.</p>
<p><strong>Looking at the capacity:</strong> 100MB, for ZeroPilot this about enough space to store the data of a little more than 200.000 users, doesn&#8217;t sound too much, but as soon as you start paying for the service, even if it is just 5$ a month, they remove the storage limit.</p>
<p><strong>Read/Write thoughput: </strong>10 reads and 5 writes / second doesn&#8217;t look to good either, however I only use this database for offline and persistent data. So whenever a user logs on, the data is read once and saved to Redis, when the user logs off, the data is written from Redis to DynamoDB. Whenever you would reach the limit of your throughput the SDK automatically waits a certain amount of time and does a retry for the query.</p>
<p><strong>The pricing for DynamoDB is for each:</strong></p>
<p>(details at:&nbsp;<a href="http://aws.amazon.com/dynamodb/#pricing" target="_blank">http://aws.amazon.com/dynamodb/#pricing</a>&nbsp;)</p>
<p>50 read/sec: 1cent/h</p>
<p>10 write/sec: 1cent/h</p>
<p>So with the free plan, about 36.000 users could logon to the app per hour</p>
<p>and for about 14$/month about 180.000 users could logon each hour.</p>
<p>An <strong>alternative</strong> to this would have been <a href="https://mongolab.com/home" target="_blank">MongoLab</a>(<a href="http://www.mongodb.org/" target="_blank">MongoDB</a>), as it has 240MB of db-storage in it&#8217;s free plan &#8211; it is also pretty easy to integrate and as far as i know there is no limited in throughput. However I decided to go with AWS as they really make it easy for you providing and SDK for pretty much any language and having a very good documentation. Even though I already found one thing, that was bugging me: All Number-Values of DynamoDB are stored as <bignumber> &#8211; that caused some problems as <bignumber> does not have all the implementations that i needed, so whenever I read from Dynamo I have to convert the <bignumber>.to_i to Integer in order to write it correctly to Redis. I have been thinking about switching to MongoDB quite a bit already.</bignumber></bignumber></bignumber></p>
<p><strong>2. Redis (Redis To Go)</strong></p>
<hr />
<p><a href="http://redis.io/" target="_blank">Redis </a>is a Key-Value-Storage, that sits in the RAM. It has an extremly low latency and can story all primary datastructures: Strings, Lists, Sets, Hashes</p>
<p>I use this in ZeroPilot for the data of users, that are currently online, as there is basically no limit in throughput in all the plans of <a href="https://addons.heroku.com/redistogo" target="_blank">Redis To Go</a>&nbsp;this is the perfect solution, since online players are making requests all the time, when starting a game, when finishing a game ect. However, since Redis sits on the RAM, storage is expensive, and that&#8217;s why the free Plan only includes 5MB. For 5$ / month you can get 20MB of storage, which is enough for about 4200 players being online at the same time, unfortunately i&#8217;m FAR away from that <img src="http://indiegamr.com/wp-includes/images/smilies/icon_wink.gif" alt=";-)" class="wp-smiley" /></p>
<p><strong>3. Heroku</strong></p>
<hr />
<p><a href="http://www.heroku.com/" target="_blank">Heroku </a>is awesome! Why?</p>
<ul>
<li>there is a pretty extensive FREE plan</li>
<li>you can run pretty much any language</li>
<li>it has integration with A LOT of <a href="https://addons.heroku.com/" target="_blank">addons</a></li>
<li>you scale up the capacity of your plan at any time</li>
<li>automatically adds a template for your new app if you want</li>
</ul>
<p><strong>4. Facebook Score API</strong></p>
<hr />
<p>The <a href="https://developers.facebook.com/docs/score/" target="_blank">facebook score api&nbsp;</a>is the smallest part, it&#8217;s not really needed but takes a few queries of my back. So when a user gets a new highscore, it is sent to facebook, and stored there. &nbsp;And when a player logs on, instead of querying the current scores from DynamoDB the scores are queried from facebook.</p>
<p>I hope this helps you finding YOUR &#8220;perfect&#8221; solution. Here are all the links again:</p>
<ul>
<li>Heroku:&nbsp;<a href="http://www.heroku.com/" target="_blank">http://www.heroku.com/</a></li>
<li>AWS DynamoDB:&nbsp;<a href="http://aws.amazon.com/dynamodb/" target="_blank">http://aws.amazon.com/dynamodb/</a></li>
<li>Redis:&nbsp;<a href="http://redis.io/" target="_blank">http://redis.io/</a></li>
<li>Redis To Go:&nbsp;<a href="https://addons.heroku.com/redistogo" target="_blank">https://addons.heroku.com/redistogo</a></li>
<li>MongoDB&nbsp;<a href="http://www.mongodb.org/" target="_blank">http://www.mongodb.org/</a></li>
<li>MongoLab:&nbsp;<a href="https://mongolab.com/home" target="_blank">https://mongolab.com/home</a></li>
<li>Facebook Score API:&nbsp;<a href="https://developers.facebook.com/docs/score/" target="_blank">https://developers.facebook.com/docs/score/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://indiegamr.com/how-to-get-free-production-level-hosting-for-your-app/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
