<?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>The Cubeia Blog &#187; firebase</title>
	<atom:link href="http:///index.php/blog/archives/category/firebase/feed" rel="self" type="application/rss+xml" />
	<link>http://www.cubeia.com/index.php/blog</link>
	<description>Tech Lust and Lust of Words</description>
	<lastBuildDate>Tue, 07 Feb 2012 13:06:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WebSocket Performance</title>
		<link>http://www.cubeia.com/index.php/blog/archives/328</link>
		<comments>http://www.cubeia.com/index.php/blog/archives/328#comments</comments>
		<pubDate>Tue, 07 Feb 2012 13:06:43 +0000</pubDate>
		<dc:creator>larsan</dc:creator>
				<category><![CDATA[firebase]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[WebSocket]]></category>

		<guid isPermaLink="false">http://www.cubeia.com/index.php/blog/archives/328</guid>
		<description><![CDATA[We&#8217;re closing in on Firebase 1.8 and the question everyone want to know the answer to: is it smoking? is it hot? And now we have an answer, read on for you performance test fix: Firebase 1.8 Web Socket Performance. 
]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re closing in on Firebase 1.8 and the question everyone want to know the answer to: is it smoking? is it hot? And now we have an answer, read on for you performance test fix: <a href="http://www.cubeia.com/index.php/articles/122-websocket-performance">Firebase 1.8 Web Socket Performance</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.cubeia.com/index.php/blog/archives/328/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Warmer!</title>
		<link>http://www.cubeia.com/index.php/blog/archives/322</link>
		<comments>http://www.cubeia.com/index.php/blog/archives/322#comments</comments>
		<pubDate>Wed, 18 Jan 2012 10:13:04 +0000</pubDate>
		<dc:creator>larsan</dc:creator>
				<category><![CDATA[firebase]]></category>
		<category><![CDATA[Comet]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[WebSocket]]></category>

		<guid isPermaLink="false">http://www.cubeia.com/index.php/blog/archives/322</guid>
		<description><![CDATA[You want to write HTML5 games? And support Flash clients? And desktop clients? Well, Firebase can now do it all for you: We&#8217;ve released an RC on Firebase 1.8-CE which adds WebSocket and HTTP/Comet support. Hit the forum for more information.
]]></description>
			<content:encoded><![CDATA[<p>You want to write HTML5 games? And support Flash clients? And desktop clients? Well, Firebase can now do it all for you: We&#8217;ve released an RC on Firebase 1.8-CE which adds WebSocket and HTTP/Comet support. Hit <a href="http://www.cubeia.org/index.php/component/kunena/5-general-topics/439-release-candidate-firebase-18-ce-rc2">the forum</a> for more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cubeia.com/index.php/blog/archives/322/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing with HTML5 and WebSockets</title>
		<link>http://www.cubeia.com/index.php/blog/archives/293</link>
		<comments>http://www.cubeia.com/index.php/blog/archives/293#comments</comments>
		<pubDate>Thu, 20 Oct 2011 19:05:28 +0000</pubDate>
		<dc:creator>fredrik</dc:creator>
				<category><![CDATA[firebase]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[WebSocket]]></category>

		<guid isPermaLink="false">http://www.cubeia.com/index.php/blog/archives/293</guid>
		<description><![CDATA[We have been looking at implementing support for HTTP and HTML5 WebSockets in Firebase in the next version to better support Javascript and the emerging HTML5 standards. Read more to see a short update on the status as well as an example of a use case against the latest version.
 

.
Current State
The nightly build of [...]]]></description>
			<content:encoded><![CDATA[<p>We have been looking at implementing support for HTTP and HTML5 WebSockets in Firebase in the next version to better support Javascript and the emerging HTML5 standards. Read more to see a short update on the status as well as an example of a use case against the latest version.</p>
<p style="text-align: center;"><a href="http://www.cubeia.com/administrator/images/stories/logo/firebase.png"><img style="border: 0px initial initial;" src="/images/stories/logo/firebase.png" border="0" alt="" width="195" height="88" /></a> <img title="HTML5" src="http://www.robotsociety.com/HTML5.png" alt="HTML5" width="108" height="108" /><img class="alignnone" src="http://www.w3resource.com/JSON/JSON.gif" alt="" width="115" height="71" /></p>
<p><span id="more-293"></span></p>
<p>.</p>
<h1><span style="font-weight: normal;">Current State</span></h1>
<p>The nightly build of Firebase now supports;</p>
<ul>
<li><a style="color: #1b57b1; text-decoration: none;" href="http://en.wikipedia.org/wiki/Comet_(programming)">Comet-style</a> HTTP support.</li>
</ul>
<ul>
<li><a style="color: #1b57b1; text-decoration: none;" href="http://en.wikipedia.org/wiki/WebSocket">WebSocket</a> HTTP support.</li>
</ul>
<p>The support for HTTP traffic is disabled by default but can currently be enabled and directed to a port by setting the following in cluster.props</p>
<pre style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;">node.client.enable-http-server=true</pre>
<p>And the following in server.props</p>
<pre style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;">web-client-bind-address=0.0.0.0\:8080</pre>
<p>The Firebase protocol will be converted to JSON when using the HTTP support to better support JavaScript development. WebSockets are fairly straight forward, the client can send JSON messages and the server will push JSON messages to the client. However, regular HTTP is a bit more tricky: GET is used to poll and POST to send messages, but you need to have a HTTP-session (JSESSIONID). This means that if the first request from the server is a GET then the server will return immediately with a &#8220;Set-Cookie&#8221; header instead of a poll.</p>
<p>WebSockets and HTTP are served on the same port but under the following paths:</p>
<pre style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;">/http
/socket</pre>
<p><em><strong>NOTE:</strong> The implementation is still in flux and the information given above may very well change as we get closer to a proper release.</em></p>
<h2>Usage Example</h2>
<p>On to the fun stuff! Here I will show you an example of how it works in practice and how would you implement a simple login using nothing but JavaScript HTML5 and WebSocket.</p>
<p>Opening a WebSocket to Firebase is very simple, all you have to do is point it towards the right URL and port.</p>
<pre style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;">var socket = new WebSocket(<span style="color: #000080;">"ws://localhost:8080/socket"</span>);</pre>
<p>Note the ws:// protocol which specifies WebSocket for the communication.</p>
<p>To send a login request we just call socket.send(&#8230;) with the JSON equivalent of the LoginRequestPacket as specified in the Firebase protocol. Note that in the current JSON implementation of the Firebase protocol you need to add classId to specify the type and then place the payload in a data-field.</p>
<pre style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;">socket.send('<span style="color: #000080;">{"classId":10,"user":"Foo","password":"123","operatorId":"1"}</span>');</pre>
<p>Password needs to be, as always in the default mock login handler, integers.</p>
<p>The socket object has different callbacks, to listen for incoming messages we implement onMessage and check for login responses. To get the message payload, i.e. Firebase messages, we must access the data field.</p>
<pre style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;">socket.onmessage = function(msg){
    var loginResponse = jQuery.parseJSON(msg)[0];
    if (loginResponse.classId == 11) {
       alert("Login "+loginResponse.data.status);
    }
};</pre>
<p>Those are the basics of the WebSockets communication. I have deployed a more complete source code for trying logins here - <a style="color: #1b57b1; text-decoration: none;" href="http://www.robotsociety.com/jslogin/login.html">http://www.robotsociety.com/jslogin/login.html</a> . You will need a local Firebase running on the default port of 8080 to try it out. To see the full source code you can browse the source files for the example directly here: <a style="color: #1b57b1; text-decoration: none;" href="http://www.robotsociety.com/jslogin/">http://www.robotsociety.com/jslogin/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cubeia.com/index.php/blog/archives/293/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Handle Client Reconnects</title>
		<link>http://www.cubeia.com/index.php/blog/archives/286</link>
		<comments>http://www.cubeia.com/index.php/blog/archives/286#comments</comments>
		<pubDate>Fri, 23 Sep 2011 12:10:56 +0000</pubDate>
		<dc:creator>larsan</dc:creator>
				<category><![CDATA[firebase]]></category>
		<category><![CDATA[disconnect]]></category>
		<category><![CDATA[idempotency]]></category>

		<guid isPermaLink="false">http://www.cubeia.com/index.php/blog/archives/286</guid>
		<description><![CDATA[Cubeia Firebase comes with a very good High Availability support  right out from the box: a Firebase cluster aren&#8217;t supposed to drop any  events at all within reasonable, pragmatic, boundaries. For reference,  our release testing is loading a cluster with 1000 events per second  when testing fail-over. This corresponds to at [...]]]></description>
			<content:encoded><![CDATA[<p>Cubeia Firebase comes with a very good High Availability support  right out from the box: a Firebase cluster aren&#8217;t supposed to drop any  events at all within reasonable, pragmatic, boundaries. For reference,  our release testing is loading a cluster with 1000 events per second  when testing fail-over. This corresponds to <em>at least</em> 20 000 poker players (depending on player speed), so it should be pretty safe even for you.</p>
<p><strong>The Problem</strong><br />
Internally Firebase replicates events and state to minimize the risk of  data loss, however, there is one instance where this is particular hard,  and that is between the clients and the server. And here&#8217;s why:</p>
<p style="padding-left: 30px;"><em>Because  Firebase is not one-to-one when mapping incoming events to players, but  rather one-to-many we have chosen to not extend the transaction  boundaries to the clients themselves as this would be extremely costly. </em></p>
<p>This means that if a client looses its TCP connection unexpectedly,  there may be messages lost. This might come about from several  scenarios, for example:</p>
<ul>
<li>A client role node in the Firebase cluster crashes. This will  normally disconnect all players from the node, and upon reconnection  they will be load balanced to another server.</li>
<li>The client application crashes. When opened again, the client will reconnect to the Firebase cluster.</li>
<li>A glitch in the routing between the client and the server disconnects the client.</li>
</ul>
<p>In any of the cases we&#8217;ll look at today, the client will be able to realize it has lost the connection and reconnect.</p>
<p><strong>Preconditions</strong><br />
The only thing that is really necessary to start handling reconnects gracefully is for the client to <em>recognise</em> it is reconnecting. If it is handled in-process this should be trivial,  and when a client starts it may look to a cookie or a saved state to  see if it was closed correctly, ie. a &#8220;dirty state&#8221; flag.</p>
<p>Also, you need to mark crucial events with ID:s and optionally a flag  which can tell you if an event is &#8220;resent&#8221; (more on this below), and  also make sure such events have corresponding answers from the server.  Remember that Firebase is an asynchronous system, so you&#8217;ll send a  critical event, then <em>some time later</em>, you will get an answer, hence the importance of an event ID.</p>
<p>And what events are &#8220;critical&#8221;? It&#8217;s up to you really, but probably  those that can significantly alter the outcome of the game. The events  that you <em>really </em>don&#8217;t want to get lost. But the key word is  &#8220;significantly&#8221;, you probably don&#8217;t want to enforce a  call/response-pattern on all events in all games. In gambling most  events such as bet, call, fold etc are significant, whereas in a social  shooter perhaps very few are.</p>
<p><strong>Idempotency to the Rescue</strong><br />
In event processing idempotency is usually meant as the ability to  resend events without changing the initial outcome more than once. In an  idempotent system, if event X is sent ten times, only the first  received will be executed upon, the rest will be ignored. For Firebase  this means that the client should be able to send a critical event  several times and the server will simply respond <em>as if</em> the event is executed if it is already acted upon.</p>
<p>Let&#8217;s break it down:</p>
<ul>
<li>The client must keep a back log of sent &#8220;critical&#8221; events which it  has yet to receive answers to. So for each critical event it will save  an ID in a map together with the entire event, and for each response to a  critical event the ID will be removed from the map. If the client is  not awaiting any response the map will be empty.</li>
<li>When a reconnection occur, the client should check if the above map is empty, if not any event therein <em>may</em> theoretically have been dropped. Each event in the map should be  resent, optionally with a flag detailing that this is indeed a resent  event.</li>
<li>The server should keep a map of ID to response objects for a  reasonable amount of time, or be able to calculate a response without  changing the internal state. So if it receives an event which it has  already executed upon, it should recalculate the response, or fetch the  response from a map.</li>
</ul>
<p><strong>Example: Load Test<br />
</strong>The load test we&#8217;re using internally is very simple: Each client  sends a sequence of integers and the server simply echoes the integers  right back. So the client may send &#8220;5&#8243; and will wait for the server to  send &#8220;5&#8243; back. It then waits for X milliseconds before increasing the  sequence to &#8220;6&#8243; and repeat. This simple game allows us not only to  determine the exact load at any given time (ie. events per second) but  also verify that Firebase honours its FIFO behaviour.</p>
<p>So the client will keep a queue of integers it expects the server to  respond to, and it also has an integer sequence to create new events  from. The queue of integers acts as the client side map: if it is empty  there&#8217;s no response outstanding. On reconnect the client checks the  queue and resends any integers found in it. The server simply echoes the  integers back to the client, but also checks that the sequence is  intact (again checking FIFO ordering) <em>except</em> for the case of reconnects when the sequence is allowed to jump back a few steps.</p>
<p><strong>Finally</strong><br />
Hopefully this should have straightened out a few  questions. Keeping strict idempotency in any system is tricky, but it  will give you a very robust platform, and paired off with Firebase will  be damn near bullet-proof!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cubeia.com/index.php/blog/archives/286/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firbease Guice Support Patched</title>
		<link>http://www.cubeia.com/index.php/blog/archives/283</link>
		<comments>http://www.cubeia.com/index.php/blog/archives/283#comments</comments>
		<pubDate>Wed, 14 Sep 2011 12:20:47 +0000</pubDate>
		<dc:creator>larsan</dc:creator>
				<category><![CDATA[firebase]]></category>
		<category><![CDATA[guice]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://www.cubeia.com/index.php/blog/archives/283</guid>
		<description><![CDATA[We&#8217;ve just patched the Firebase Guice Support to 1.1.1. This patch contains a single bug fix: If you configure your game to use a table listener, this listener needed also to be a tournament table listener previously. But no more!
The new version is available on the Firebase download page.
]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve just patched the <a href="http://www.cubeia.org/wiki/index.php/Dev/guice">Firebase Guice Support</a> to 1.1.1. This patch contains a single bug fix: If you configure your game to use a table listener, this listener needed also to be a <em>tournament</em> table listener previously. But no more!</p>
<p>The new version is available on the Firebase <a href="http://www.cubeia.org/index.php/firebase/download">download</a> page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cubeia.com/index.php/blog/archives/283/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pedal to the Metal</title>
		<link>http://www.cubeia.com/index.php/blog/archives/277</link>
		<comments>http://www.cubeia.com/index.php/blog/archives/277#comments</comments>
		<pubDate>Tue, 13 Sep 2011 13:39:20 +0000</pubDate>
		<dc:creator>larsan</dc:creator>
				<category><![CDATA[firebase]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[poker]]></category>

		<guid isPermaLink="false">http://www.cubeia.com/index.php/blog/archives/277</guid>
		<description><![CDATA[We&#8217;ve posted a new performance investigation here. In it we&#8217;re looking at how &#8220;singleton&#8221; servers scale up in Firebase 1.7 Enterprise Edition. And the answer: It smokes!

We loaded 40 000 poker players on a 3 node cluster of cheap so called &#8220;pizza boxes&#8221;.
Going from 1 to 2 nodes increased throughput with 50%, and from 2 [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve posted a new performance investigation <a href="http://www.cubeia.com/index.php/articles/115-singleton-scalability">here</a>. In it we&#8217;re looking at how &#8220;singleton&#8221; servers scale up in Firebase 1.7 Enterprise Edition. And the answer: It smokes!</p>
<ul>
<li>We loaded 40 000 poker players on a 3 node cluster of cheap so called &#8220;pizza boxes&#8221;.</li>
<li>Going from 1 to 2 nodes increased throughput with 50%, and from 2 to 3 with an additional 60%.</li>
</ul>
<p>Read the above one more time: 40 000 players on a cluster that today would cost you less than €1500 is astounding! Granted, there no external integrations involved here, but still I think you&#8217;ll agree that it is pretty neat.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cubeia.com/index.php/blog/archives/277/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firebase from Scratch, pt II: Diving In</title>
		<link>http://www.cubeia.com/index.php/blog/archives/271</link>
		<comments>http://www.cubeia.com/index.php/blog/archives/271#comments</comments>
		<pubDate>Mon, 05 Sep 2011 13:55:38 +0000</pubDate>
		<dc:creator>larsan</dc:creator>
				<category><![CDATA[firebase]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.cubeia.com/index.php/blog/archives/271</guid>
		<description><![CDATA[In a series of posts we’ll do “Firebase From Scratch”, an  introduction to Firebase and it’s concepts and ideas. Hopefully, reading  this series should give you a firm grasp of what Firebase is and what  it can do. Parts: 1 &#8211; 2

So, you want to write a multi-player game? And perhaps you&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p><em>In a series of posts we’ll do “Firebase From Scratch”, an  introduction to Firebase and it’s concepts and ideas. Hopefully, reading  this series should give you a firm grasp of what Firebase is and what  it can do. Parts: <a href="http://www.cubeia.com/index.php/blog/archives/261">1</a> &#8211; 2<br />
</em></p>
<p>So, you want to write a multi-player game? And perhaps you&#8217;re considering <a href="http://www.cubeia.com/index.php/products/firebase">Cubeia Firebase</a> as your platform? Then we&#8217;ll take a good look at what you actually <em>need to know</em>, and <em>need to do</em> to get going. We&#8217;re going to keep it short, and then expand on the different items in later posts.</p>
<p><strong>Client Language<br />
</strong>You need a game client, and should decide what language or platform you&#8217;ll be using. If you want to deploy it to the web, perhaps flex would be suitable. If you want a heavier client, you should probably go for C++ or Java. For the rest of these posts we&#8217;ll assume you went the Flex / Flash track, but Firebase <a href="http://www.cubeia.org/index.php/firebase/download">supports</a> Flex and Flash, Java, C++ and C# so it is really your choice!</p>
<p><strong>The Firebase Protocol<br />
</strong>The client API of your choice comes with ready made command objects for a number of actions that are taken care of by Firebase, and that you <em>don&#8217;t</em> have to do yourself! They are taken care of by the platform, and include:</p>
<ul>
<li>login / logout</li>
<li>join / leave game</li>
<li>watch / unwatch game</li>
<li>query / subscribe lobby</li>
<li>send action to game / service</li>
<li>etc&#8230;</li>
</ul>
<p>In most cases, the Firebase commands are request / response. You will, for example, send a &#8220;login&#8221; command to the Firebase servers, and then wait for an answer which will be either a &#8220;yes&#8221; or a &#8220;no&#8221; (we&#8217;ll discuss Firebase and authentication / login later). The &#8220;send action to game&#8221; is how you communicate with <em>your </em>game, which is running <em>inside</em> Firebase, and for more on that, see below.</p>
<p><strong>Your Protocol<br />
</strong>The Firebase protocol takes care of many &#8220;generic&#8221; actions for you, but you will need to have a protocol specific to your game.These are the <em>actions</em> your players can make, such as:</p>
<ul>
<li>fire weapon</li>
<li>move</li>
<li>place bet</li>
<li>do the macarena</li>
<li>etc&#8230;</li>
</ul>
<p>the actions you actually need will be apparent when you start writing your game, but at this point you should figure out what <em>form</em> the commands will take. Firebase will treat your own commands as binary data, that is to say, you can use any format you want. Many will use XML or JSON which are widely supported in all languages. For larger projects though, we&#8217;d recommend you to look at protocol generation schemes such as Google&#8217;s <a href="http://code.google.com/p/protobuf/">Protobuf</a> as it scales better and nicely separates your protocol from your code which is something that becomes important as the game grows in size. You can even use the protocol generation used by Firebase, called <a href="http://www.cubeia.com/index.php/blog/archives/155">Styx</a>; This generator takes a specification in XML and produces serialization factories and command objects in a variety of languages.</p>
<p><strong>Server Language<br />
</strong>The server code is the heart of your game. This is where most decisions will take place, where you keep track of the players, send notifications and much more. Normally all Firebase games are written in Java, but you can also write your server code in a number of <a href="http://www.cubeia.org/wiki/index.php/Dev/script">script languages</a> such as JavaScript or Ruby which is brilliant if you quickly want to prototype a game. Be aware though that the script languages are a bit slower, so if high performance is a must for you, you&#8217;ll have to go the Java route.</p>
<p><strong>Building Server Code</strong><br />
How you build your client code is very much up to you and what IDE you&#8217;re using. But for the server side code we strongly recommend use <a href="http://maven.apache.org/">Apache Maven</a> for building, simply because there&#8217;s some neat plugins and tools already built for you to simplify your life. It is still your choice though and you can use anything from Ant to batch scripts.</p>
<p><strong>Database</strong><br />
You probably want to store results and data somewhere. Firebase will not impose any choice on you and you&#8217;re free to use whatever data storage you like best. Firebase contains build in support for most relations databases, such as MySQL or Oracle, via JDBC and JPA, but you can equally well use column databases or simple text files, the choice is entirely up to you!</p>
<p><strong>Ready. Set. Go!</strong><br />
So download what you need. If you went with the Flex/Java route you will need a Java SDK installed together with Apache Maven. Strictly speaking you don&#8217;t need an IDE, you could use a simple text editor, but normally you will want to install IDE:s such as Eclipse before going on. And with that done you should be ready to dive in head first in the traditional &#8220;<a href="http://www.cubeia.org/wiki/index.php/Tutorials/helloworld">hello world</a>&#8221; tutorial on our wiki. Or if your feeling brave, the &#8220;<a href="http://www.cubeia.org/wiki/index.php/Tutorials/quickstart">quickstart extreme &#8211; not for the faint hearted</a>&#8220;!</p>
<p>Next installment will look closer at the server game itself, its components and functions. Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cubeia.com/index.php/blog/archives/271/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance Rules!</title>
		<link>http://www.cubeia.com/index.php/blog/archives/267</link>
		<comments>http://www.cubeia.com/index.php/blog/archives/267#comments</comments>
		<pubDate>Thu, 25 Aug 2011 08:14:58 +0000</pubDate>
		<dc:creator>larsan</dc:creator>
				<category><![CDATA[firebase]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[poker]]></category>

		<guid isPermaLink="false">http://www.cubeia.com/index.php/blog/archives/267</guid>
		<description><![CDATA[We&#8217;re now finalizing the Firebase Enterprise Edition for a sharp 1.7.0 release, and as a part of the process we&#8217;re running extensive load tests. And you know what? It looks good! A full report is forthcoming, but here&#8217;s a teaser: I&#8217;ve now been running 14000 poker bots, on 3 5 year old dual core machines [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re now finalizing the Firebase Enterprise Edition for a sharp 1.7.0 release, and as a part of the process we&#8217;re running extensive load tests. And you know what? It looks good! A full report is forthcoming, but here&#8217;s a teaser: I&#8217;ve now been running 14000 poker bots, on 3 5 year old dual core machines with limited memory over night without a hiccup and with more than 50% CPU to spare&#8230; Go Firebase! Go!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cubeia.com/index.php/blog/archives/267/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firebase From Scratch: Introduction</title>
		<link>http://www.cubeia.com/index.php/blog/archives/261</link>
		<comments>http://www.cubeia.com/index.php/blog/archives/261#comments</comments>
		<pubDate>Wed, 24 Aug 2011 13:04:50 +0000</pubDate>
		<dc:creator>larsan</dc:creator>
				<category><![CDATA[firebase]]></category>

		<guid isPermaLink="false">http://www.cubeia.com/index.php/blog/archives/261</guid>
		<description><![CDATA[In a series of posts we&#8217;ll do &#8220;Firebase From Scratch&#8221;, an introduction to Firebase and it&#8217;s concepts and ideas. Hopefully, reading this series should give you a firm grasp of what Firebase is and what it can do. This is the first post.

Firebase is a &#8220;game agnostic multi-player server&#8221;, but that might not be entirely [...]]]></description>
			<content:encoded><![CDATA[<p><em>In a series of posts we&#8217;ll do &#8220;Firebase From Scratch&#8221;, an introduction to Firebase and it&#8217;s concepts and ideas. Hopefully, reading this series should give you a firm grasp of what Firebase is and what it can do. This is the first post.<br />
</em></p>
<p>Firebase is a &#8220;game agnostic multi-player server&#8221;, but that might not be entirely easy to parse. So let&#8217;s go backwards: If you want to write a multi-player game, what are the big components you need to worry about before it is done? You need a game client obviously, then a game server, a protocol between the two, and probably a database to store data in. Firebase is here to help you with 2 of those 4 components.</p>
<p>And how, exactly?</p>
<ul>
<li> Your game client, which can be written in almost any language you want, utilizes a Firebase Client API to send and receive messages from the game server. This way you don&#8217;t have to worry about the protocol for each game or player, or addressing in general: Firebase will handle that for you.</li>
<li>You don&#8217;t have to write a game <em>server</em>, you can use Firebase itself as a server, and all you have to do is to write the <em>game. </em>That is to say, you write the code that decides what to do when, for example, player &#8220;adam&#8221; sends a &#8220;bet&#8221; action. In other words, the <em>logic</em> and not the server.</li>
</ul>
<p>Let&#8217;s look at the last bit again. A game server is a complicated beast, it should handle multi-threading, networking, be possible to extend easily, be fast as hell, and hopefully also be fairly simple to work with. And you can certainly write it all yourself, but why bother when Firebase will do it for you? If you write a game in Firebase, you can concentrate on what really matters: the game, not the crud surrounding it. Needless to say, you&#8217;ll be finished much faster that way!</p>
<p>You can write your game client in any language supported by the Firebase Client API. At the moment this means C/C++, C#, Flash/Flex and Java, but Objective-C is on the way. For the server side game your a bit more restricted and your main choice should be Java, but we&#8217;re also supporting a number of script languages such as JavaScript, Ruby or Groovy.</p>
<p>With me still? Fine, next we&#8217;ll look at what you actually need <em>to do</em>, a kind of head-first crash course if you like. Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cubeia.com/index.php/blog/archives/261/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s up with Cubeia Poker?</title>
		<link>http://www.cubeia.com/index.php/blog/archives/259</link>
		<comments>http://www.cubeia.com/index.php/blog/archives/259#comments</comments>
		<pubDate>Tue, 23 Aug 2011 09:16:34 +0000</pubDate>
		<dc:creator>larsan</dc:creator>
				<category><![CDATA[cubeia]]></category>
		<category><![CDATA[firebase]]></category>

		<guid isPermaLink="false">http://www.cubeia.com/index.php/blog/archives/259</guid>
		<description><![CDATA[Observant visitors have noticed that on our Community site there mentions of a Cubeia Poker. It is indeed a poker implementation we started a few years back to have a demonstration game. It&#8217;s been developed on and off since then and stands at the famous 75% done. But now, thanks to a collaboration with our [...]]]></description>
			<content:encoded><![CDATA[<p>Observant visitors have noticed that on our Community site there mentions of a Cubeia Poker. It is indeed a poker implementation we started a few years back to have a demonstration game. It&#8217;s been developed on and off since then and stands at the famous 75% done. But now, thanks to a collaboration with our customer <a href="http://www.jadestone.se/">Jadestone AB</a> it&#8217;s under active development again!</p>
<p>The source code is available under an AGPL license and there&#8217;s even a small demo to download. Even though it is early days still and the poker is not yet an &#8220;official&#8221; Cubeia product, you can hit the <a href="http://www.cubeia.org/index.php/component/kunena/16-general-topics/346-questions-and-answers">forums</a> at our community site to ask questions. See you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cubeia.com/index.php/blog/archives/259/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

