<?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>Chris Chabot - chabotc.com &#187; shindig</title>
	<atom:link href="http://www.chabotc.com/category/shindig/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chabotc.com</link>
	<description>Random storms of thoughts</description>
	<lastBuildDate>Thu, 07 Jan 2010 14:55:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Speaking about the social web at the Kings Of Code conference June 30th</title>
		<link>http://www.chabotc.com/php/speaking-about-the-social-web-at-the-kings-of-code-conference-june-30th/</link>
		<comments>http://www.chabotc.com/php/speaking-about-the-social-web-at-the-kings-of-code-conference-june-30th/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 10:19:29 +0000</pubDate>
		<dc:creator>chabotc</dc:creator>
				<category><![CDATA[OpenSocial]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[partuza]]></category>
		<category><![CDATA[shindig]]></category>
		<category><![CDATA[social]]></category>

		<guid isPermaLink="false">http://www.chabotc.com/?p=206</guid>
		<description><![CDATA[
It&#8217;s not often I get to speak at a conference in my home country, The Netherlands, we just don&#8217;t have that many of them! So you can imagine I&#8217;m quite thrilled to be speaking at the Kings Of Code in Amsterdam June 30th. I&#8217;ll be covering the what the social web means, how OpenSocial can [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a title="Kings of Code 2009" href="http://www.kingsofcode.nl/" target="_blank"><img class="aligncenter" src="http://www.kingsofcode.nl/img_new/header_logo.png" alt="Kings Of Code 2009" /></a></p>
<p style="text-align: left;">It&#8217;s not often I get to speak at a conference in my home country, The Netherlands, we just don&#8217;t have that many of them! So you can imagine I&#8217;m quite thrilled to be speaking at the<a href="http://www.kingsofcode.nl/" target="_blank"> Kings Of Code</a> in Amsterdam June 30th. I&#8217;ll be covering the what the social web means, how OpenSocial can be used in this context, and touch on the various development methods like gadgets, REST API&#8217;s, Friend Connect and oh, I&#8217;ll cover Shindig too of course.</p>
<p>So if you&#8217;re in Amsterdam June 30th, I hope to see you there!</p>
<p>Update: Here&#8217;s the slides of the presentation</p>
<p><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" title="The Open &amp; Social Web - Kings of Code 2009" href="http://www.slideshare.net/chabotc/the-open-social-web-kings-of-code-2009"></a><object width="425" height="355" data="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=kingsofcode2009-090710161905-phpapp02&amp;stripped_title=the-open-social-web-kings-of-code-2009" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=kingsofcode2009-090710161905-phpapp02&amp;stripped_title=the-open-social-web-kings-of-code-2009" /><param name="allowfullscreen" value="true" /></object></p>
<div id="__ss_1706924" style="width: 425px; text-align: left;">
<div style="font-size: 11px; font-family: tahoma,arial; height: 26px; padding-top: 2px;"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.chabotc.com/php/speaking-about-the-social-web-at-the-kings-of-code-conference-june-30th/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Shindig in a non PHP or Java environment</title>
		<link>http://www.chabotc.com/generic/using-shindig-in-a-non-php-or-java-envirionment/</link>
		<comments>http://www.chabotc.com/generic/using-shindig-in-a-non-php-or-java-envirionment/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 10:33:00 +0000</pubDate>
		<dc:creator>chabotc</dc:creator>
				<category><![CDATA[Generic]]></category>
		<category><![CDATA[OpenSocial]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[partuza]]></category>
		<category><![CDATA[shindig]]></category>
		<category><![CDATA[social]]></category>

		<guid isPermaLink="false">http://www.chabotc.com/?p=194</guid>
		<description><![CDATA[So you want to use OpenSocial gadgets on your site, Google FriendConnect isn&#8217;t the right choice for you since you want to leverage your own social graph, but your site isn&#8217;t written in PHP or Java, so how do you use Apache Shindig then?
For this scenario we&#8217;ve created the meta-data interface, it allows you to [...]]]></description>
			<content:encoded><![CDATA[<p>So you want to use OpenSocial gadgets on your site, Google FriendConnect isn&#8217;t the right choice for you since you want to leverage your own social graph, but your site isn&#8217;t written in PHP or Java, so how do you use Apache Shindig then?</p>
<p>For this scenario we&#8217;ve created the meta-data interface, it allows you to post a gadget URL to it, and it will return a JSON structure with all the meta data of the gadget that you can use to build your app gallery, user preferences UI and create the iframe&#8217;s in your site that point to Apache Shindig (which will render the gadget for you). The quickest way to check out how the meta data interface works is by loading up the sample-metadata.html sample, and inspecting the requests using something like firebug, here&#8217;s a live example:<br />
<a href="http://modules.partuza.nl/gadgets/files/container/sample-metadata.html" target="_blank">http://modules.partuza.nl/gadgets/files/container/sample-metadata.html</a></p>
<p>With that you have all the required info to build your site&#8217;s UI, however you also need to create the proper security tokens, and link shindig to your data source:</p>
<p><strong>Security Tokens.</strong></p>
<p>The gadget get&#8217;s it owner id / viewer id / app id / container string / module id from the security token, in a typical production setup this would be an encrypted blob generated by the container (ie &#8216;the social website&#8217;), and put on the gadget&#8217;s iframe with a &amp;st=&lt;encrypted blob&gt;. Encryption ensures that that data can&#8217;t be tampered with so that people can&#8217;t spoof their user id&#8217;s etc.</p>
<p>Now both java and php shindig both use the same methodigy to generate their tokens (see shindig/php/src/common/{BasicBlobCrypter,BasicSecurityToken,BasicSecurityTokenDecoder}.php for example), so you really have two options, either implement the same crypto logic / format (it&#8217;s basically a text string, with entries seperated by :&#8217;s, and aes128 encryption with a shared secret) in your language of choice, or create your own crypto and implement a PHP class that can decrypt it (and tell shindig to use that new class using the &#8216;<em>security_token_signer</em>&#8216; and &#8216;<em>security_token</em>&#8216; configuration keys, similar configuration can be found in java shindig in one of it&#8217;s .xml config files), The first option is probably the simplest solution as long as aes128 is available in your language of choice.</p>
<p>There&#8217;s a bit more information about how security tokens work and how to implement them in this blog post:<br />
<a href="http://www.chabotc.com/partuza/about-partuza-and-shindig-security-tokens/" target="_blank">http://www.chabotc.com/partuza/about-partuza-and-shindig-security-tokens/<br />
</a></p>
<p><strong>Social Data.</strong></p>
<p>Now java and php differ slightly here, with php you use the same configuration as I mentioned above to tell shindig which classes to use, and with java you&#8217;d use Guice to inject the right classes, but the basics are the same: You&#8217;ll need to somehow get the social data requests that happen in shindig to your data back-end.</p>
<p>Now when you are running php or java already this is pretty simple since you can use that code directly, however in this situation you really have two choices, either you implement the DB logic in PHP or Java (for PHP, you can use Partuza&#8217;s (an example opensocial implementation) service implementation as example: http://code.google.com/p/partuza/source/browse/trunk/Shindig/PartuzaService.php and http://code.google.com/p/partuza/source/browse/trunk/Shindig/PartuzaDbFetcher.php), or you can implement an RPC method (using something like json-rpc) where shindig relays all social data calls to your back-end.</p>
<p>OpenSocial and thus Shindig has 4 data call types, People, Activities, AppData and Messages; Now the spec states that the only must-have of those is the People interface, and you could return a NOT_IMPLEMENTED error code on every other call type.. However if you want to run the typical OpenSocial app, it&#8217;s advisable to also support the Activities and AppData interfaces.. Messages is a nice to have, but in practice most social sites don&#8217;t support this so it&#8217;s not a big issue at all if you don&#8217;t.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chabotc.com/generic/using-shindig-in-a-non-php-or-java-envirionment/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting the most performance out of PHP Shindig</title>
		<link>http://www.chabotc.com/linux/getting-the-most-performance-out-of-php-shindig/</link>
		<comments>http://www.chabotc.com/linux/getting-the-most-performance-out-of-php-shindig/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 13:05:03 +0000</pubDate>
		<dc:creator>chabotc</dc:creator>
				<category><![CDATA[FriendConnect]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenSocial]]></category>
		<category><![CDATA[shindig]]></category>

		<guid isPermaLink="false">http://www.chabotc.com/?p=185</guid>
		<description><![CDATA[If your using or planning to use php-shindig in production, your probably wondering what knobs can be twiddled to get the highest possible performance out of it; So here&#8217;s some tips on how to make it go just that bit faster.
The first thing to look at is the general PHP performance on your server. Out [...]]]></description>
			<content:encoded><![CDATA[<p>If your using or planning to use php-shindig in production, your probably wondering what knobs can be twiddled to get the highest possible performance out of it; So here&#8217;s some tips on how to make it go just that bit faster.</p>
<p>The first thing to look at is the general PHP performance on your server. Out of the box PHP is very poorly equipped for high traffic websites, and chances are you already have a few of these optimizations in place, combined these tricks will more then double the performance of your shindig deployment.</p>
<p>To be able to give some semi-meaningful measurements I&#8217;ll be using the QPS (queries per second) of how fast php-shindig can render the OpenSocial Dev App (OSDA) on my workstation, which has a single Quad Core 2 Duo @ 3Ghz and a single SATA II disk, so a standard of the rack server should be able to do a bit better then the results I&#8217;m getting here. The base line of a plain outo-of-the-box php and shindig configuration is ~ 210 QPS.</p>
<p><strong>Opcode Cache</strong></p>
<p>Perhaps the most important tip for php performance is to install an opcode cache.. PHP is still an interpreted language, and that means that in it&#8217;s default configuration, on every page hit, it will read your PHP code and interpret it into opcodes. An op(eration)code is the instruction that the Zend engine actually performs, and this constantly interpreting will take most of your server&#8217;s resources! The solution is to install an opcode cache that caches these compiled instructions in memory, so that your webserver can focus on actually executing the code. My personal favorite is the <a title="APC" href="http://pecl.php.net/package/APC" target="_blank">Alternative PHP Cache (APC)</a></p>
<p>Using APC the QPS on my workstation goes from 210 to 385, a pretty impressive performance increase!</p>
<p><strong>PHP FatMM</strong></p>
<p>The next tip is to use the<a title="php-fatmm" href="http://tekrat.com/php/php-fatmm/" target="_blank"> php-fatmm</a> patch, the fat memory manager patch changes the way that the PHP engine allocates memory, instead of (de/)allocating memory on the fly it will pre-allocate a configured amount of memory, and only if that runs out will it allocate more; The end result is that it can save PHP having to do thousands of alloc()&#8217;s, which means it can spend more time doing useful stuff <img src='http://www.chabotc.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  This does mean your server process will use more memory, and I wouldn&#8217;t advice to use this on a server that also serves static content or very simple php scripts, but for a server that is dedicated to php-shindig, this is just what the doctor ordered.</p>
<p>Re-benchmarking our OSDA rendering using both APC and php-fatmm brings us to 410 QPS, while not as earth-shattering as APC, still a very nice improvement!</p>
<p><strong>Disk IO &#8211; Caching back-ends to use</strong></p>
<p>Now with the basic PHP bottle-necks out of the way, lets focus on the other thing that will bring a server to it&#8217;s knees: Disk IO. Harddisks are the slowest component in your server and having a lot of reads and writes happening will cause your CPU&#8217;s just just spin idly in their sockets waiting for data to appear.</p>
<p>The highest impact change here is to go from a disk based cache in php-shindig (the CacheFile class which is the default configured cache back-end since it works on every platform/configuration) to a memory based caching class. Now there&#8217;s two distinct types of cached information in php-shindig, the one is the &#8216;feature_cache&#8217;, where it stores the processed (and if configured, minimized) feature information.. parsing hundreds of little xml and javascript files is a very expensive operation so caching this adds a lot to the efficiency of php-shindig. The other cache type is the general &#8216;data_cache&#8217;, which is used to cache all remote resources such as the gadget xml files, message bundles, all proxied files, etc.</p>
<p>The features information doesn&#8217;t take so much space to store, and as such using a close-to-home cache for the feature_cache like the CacheApc class is the best solution, The data cache on the other hand will hold  many thousands of files, so will be considerably larger to store.. as such using a shared cache between your shindig servers is much more efficient, so using CacheMemcache is the optimum solutions there. So by changing the following bits:</p>
<p><code> 'data_cache' =&gt; 'CacheMemcache',<br />
'feature_cache' =&gt; 'CacheApc',<br />
</code></p>
<p>and rerunning the benchmark brings the total QPS to 435.</p>
<p><strong>Disk IO &#8211; PHP Shindig configuration</strong></p>
<p>The last bit of tweaking we can do is to disable the file checking, php-shindig has been coded to fail gracefully and check everything rigorously however that does cause some extra disk IO, however as long you feel certain you won&#8217;t go and delete files from your production systems, it&#8217;s pretty safe to turn this off, this is done by setting &#8216;check_file_exists&#8217; to false in the configuration. We can also save some disk IO by changing the relative-path-resolution in the configuration to absolute paths, so change any paths like &#8220;realpath(dirname(__FILE__) . &#8216;/..&#8217;) . &#8216;/&#8217;&#8221; to their actual locations (like &#8220;/var/www/html/shindig/&#8221;). And setting &#8216;debug&#8217; to false removes the last few of these checks. So in the configuration we set:</p>
<p><code> 'debug' =&gt; false,<br />
'check_file_exists' =&gt; false,<br />
'base_path' =&gt; '/var/www/html/shindig/',<br />
'features_path' =&gt; '/var/www/html/shindig/features',<br />
'container_path' =&gt; '/var/www/html/shindig/config',<br />
'javascript_path' =&gt; '/var/www/html/shindig/javascript',<br />
'private_key_file' =&gt; '/var/www/html/shindig/php/certs/private.key',<br />
'public_key_file' =&gt; '/var/www/html/shindig/certs/public.crt',</code></p>
<p><strong>Conclusion</strong></p>
<p>With all these measures in place, the benchmark now shows us doing some 450 QPS, more then doubling the 210 QPS we started out with, quite a satisfying result if you consider this means we end up transferring more then 45 megabyte/sec over the network at that point.</p>
<p>Now for the real speed freaks, all these results are based on the 1.0.x release tree from the svn repo, which is what you should be using since the trunk is seeing heavy development for the upcoming 0.9 changes, however the trunk has a re-factored gadget renderer that is a ~ 20-30% faster then the current release, so more performance goodness will be coming your way once the trunk stabilizes and becomes release ready.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chabotc.com/linux/getting-the-most-performance-out-of-php-shindig/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GDD08 Russia &#124; Open Social (Russian)</title>
		<link>http://www.chabotc.com/generic/gdd08-russia-open-social-chris-chabot-russian/</link>
		<comments>http://www.chabotc.com/generic/gdd08-russia-open-social-chris-chabot-russian/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 14:10:09 +0000</pubDate>
		<dc:creator>chabotc</dc:creator>
				<category><![CDATA[Generic]]></category>
		<category><![CDATA[OpenSocial]]></category>
		<category><![CDATA[partuza]]></category>
		<category><![CDATA[shindig]]></category>
		<category><![CDATA[social]]></category>

		<guid isPermaLink="false">http://www.chabotc.com/?p=112</guid>
		<description><![CDATA[Want to know more about OpenSocial, how to write an OpenSocial application or use Shindig to support OpenSocial on your site, but your preferred language is Russian? Then this video is for you

The 2008 Moscow GDD in numbers:
400+ attendees
30Mbit/s peak Internet traffic, which survived massive downloads of Windows security update released that morning by Microsoft
34mÂ² [...]]]></description>
			<content:encoded><![CDATA[<p>Want to know more about OpenSocial, how to write an OpenSocial application or use Shindig to support OpenSocial on your site, but your preferred language is Russian? Then this video is for you</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/tNbuUCIHvws&amp;hl=en&amp;fs=1" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/tNbuUCIHvws&amp;hl=en&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>The 2008 Moscow GDD in numbers:</p>
<div style="margin-top: 0px; margin-bottom: 0px;">400+ attendees</div>
<div style="margin-top: 0px; margin-bottom: 0px;">30Mbit/s peak Internet traffic, which survived massive downloads of Windows security update released that morning by Microsoft</div>
<div style="margin-top: 0px; margin-bottom: 0px;">34mÂ² of projection area (7 screens)</div>
<div style="margin-top: 0px; margin-bottom: 0px;">864 power outlets available throughout the venue</div>
<div style="margin-top: 0px; margin-bottom: 0px;">50+ blog posts published within 3 days after the event</div>
<div style="margin-top: 0px; margin-bottom: 0px;">10 third-party developers taking stage</div>
<div style="margin-top: 0px; margin-bottom: 0px;">51 towns in Russia, Ukraine and Estonia represented</div>
<div style="margin-top: 0px; margin-bottom: 0px;">45Gb of data transferred</div>
<div style="margin-top: 0px; margin-bottom: 0px;">2 power outages handled seamlessly by automatic backup grids!</div>
<div style="margin-top: 0px; margin-bottom: 0px;"></div>
<div style="margin-top: 0px; margin-bottom: 0px;">&amp; Already looking forward to next year&#8217;s!</div>
]]></content:encoded>
			<wfw:commentRss>http://www.chabotc.com/generic/gdd08-russia-open-social-chris-chabot-russian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenSocial Session @ GDD 2008 in London</title>
		<link>http://www.chabotc.com/generic/opensocial_gdd2008_london/</link>
		<comments>http://www.chabotc.com/generic/opensocial_gdd2008_london/#comments</comments>
		<pubDate>Sat, 20 Sep 2008 14:56:13 +0000</pubDate>
		<dc:creator>chabotc</dc:creator>
				<category><![CDATA[Generic]]></category>
		<category><![CDATA[OpenSocial]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[partuza]]></category>
		<category><![CDATA[shindig]]></category>
		<category><![CDATA[social]]></category>

		<guid isPermaLink="false">http://www.chabotc.com/?p=103</guid>
		<description><![CDATA[The video of the session with Patrick Chanezon, Chris Chabot (me), Kevin Marks and some of our partners (Hyves, Netlog, Viadeo) @ the Google Developer Day 2008 in London is now up on Youtube.
If you just want to get to the Shindig bit, skip to the 36 min mark  

The London GDD 2008 in [...]]]></description>
			<content:encoded><![CDATA[<p>The video of the session with Patrick Chanezon, Chris Chabot (me), Kevin Marks and some of our partners (Hyves, Netlog, Viadeo) @ the Google Developer Day 2008 in London is now up on Youtube.</p>
<p>If you just want to get to the Shindig bit, skip to the 36 min mark <img src='http://www.chabotc.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="src" value="http://www.youtube.com/v/bo-KEqLwV5A&amp;hl=en&amp;fs=1" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/bo-KEqLwV5A&amp;hl=en&amp;fs=1" allowfullscreen="true"></embed></object></p>
<p>The London GDD 2008 in numbers:</p>
<p>3000 surveys handed out<br />
1800 candy bars eaten (conspiracy theorists united on Twitter&#8230;)<br />
550 developers in attendance (more than 1500 applied)<br />
60 Megabytes of internet (that never crashed and was complimented often)<br />
44 access points for internet installed<br />
24 Google speakers<br />
24 Google volunteers<br />
20 partner speakers (Hyves, Netlog, Rummble, Lastminute.com, ITN, the Met Office &amp; the head of the Android User Group.)<br />
17 hours of content created for <span class="nfakPe">YouTube</span>.<br />
2 giant screens that had powerpoint &amp; code throughout the day, then Wii and Guitar Hero for the party.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chabotc.com/generic/opensocial_gdd2008_london/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
