<?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/"
	>

<channel>
	<title>Caucho Technology</title>
	<atom:link href="http://blog.caucho.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.caucho.com</link>
	<description>Inside info, thoughts, and opinions from Caucho engineers</description>
	<pubDate>Fri, 15 Feb 2013 16:11:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Resin on Raspberry Pi &#8212; JEE comes to the $35 ARM platform!</title>
		<link>http://blog.caucho.com/2013/02/15/resin-on-raspberry-pi-jee-comes-to-the-35-arm-platform/</link>
		<comments>http://blog.caucho.com/2013/02/15/resin-on-raspberry-pi-jee-comes-to-the-35-arm-platform/#comments</comments>
		<pubDate>Fri, 15 Feb 2013 16:09:31 +0000</pubDate>
		<dc:creator>Paul Cowan</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.caucho.com/?p=1167</guid>
		<description><![CDATA[I&#8217;m happy to announce, with the release of Resin 4.0.35, Resin will compile and run on a Raspberry Pi! 
For the uninitiated, Raspberry Pi is a credit-card-sized single-board computer, very popular amongst tinkerers and hobbyists for it&#8217;s ease of use and low cost.  
We&#8217;ve made number of changes in recent releases to allow Resin [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m happy to announce, with the release of Resin 4.0.35, Resin will compile and run on a <a href="http://www.raspberrypi.org/">Raspberry Pi</a>! </p>
<p>For the uninitiated, Raspberry Pi is a credit-card-sized single-board computer, very popular amongst tinkerers and hobbyists for it&#8217;s ease of use and low cost.  </p>
<p>We&#8217;ve made number of changes in recent releases to allow Resin to run on a Raspberry Pi.  These included both Java fixes and compilation of Resin&#8217;s native libraries.  Both Resin Pro and Resin GPL Servlet Container will run with native optimizations enabled on Raspberry Pi.  </p>
<p>More information including minor required configuration change is available on <a href="http://wiki4.caucho.com/Embedded:_Resin_On_Raspberry_Pi">Caucho&#8217;s Resin 4 Wiki: Resi On Raspberry Pi</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.caucho.com/2013/02/15/resin-on-raspberry-pi-jee-comes-to-the-35-arm-platform/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Resin PDF Health Reports</title>
		<link>http://blog.caucho.com/2013/01/02/resin-pdf-health-reports/</link>
		<comments>http://blog.caucho.com/2013/01/02/resin-pdf-health-reports/#comments</comments>
		<pubDate>Wed, 02 Jan 2013 17:12:45 +0000</pubDate>
		<dc:creator>Paul Cowan</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[health]]></category>

		<category><![CDATA[pdf]]></category>

		<category><![CDATA[snapshot]]></category>

		<guid isPermaLink="false">http://blog.caucho.com/?p=1159</guid>
		<description><![CDATA[When attempting to diagnose application errors or performance issues, the single best tool Resin makes available are the Resin PDF Health Reports.  They are also the first things we request when addressing customer support questions.  
Resin can generate two slightly different PDF health reports: Snapshot and Watchdog reports.  A Snapshot Report captures [...]]]></description>
			<content:encoded><![CDATA[<p>When attempting to diagnose application errors or performance issues, the single best tool Resin makes available are the Resin PDF Health Reports.  They are also the first things we request when addressing customer support questions.  </p>
<p>Resin can generate two slightly different PDF health reports: Snapshot and Watchdog reports.  A <strong>Snapshot Report</strong> captures a â€œsnapshotâ€ of Resin at the current point in time.  A <strong>Watchdog Report</strong> aggregates as much information as available about Resin at a â€œpreviousâ€ point in time.  Watchdog reports can also be thought of as a â€œpost-mortemâ€ or â€œrestartâ€ report, as they usually are generated immediately after an unexpected server restart.</p>
<p>Snapshot reports can be <a href="http://www.caucho.com/resin-4.0/admin/resin-admin-command-line.xtp#pdfreportpdfreportgeneration">generated on the command-line</a>:</p>
<div class="codesnip-container" >unix> resinctl pdf-report -local -local-dir /tmp</div>
<p>via <a href="http://www.caucho.com/resin-4.0/admin/resin-admin-rest.xtp#pdfreport">REST</a>: </p>
<div class="codesnip-container" >unix> curl &#8216;http://localhost:8080/resin-rest/pdf-report?snapshot=true&#038;load-pdf=true&#8217; > snapshot.pdf</div>
<p>or via <a href="http://localhost:8080/resin-admin/index.php?q=watchdog&#038;s=0">Resin-Admin on the <strong>PDF Page</strong></a>:</p>
<div class="codesnip-container" >http://localhost:8080/resin-admin/index.php?q=pdf&#038;s=0</div>
<p>Watchdog report are usually generated automatically after any unexpected server restart.  Check your logs directory for Watchdog-*.pdf files.  However you can always regenerate a Watchdog report from <a href="http://localhost:8080/resin-admin/index.php?q=watchdog&#038;s=0">Resin-Admin on the <strong>Watchdog Page</strong></a>:</p>
<div class="codesnip-container" >http://localhost:8080/resin-admin/index.php?q=watchdog&#038;s=0</div>
<p>The <a href="http://youtu.be/ZOaHjwBB9CU?hd=1">Resin Administration Console video on YouTube</a> provides an excellent overview of Resin-Admin and PDF Health Report content.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.caucho.com/2013/01/02/resin-pdf-health-reports/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Quercus, meet PHP 5.4 and shake hands, please</title>
		<link>http://blog.caucho.com/2012/12/29/quercus-meet-php-54-and-shake-hands/</link>
		<comments>http://blog.caucho.com/2012/12/29/quercus-meet-php-54-and-shake-hands/#comments</comments>
		<pubDate>Sun, 30 Dec 2012 01:27:34 +0000</pubDate>
		<dc:creator>nam</dc:creator>
		
		<category><![CDATA[Announcements]]></category>

		<category><![CDATA[Engineering]]></category>

		<category><![CDATA[php 5.4]]></category>

		<category><![CDATA[quercus]]></category>

		<category><![CDATA[traits]]></category>

		<guid isPermaLink="false">http://blog.caucho.com/?p=1125</guid>
		<description><![CDATA[I just extended Quercus to support the new core language features of PHP 5.4.  The changes are currently in our subversion repository and should be in our next release: 4.0.34.  Traits, new in 5.4, was a bit of a pain to implement because of all the weird edge cases (i.e. __CLASS__, insteadof, as). [...]]]></description>
			<content:encoded><![CDATA[<p>I just extended Quercus to support the new core language features of PHP 5.4.  The changes are currently in our subversion repository and should be in our next release: 4.0.34.  Traits, new in 5.4, was a bit of a pain to implement because of all the weird edge cases (i.e. <b>__CLASS__</b>, <b>insteadof</b>, <b>as</b>).  Here&#8217;s a list of what&#8217;s new:</p>
<ul>
<li>traits
<div class="codesnip-container" >
<pre>
&lt;?php

trait T0 {
  function foo()
  {
    echo "inside T0->foo()\n";
  }
}

class A {
  use T0;
}

$a = new A();
$a->foo();

?>
</pre>
</div>
</li>
<p><span id="more-1125"></span></p>
<li>short array syntax
<div class="codesnip-container" >
<pre>
&lt;?php

$a = ["a" => 123, "b" => 456];

?>
</pre>
</div>
</li>
<li>function array dereferencing
<div class="codesnip-container" >
<pre>
&lt;?php

$a[0]();

?>
</pre>
</div>
</li>
<li>$this use in closures
<div class="codesnip-container" >
<pre>
&lt;?php

class A {
  var $foo = 123;

  function test() {
    $fun = function() {
      var_dump($this->foo);
    };

    $fun();
  }
}

$a = new A();
$a->test();

?>
</pre>
</div>
</li>
<li>&lt;?= short open tag is now always on
<div class="codesnip-container" >
<pre>
&lt;?php

  $hello = "hello world";

?>
&lt;b>&lt;?= $hello ?>&lt;/b>
</pre>
</div>
</li>
<li>class member access on instantiation
<div class="codesnip-container" >
<pre>
&lt;?php

class A
{
  function foo()
  {
    echo "inside A->foo()\n";
  }
}

(new A())->foo();

?>
</pre>
</div>
</li>
<li>Class::{expr}() syntax
<div class="codesnip-container" >
<pre>
&lt;?php

class A
{
  static function foo()
  {
    echo "inside A::foo()\n";
  }
}

$name = "foo";
A::{$name}();

?>
</pre>
</div>
</li>
<li>binary number format: 0b001001101
<div class="codesnip-container" >
<pre>
&lt;?php

// int(7)
var_dump(0b111);

?>
</pre>
</div>
</li>
<li>$_SERVER['REQUEST_TIME_FLOAT'] is populated
<div class="codesnip-container" >
<pre>
&lt;?php

// returns a float (i.e. float(1356829982.6495))
var_dump($_SERVER['REQUEST_TIME_FLOAT']);

?>
</pre>
</div>
</li>
</ul>
<p>And for those that are still with me, I&#8217;m aiming to have PHP 5.5 support in our 4.0.35 release :).</p>
<p>&#8211; Nam<br />
<br />Nam Nguyen is a Software Engineer at Caucho Technology in San Diego/San Francisco.  He is currently the lead for the Quercus project.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.caucho.com/2012/12/29/quercus-meet-php-54-and-shake-hands/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Quercus on Google App Engine - 2.0</title>
		<link>http://blog.caucho.com/2012/12/06/quercus-on-google-app-engine-20/</link>
		<comments>http://blog.caucho.com/2012/12/06/quercus-on-google-app-engine-20/#comments</comments>
		<pubDate>Thu, 06 Dec 2012 12:53:25 +0000</pubDate>
		<dc:creator>nam</dc:creator>
		
		<category><![CDATA[Engineering]]></category>

		<category><![CDATA[google app engine]]></category>

		<category><![CDATA[google cloud sql]]></category>

		<category><![CDATA[google cloud storage]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[quercus]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.caucho.com/?p=1100</guid>
		<description><![CDATA[The following article originally appeared on JavaAdvent 2012.
It&#8217;s been a 3.5 years ago to this day since I last wrote about running Quercus on Google App Engine (GAE).Â The article detailed a crazy experiment to get a PHP application, Wordpress,Â running on GAE. I still remember it being a painful experience because of number of changes I [...]]]></description>
			<content:encoded><![CDATA[<p><em>The following article originally appeared on <a title="Java Advent 2012" href="http://www.javaadvent.com/2012/12/quercus-on-google-app-engine-20.html">JavaAdvent 2012</a>.</em></p>
<p>It&#8217;s been a 3.5 years ago to this day since I last wrote about running Quercus on Google App Engine (GAE).Â The <a href="http://blog.caucho.com/2009/05/31/quercus-on-google-app-engine/">article</a> detailed a crazy experiment to get a PHP application, Wordpress,Â running on GAE. I still remember it being a painful experience because of number of changes I had to make to Wordpress to get it working. It was all due to the GAE Java environment being so drastically different from what Java developers were used to. It was heavily sandboxed and had no SQL support. You couldn&#8217;t launch new Threads. You couldn&#8217;t write to the file system. But those were the tradeoffs you had to live with if you wanted to deploy your application to the all-wonderful <em>Cloud</em>.</p>
<p>Fast-forward to 2012 and GAE has come a long way. GAE now allows you to spawn new Threads (currently in beta). You still cannot write to the file system, but for all it&#8217;s worth there is a new GAE Files API that gives you file-like concepts. And you can run your very own MySQL instances on Google&#8217;s infrastructure (albeit Google&#8217;s customized version of MySQL).</p>
<p>What hasn&#8217;t changed over the years is that you&#8217;re still expected to hit major roadblocks as you migrate your existing web applications over to GAE. And you&#8217;ll have to make heavy modifications to your application to 1) make it work and 2) be performant on GAE.</p>
<p>So this is where Quercus comes into theÂ picture. At Caucho, we spent a lot of time getting Quercus to workÂ seamlessly with GAE. Our goal was to abstract the GAE details awayÂ so that developers don&#8217;t have to worry about the fact that theÂ application is running on GAE. Things just work transparently behindÂ the scenes for PHP applications. For example,</p>
<ul>
<li>PHP file_*() functions work just like they do before (including writing to files!)</li>
<li>PHP mysql_*() functions and PDO work just like they do before</li>
</ul>
<p><span id="more-1100"></span></p>
<p>What this means is that we can run <span style="text-decoration: underline;">existing</span> PHP applications on GAE without any modifications! Say hello to &#8220;Wordpress on Google App Engineâ€ 2.0! But first, let&#8217;s start with some formalities.</p>
<h3><span style="text-decoration: underline;">I. Introduction to Quercus</span></h3>
<p>Quercus is Caucho&#8217;s 100% JavaÂ implementation of the PHP language runtime and libraries. Currently,Â Quercus supports PHP 5.3 language features and contains a multitudeÂ of libraries developed in-house including but not limited to apc,Â bcmath, curl, date, dom, filter, gettext, json, mail, mbstring,Â mcrypt, pdf, pdo, postgres, reflection, regexp, spl, zip, and zlib.</p>
<p>Quercus can run as a servlet or on the command line. For our case, we&#8217;re interested in running it as a servlet:</p>
<ol>
<li><a href="http://www.caucho.com/download">Download Resin Java Application Server</a> and it&#8217;ll come with Quercus enabled by default and ready to go.</li>
<li>Uncompress the archive and start up Resin with:
<div class="codesnip-container" >
<pre>    ./bin/resin.sh console</pre>
</div>
</li>
<li>Then create a webapps/ROOT/test.php file with the following contents:
<div class="codesnip-container" >
<pre>&lt;?php

  phpinfo();

?&gt;</pre>
</div>
</li>
<li>Browse to <a href="http://localhost:8080/test.php">http://localhost:8080/test.php</a> and you should see the following:
<p><a href="http://blog.caucho.com/wp-content/uploads/2012/12/quercus_phpinfo1.png"><img src="http://blog.caucho.com/wp-content/uploads/2012/12/quercus_phpinfo1.png" alt="quercus_phpinfo" title="quercus_phpinfo" width="500" height="332" class="aligncenter size-full wp-image-1118" /></a></p>
</li>
</ol>
<p>Congrats! You have PHP running natively on a Java server.</p>
<h3><span style="text-decoration: underline;">II. Running Quercus on Tomcat</span></h3>
<p>Okay, so you want to use Tomcat instead of Resin? No worries.</p>
<ol>
<li>Copy lib/resin.jar from the Resin download above to Tomcat&#8217;s webapps/ROOT/WEB-INF/lib directory.</li>
<li>Add QuercusServlet to Tomcat&#8217;s webapps/ROOT/WEB-INF/web.xml file:
<div class="codesnip-container" >
<pre style="overflow: auto;">&lt;web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5"&gt;
  &lt;servlet&gt;
    &lt;servlet-name&gt;Quercus Servlet&lt;/servlet-name&gt;
    &lt;servlet-class&gt;com.caucho.quercus.servlet.GoogleQuercusServlet&lt;/servlet-class&gt;
    &lt;init-param&gt;
      &lt;param-name&gt;ini-file&lt;/param-name&gt;
      &lt;param-value&gt;WEB-INF/php.ini&lt;/param-value&gt;
    &lt;/init-param&gt;
  &lt;/servlet&gt;

  &lt;servlet-mapping&gt;
    &lt;servlet-name&gt;Quercus Servlet&lt;/servlet-name&gt;
    &lt;url-pattern&gt;*.php&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;

  &lt;welcome-file-list&gt;
    &lt;welcome-file&gt;index.php&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
&lt;/web-app&gt;</pre>
</div>
</li>
</ol>
<p>Quercus should now be handling all php HTTP requests.</p>
<h3><span style="text-decoration: underline;">III. Running Quercus on GAE</span></h3>
<p>Quercus runs on top of the GAE Java SDK, so we configure it just like any other servlet. Before continuing, please read and work through Google&#8217;s <a href="https://developers.google.com/appengine/docs/java/gettingstarted/">GettingÂ Started: Java â€“ Google App Engine</a>.</p>
<ol>
<li>Create a new GAE project by creating the following directories on your local drive:
<div class="codesnip-container" >
<pre>    quercusproject
    quercusproject/src
    quercusproject/war
    quercusproject/war/WEB-INF
    quercusproject/war/WEB-INF/lib</pre>
</div>
</li>
<li>
Copy lib/resin.jar from the Resin download above to quercusproject/war/WEB-INF/lib.  Note: I&#8217;ve created a special pre-release Quercus snapshot just this article.  Please download it <a href="https://github.com/diablonhn/quercus_on_gae_2/blob/master/quercus_2012_12_06.tar.gz?raw=true">here on GitHub</a> and use the included jars instead.  The snapshot exposes functionality unique to GAE that we originally had hidden.
</li>
<li>Create a quercusproject/war/WEB-INF/web.xml file for GoogleQuercusServlet:
<div class="codesnip-container" >
<pre style="overflow: auto;">&lt;web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5"&gt;
  &lt;servlet&gt;
    &lt;servlet-name&gt;Quercus Servlet&lt;/servlet-name&gt;
    &lt;servlet-class&gt;com.caucho.quercus.servlet.GoogleQuercusServlet&lt;/servlet-class&gt;

    &lt;init-param&gt;
      &lt;param-name&gt;ini-file&lt;/param-name&gt;
      &lt;param-value&gt;WEB-INF/php.ini&lt;/param-value&gt;
    &lt;/init-param&gt;
  &lt;/servlet&gt;

  &lt;servlet-mapping&gt;
    &lt;servlet-name&gt;Quercus Servlet&lt;/servlet-name&gt;
    &lt;url-pattern&gt;*.php&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;

  &lt;welcome-file-list&gt;
    &lt;welcome-file&gt;index.php&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
&lt;/web-app&gt;</pre>
</div>
</li>
<li>Create a quercusproject/war/WEB-INF/appengine-web.xml file:
<div class="codesnip-container" >
<pre style="overflow: auto;">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;appengine-web-app xmlns="http://appengine.google.com/ns/1.0"&gt;
  &lt;application&gt;your_app_id_here&lt;/application&gt;
  &lt;version&gt;1&lt;/version&gt;

  &lt;threadsafe&gt;true&lt;/threadsafe&gt;

  &lt;static-files&gt;
    &lt;exclude path="/**.php" /&gt;
  &lt;/static-files&gt;
&lt;/appengine-web-app&gt;</pre>
</div>
<p>Note: remember to change â€œyour_app_id_hereâ€ to your actual appspot application ID when deploying to GAE.</li>
<li>Create a quercusproject/war/test.php file:
<div class="codesnip-container" >
<pre>&lt;?php phpinfo(); ?&gt;</pre>
</div>
</li>
<li>Start up the GAE development server with Eclipse or with ant:
<div class="codesnip-container" >
<pre>ant runserver</pre>
</div>
</li>
<li>Browse to <a href="http://localhost:8080/test.php">http://localhost:8080/test.php</a><br />
and you should reach the PHP info page titled â€œQuercusâ€.</li>
</ol>
<p>At this point, the test project should be complete and deployable to GAE.</p>
<h3><span style="text-decoration: underline;">IV. Writing to files on GAE</span></h3>
<p>GAE does not allow applications to write to the local file system. However, Google recently added a files-like API (<a href="https://developers.google.com/appengine/docs/java/javadoc/index">com.google.appengine.api.files</a>) that applications can use to write streams to GAE DataStore or Google Cloud Storage. Quercus leverages this API to grant write capability to PHP file functions. In addition, Quercus goes a step further and merges the local and network file systems together to create a unified view. For example, consider the following script:</p>
<div class="codesnip-container" >
<pre style="overflow: auto;">&lt;pre&gt;
&lt;?php

  $filename = 'test.txt';
  var_dump(file_get_contents($filename));

  file_put_contents($filename, 'modified at time ' . date('Y-m-d H:i:s O'));
  var_dump(file_get_contents($filename));

?&gt;</pre>
</div>
<p>Suppose the file test.txt exists on the local file system. The first file_get_contents() call retrieves it. Then we try to overwrite that file. But since GAE does not allow writes to the local file system, Quercus writes to Google Cloud Storage instead. The next file_get_contents() call retrieves the newly-written file with the new data, not the old local file. And if the network file is cached in memcache, Quercus will serve that instead. <em>This is all done transparently behind-the-scenes and at no point is the application aware that it&#8217;s not reading/writing to the local file system.</em></p>
<h4><span style="text-decoration: underline;">A. Setting up Quercus to use Google Cloud Storage</span></h4>
<p>Google Cloud Storage is structured around uniquely-named buckets, which are very similar to mounted disk drives. As with regular drives, buckets can hold a hierarchical list of files and directories. To start things off, we need to enable Google Cloud Storage, create a bucket, and grant our application access to Google Cloud Storage.</p>
<ol>
<li><a href="https://developers.google.com/storage/docs/signup">ActivateÂ Google Cloud Storage</a>andÂ enable billing.Google Cloud Storage is free for the first 5GB of storage.</li>
<li>Go to your <a href="https://code.google.com/apis/console/#project:880248184729">GoogleÂ API Console</a>=&gt; Google Cloud Storage =&gt; Google Cloud Storage Manager. Create a newÂ bucket named â€œquercusbucket0â€.If you cannot create a new bucket, then it&#8217;s very likely your billing is not enabled or is still pending.</li>
<li>Go to your <a href="https://appengine.google.com/">Google App Engine Overview</a> =&gt; select or create your application =&gt; Application Settings. Make a note of the application&#8217;s â€œService Account Nameâ€. Then go to <a href="https://code.google.com/apis/console/#project:880248184729">GoogleÂ API Console</a>=&gt; Team. Create a new teammate with the â€œService Account Nameâ€.Note: if you had just created a new application, remember to update your<br />
quercusproject/war/WEB-INF/appengine-web.xml with the actual application ID.</li>
<li>Your GAE application should now has access to most of your Google APIs including Google Cloud Storage (but not Google Cloud SQL unfortunately). We now need to giveÂ Quercus the name of the bucket we just created. We do so by setting a servlet init-param in the web.xml file:
<div class="codesnip-container" >
<pre style="overflow: auto;">&lt;web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5"&gt;
  &lt;servlet&gt;
    &lt;servlet-name&gt;Quercus Servlet&lt;/servlet-name&gt;
    &lt;servlet-class&gt;com.caucho.quercus.servlet.GoogleQuercusServlet&lt;/servlet-class&gt;

    &lt;init-param&gt;
      &lt;param-name&gt;ini-file&lt;/param-name&gt;
      &lt;param-value&gt;WEB-INF/php.ini&lt;/param-value&gt;
    &lt;/init-param&gt;

    <strong>&lt;init-param&gt;</strong>
      <strong>&lt;param-name&gt;cloud-storage-bucket&lt;/param-name&gt;</strong>
      <strong>&lt;param-value&gt;quercusbucket0&lt;/param-value&gt;</strong>
    <strong>&lt;/init-param&gt;</strong>
  &lt;/servlet&gt;

  &lt;servlet-mapping&gt;
    &lt;servlet-name&gt;Quercus Servlet&lt;/servlet-name&gt;
    &lt;url-pattern&gt;*.php&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;

  &lt;welcome-file-list&gt;
    &lt;welcome-file&gt;index.php&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
&lt;/web-app&gt;</pre>
</div>
<p>Note: the bucket name can also be set in a php.ini file, but that capability is broken at the moment.</p>
<p>Note: you do not need to enable Google Cloud Storage and billing in order to test on the development server, but you do need to set &lt;cloud-storage-bucket&gt;.</li>
<li>Create a quercusproject/war/vfs.php file with the following:
<div class="codesnip-container" >
<pre style="overflow: auto;">&lt;pre&gt;
&lt;?php

  $filename = 'test.txt';
  var_dump(file_get_contents($filename));

  file_put_contents($filename, 'modified at time ' . date('Y-m-d H:i:s O'));
  var_dump(file_get_contents($filename));

?&gt;</pre>
</div>
</li>
<li>Launch the development server or deploy to GAE. Browse to the vfs.php page. Refresh a few times. You should see something like the following:
<pre>string(42) "modified at time 2012-12-05 22:04:21 +0000"
string(42) "modified at time 2012-12-05 22:25:28 +0000â€</pre>
</li>
</ol>
<h3><span style="text-decoration: underline;">V. Executing SQL queries on GAE</span></h3>
<p>For the longest time, Google&#8217;s distributed key-value store was GAE&#8217;s only persistent store option. However not all use cases can be boxed into key-values, so Google Cloud SQL was a welcome addition to GAE. It does come at a price because Cloud SQL has no free quota and you&#8217;re forced to pay from the start.</p>
<p><em>Update: as of 2012-11-08, Google is offering a free 6-month trial for a tiny D0 instance.</em></p>
<p>As with the PHP file functions, Quercus transparently maps PHP mysql and PDO functions to Cloud SQL. The only caveat is that the host url must begin with &#8220;jdbc:google:rdbms://&#8221; instead of localhost or a remote IP or domain name. Quercus will recognize the following and connect to Cloud SQL appropriately:</p>
<div class="codesnip-container" >
<pre>&lt;?php

  $db = mysql_connect('jdbc:google:rdbms://foo:bar');

?&gt;</pre>
</div>
<h4><span style="text-decoration: underline;">A. Setting up the Development Server to use local MySQL</span></h4>
<p>To do testing, we need to set up the development server to use the local<br />
MySQL instance.</p>
<ol>
<li>Download the MySQL JDBC driver atÂ <a href="http://dev.mysql.com/downloads/connector/j/">http://dev.mysql.com/downloads/connector/j/</a>. Uncompress mysql-connector-java-5.1.22.tar.gz and placeÂ mysql-connector-java-5.1.22-bin.jar into your<br />
&lt;appengine-sdk&gt;/lib/impl directory.</li>
<li>Follow the instructions at Google&#8217;s <a href="https://developers.google.com/appengine/docs/java/cloud-sql/developers-guide#using_the_java_development_server">Using a Local MySQL Instance During Development</a>.If you&#8217;re using ant, then all you need to do is add the following to your build.xml:
<div class="codesnip-container" >
<pre style="overflow: auto;">  &lt;target name="runserver" depends="datanucleusenhance"
      description="Starts the development server."&gt;
    &lt;dev_appserver war="war"&gt;
      &lt;options&gt;
        &lt;arg value="--jvm_flag=-Drdbms.server=local"/&gt;
        &lt;arg value="--jvm_flag=-Drdbms.driver=com.mysql.jdbc.Driver"/&gt;
        &lt;arg value="--jvm_flag=-Drdbms.url=jdbc:mysql://127.0.0.1:3306/wordpress0?user=root"/&gt;
      &lt;/options&gt;
    &lt;/dev_appserver&gt;
  &lt;/target&gt;</pre>
</div>
<p>For the development server only, any dummy JDBC url string that begins with<br />
jdbc:google:rdbms// gets redirected to the local MySQL instance. But you still need to pass in the correct credentials to the mysql functions for both the development server and GAE:</p>
<div class="codesnip-container" >
<pre style="overflow: auto;">  // $user and $pass must be valid
  // Google Cloud SQL default user is "root" with an empty password
  $db = mysql_connect('jdbc:google:rdbms://foo:bar', $user, $pass);</pre>
</div>
</li>
</ol>
<h4><span style="text-decoration: underline;">B. Setting up Google Cloud SQL</span></h4>
<p>If we wish to deploy to GAE, we also need to enable Google Cloud SQL and billing.</p>
<ol>
<li><a href="https://developers.google.com/cloud-sql/docs/before_you_begin">ActivateÂ Google Cloud SQL</a>and turn on billing. Create a new Cloud SQL instance.Google Cloud SQL is priced at two levels: a per-month or a per-use plan. There is currently no free trial quota.</li>
<li><a href="https://developers.google.com/cloud-sql/docs/access_control">GrantÂ your application access</a> to the newly-created Cloud SQL instance.</li>
<li>Create a quercusproject/war/mysql.php file with the following:
<div class="codesnip-container" >
<pre style="overflow: auto;">&lt;pre&gt;
&lt;?php

  <strong>$jdbc_url = 'jdbc:google:rdbms//project_name:instance_name';</strong>
  $db = mysql_connect($jdbc_url);

  $result = mysql_query('SHOW DATABASES', $db);

  while (($row = mysql_fetch_assoc($result))) {
    var_dump($row);
  }

?&gt;</pre>
</div>
<p>Note: remember to update $jdbc_url with the actual JDBC url for your MySQL instance.</p>
<p>Note: Google Cloud SQL&#8217;s &#8220;root&#8221; user has an empty default password.</li>
<li>Deploy the application to GAE and browse to mysql.php. You should see a list of database names from your MySQL instance.</li>
</ol>
<h3><span style="text-decoration: underline;">VI. Putting it all together â€“ Running Wordpress on GAE</span></h3>
<p>We now have all the pieces to install a stock Wordpress onto GAE.</p>
<ol>
<li>Download Wordpress at <a href="http://wordpress.org/download/">http://wordpress.org/download/</a>.</li>
<li>Uncompress the archive into your quercusproject/war directory.</li>
<li>Make sure the bucket name is set in web.xml.</li>
<li>Create a new MySQL database for Wordpress:
<pre>    CREATE DATABASE wordpress0;</pre>
</li>
<li>Deploy your application to GAE.</li>
<li>Browse to <i>wordpress/</i> and follow the prompts to install Wordpress. The default database user should be &#8220;root&#8221; with an empty password. Your Google Cloud SQL instance&#8217;s base JDBC URL should go into the â€œDatabase Hostâ€ field. Wordpress will automatically create a custom config file and populate the database with initial data.
<p><a href="http://blog.caucho.com/wp-content/uploads/2012/12/quercus_wordpress_install.png"><img src="http://blog.caucho.com/wp-content/uploads/2012/12/quercus_wordpress_install.png" alt="quercus_wordpress_install" title="quercus_wordpress_install" width="500" height="338" class="aligncenter size-full wp-image-1120" /></a></p>
</li>
<li>Wordpress will then prompt you to configure an admin account:
<p><a href="http://blog.caucho.com/wp-content/uploads/2012/12/quercus_wordpress_install_done.png"><img src="http://blog.caucho.com/wp-content/uploads/2012/12/quercus_wordpress_install_done.png" alt="quercus_wordpress_install_done" title="quercus_wordpress_install_done" width="500" height="327" class="aligncenter size-full wp-image-1121" /></a></p>
</li>
<li>And then you&#8217;re done!
<p><a href="http://blog.caucho.com/wp-content/uploads/2012/12/quercus_wordpress_home2.png"><img src="http://blog.caucho.com/wp-content/uploads/2012/12/quercus_wordpress_home2.png" alt="quercus_wordpress_home2" title="quercus_wordpress_home2" width="500" height="356" class="aligncenter size-full wp-image-1122" /></a></p>
</li>
</ol>
<p>Congrats! Your blog is installed and lives in the <em>Cloud</em>.</p>
<p>Here is a sample Wordpress site running on GAE: <a href="http://wordpress-on-quercus-2.appspot.com/">http://wordpress-on-quercus-2.appspot.com/</a></p>
<h3><span style="text-decoration: underline;">VII. Source Code</span></h3>
<p>The source code for the examples are available on <a href="https://github.com/diablonhn/quercus_on_gae_2">GitHub</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.caucho.com/2012/12/06/quercus-on-google-app-engine-20/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Cluster Configuration Using a Centralized Configuration Server</title>
		<link>http://blog.caucho.com/2012/09/04/cluster-configuration-using-a-centralized-configuration-server/</link>
		<comments>http://blog.caucho.com/2012/09/04/cluster-configuration-using-a-centralized-configuration-server/#comments</comments>
		<pubDate>Tue, 04 Sep 2012 19:00:10 +0000</pubDate>
		<dc:creator>Paul Cowan</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[cluster]]></category>

		<category><![CDATA[configuration]]></category>

		<guid isPermaLink="false">http://blog.caucho.com/?p=1095</guid>
		<description><![CDATA[Resin has the very convenient ability to import configuration from an HTTP URL.  This feature in combination with clever usage of environment variables can be a huge help avoiding the issues caused by maintaining local copies of configuration files in a large environment.  In this Wiki article I setup a webserver as a [...]]]></description>
			<content:encoded><![CDATA[<p>Resin has the very convenient ability to import configuration from an HTTP URL.  This feature in combination with clever usage of environment variables can be a huge help avoiding the issues caused by maintaining local copies of configuration files in a large environment.  In this <a href="http://wiki4.caucho.com/Cloud:_Cluster-Wide_Configuration_Using_HTTP">Wiki article</a> I setup a webserver as a centralized configuration repository and show how to modify your local Resin configuration such that the same file can be used by any Resin instance in any environment.</p>
<p><a href="http://wiki4.caucho.com/Cloud:_Cluster-Wide_Configuration_Using_HTTP">http://wiki4.caucho.com/Cloud:_Cluster-Wide_Configuration_Using_HTTP</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.caucho.com/2012/09/04/cluster-configuration-using-a-centralized-configuration-server/feed/</wfw:commentRss>
		</item>
		<item>
		<title>NginX versus Resin Pro: Resin wins this round</title>
		<link>http://blog.caucho.com/2012/08/21/nginx-versus-resin-pro-shot-heard-around-the-web/</link>
		<comments>http://blog.caucho.com/2012/08/21/nginx-versus-resin-pro-shot-heard-around-the-web/#comments</comments>
		<pubDate>Tue, 21 Aug 2012 22:54:54 +0000</pubDate>
		<dc:creator>caucho</dc:creator>
		
		<category><![CDATA[Benchmarks]]></category>

		<guid isPermaLink="false">http://blog.caucho.com/?p=1083</guid>
		<description><![CDATA[You may think of us as a vendor. We think of ourselves as a bunch of engineers who sit around and ask questions like: â€œis NginX faster and if so why?â€. If we deliberately gamed a benchmark that would take all of the fun out of it. We like the competition. Resin has always been [...]]]></description>
			<content:encoded><![CDATA[<p>You may think of us as a vendor. We think of ourselves as a bunch of engineers who sit around and ask questions like: â€œis NginX faster and if so why?â€. If we deliberately gamed a benchmark that would take all of the fun out of it. We like the competition. Resin has always been really fast, but competition from NginX has made us faster.</p>
<p><span id="more-1083"></span></p>
<p>For the most part we liked the press coverage we got.<br />
Thanks <a href="http://www.thewhir.com/profile/liameagle">Liam Eagle</a> for <a href="http://www.thewhir.com/web-hosting-news/java-based-web-server-resin-claims-it-outperforms-nginx-web-server-in-benchmark-tests" title="Java-Based Web Server Resin Claims it Outperforms NGINX Web Server in Benchmark Tests">covering</a> our <a href="http://www.caucho.com/resin-application-server/press/resin-java-web-server-outperforms-nginx/">press release</a>. Had your comment box worked this blog post might not exist. </p>
<p>Liam wrote the following:</p>
<blockquote><p>
Cauchoâ€™s press release references â€œbenchmark tests between Resin and NGINX,â€ and â€œnumerous and varying tests,â€ which it says delivered competitive figures, with Resin leading with fewer errors and faster response times. In particular, it says, Resin sustained fast response times under heavy load while NGINX degraded.<br />
<br />
The announcement does not describe the testing methodology, however, which raises the obvious question of whether the tests, which appear to have been conducted by Caucho itself, were somehow stacked in favor of the companyâ€™s own web server.
</p></blockquote>
<p>Press releases are usually short and light on technical detail. However, all syndication of our press release had a link to the exact <a href="http://wiki4.caucho.com/NginX_1.2.0_versus_Resin_4.0.29_performance_tests">testing methodology that we used</a> (linked text was &#8220;benchmark tests prove&#8221;). </p>
<p>We tried to keep our benchmark fairly simple and fair. We used three files: a 0k (almost empty HTML page), a 1k file, an 8k file and a 64k file. Then we used AutoBench, which uses httperf to test throughput. The benchmark does not raise the obvious question of whether the tests were stacked in our favor as the test was fairly straightforward and done with tools that are industry standards for benchmarking. Benchmarks can be really flawed. We hate flawed benchmarks.</p>
<p>We felt like this benchmark was a good demonstration of the file sizes that most web application servers serve, and we based this on a few <a href="http://www.optimizationweek.com/reviews/average-web-page/">studies</a> and our own experience. Let us know how we can improve the test to be more fair.</p>
<p>You may think of us as a vendor. We think of ourselves as a bunch of engineers who sit around and ask questions like: &#8220;is NginX faster and if so why?&#8221;. Then we come up with a plan to match or beat the speed. Then we devise a benchmark. Then we test. Then we make improvements. It is nice to have a worthy competitor like NginX. Resin has always been really fast, but competition from NginX has made us faster. We love not only the outcome, but the journey and craftsmanship it took to get there. The reason we wouldn&#8217;t game the benchmark is that would take all of the fun out of it. We would have to start wearing suits and going to meetings with powerpoint slides. Our souls are intact. We are software developers. We are engineers.  </p>
<p>Liam wrote the following:</p>
<blockquote><p>
So it is probably not surprising that up-and-coming web server products would intentionally prompt comparisons to NGINX. In a similar way, NGINX was quick to initiate comparisons to Microsoftâ€™s IIS as it approached the popular web server in market share.
</p></blockquote>
<p>Thank you for the compliment. We think that Resin has a lot of promise of continued success as well.<br />
When a lot of people think of <a  href="http://www.thefreedictionary.com/up-and-coming" title="promising continued or future success; enterprising">up-and-coming</a>, they might think of new. Resin has been around longer than NginX. In two more years, Resin will be old enough to drive a car in California. Resin&#8217;s 14 year success is largely attributed to its performance.  Resin&#8217;s <a href="" title="Resin application server has had strong growth; a ~tenfold growth from 480k hostnames to 4.7M">strong growth</a> is a welcome site for battle-hardened veteran of the web. Leading companies worldwide with demands for reliability and high performance web applications including the Toronto Stock Exchange, Salesforce.com and CNET are powered by Resin.</p>
<p>The NginX form had a post as follows:<br />
http://forum.nginx.org/read.php?2,229872,229873#msg-229873</p>
<blockquote><p>
What nginx configuration was used during the testing? Did they tune it?<br />
Did Resin use an equivalent level of logging? What build options were used<br />
to build nginx? Why did they test on 1k page? I don&#8217;t think that the average<br />
size of typical web-page and its elements are about 1 Kb. Does it mean that<br />
the Resin cannot effectively handle files of more size? What about memory<br />
usage? And after all, why did they use the latest version of Resin and<br />
relatively old version of nginx?
</p></blockquote>
<p>All syndication of our press release had a link to the exact <a href="http://wiki4.caucho.com/NginX_1.2.0_versus_Resin_4.0.29_performance_tests">testing methodology that we used</a>, which is on our wiki. This page and this blog post will answer all of your questions except for why we used NginX 1.2.0.</p>
<p>The press release was done in August. NginX 1.2.0 was used for the test and it was released in April. NginX 1.2.2 was released on July 3rd. We began benchmarking in June. The latest stable release was 1.2.0 at that time. There are no speedups documented in the release notes for 1.2.2 or 1.2.3 file with regard to HTTP file delivery. We also did benchmarking with an older versin of NginX prior to June and did see an NginX speedup from the earlier version. (We used to be further ahead, but we did not publish that benchmark.) </p>
<p>Feel free to benchmark against 1.2.2 or 1.2.3, and send us the results. <img src='http://blog.caucho.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.caucho.com/2012/08/21/nginx-versus-resin-pro-shot-heard-around-the-web/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Running Jasper JSP Engine on Resin</title>
		<link>http://blog.caucho.com/2012/08/15/running-jasper-jsp-engine-on-resin/</link>
		<comments>http://blog.caucho.com/2012/08/15/running-jasper-jsp-engine-on-resin/#comments</comments>
		<pubDate>Wed, 15 Aug 2012 19:35:25 +0000</pubDate>
		<dc:creator>alex</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.caucho.com/?p=1079</guid>
		<description><![CDATA[I posted a new wiki entry that explains how to run Jasper JSP Engine on Resin: http://wiki4.caucho.com/Jasper_JSP_Engine_On_Resin_Deployment.
]]></description>
			<content:encoded><![CDATA[<p>I posted a new wiki entry that explains how to run Jasper JSP Engine on Resin: <a href="http://wiki4.caucho.com/Jasper_JSP_Engine_On_Resin_Deployment">http://wiki4.caucho.com/Jasper_JSP_Engine_On_Resin_Deployment</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.caucho.com/2012/08/15/running-jasper-jsp-engine-on-resin/feed/</wfw:commentRss>
		</item>
		<item>
		<title>NginX 1.2.0 versus Resin 4.0.29 performance tests</title>
		<link>http://blog.caucho.com/2012/07/05/nginx-120-versus-resin-4029-performance-tests/</link>
		<comments>http://blog.caucho.com/2012/07/05/nginx-120-versus-resin-4029-performance-tests/#comments</comments>
		<pubDate>Thu, 05 Jul 2012 23:27:35 +0000</pubDate>
		<dc:creator>caucho</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.caucho.com/?p=1069</guid>
		<description><![CDATA[We have recently run some performance benchmarks comparing Resin 4.0.29 versus NginX 1.2.0. These benchmarks show that Java-based Resin Pro matches or exceeds C-based NginX&#8217;s throughput.
Summary: Using industry standard tool and methodology, Resin Pro web server was put to the test versus Nginx, a popular web server with a reputation for efficiency and performance. Nginx [...]]]></description>
			<content:encoded><![CDATA[<p>We have recently run some performance benchmarks comparing Resin 4.0.29 versus NginX 1.2.0. These benchmarks show that Java-based Resin Pro matches or exceeds C-based NginX&#8217;s throughput.</p>
<p>Summary: Using industry standard tool and methodology, Resin Pro web server was put to the test versus Nginx, a popular web server with a reputation for efficiency and performance. Nginx is known to be faster and more reliable under load than the popular Apache HTTPD. Benchmark tests between Resin and Nginx yielded competitive figures, with Resin leading with fewer errors and faster response times. In numerous and varying tests, Resin handled 20% to 25% more load while still outperforming Nginx. In particular, Resin was able to sustain fast response times under extremely heavy load while Nginx performance degraded. (See related <a href="http://www.caucho.com/resin-application-server/press/resin-java-web-server-outperforms-nginx/">press release</a>).</p>
<p><img src="http://s3.amazonaws.com/benchmark_nginx12_Resin429/resin_nginx_0k.png" alt="" /></p>
<p><span id="more-1069"></span></p>
<h2><span id="Benchmark_tools" class="mw-headline">Benchmark tools</span></h2>
<p>The benchmark tests used the following tools:</p>
<ul>
<li> httperf</li>
<li> AutoBench</li>
</ul>
<h3><span id="httperf" class="mw-headline">httperf</span></h3>
<p><a class="external text" href="http://www.hpl.hp.com/research/linux/httperf/">httperf</a> is tool produced by HP for measuring web server performance. The httperf tool supports HTTP/1.1 keepalives and SSL protocols.</p>
<h3><span id="AutoBench" class="mw-headline">AutoBench</span></h3>
<p><a class="external text" href="http://www.xenoclast.org/autobench/">Autobench</a> is a tool for automating the process of performing a comparative benchmark test against two a web servers. <strong>Autobench</strong> uses <strong>httperf</strong>. Autobench runs httperf against each host. AutoBench increases the number of requests per seconds on each iteration. AutoBench delivers output in a format that can be easily consumed by spreadsheet tools. AutoBench has a mode where it can drive multiple clients against a set of servers to minimize the possibility of testing your client throughput instead of server throughput. The command <strong>autobenchd</strong> is used to run a<br />
daemon on client machines. The <strong>autobench_admin</strong> command drives many clients to run test at same time by communicating with <strong>autobenchd</strong>.</p>
<h4><span id="Setup_Overview" class="mw-headline">Setup Overview</span></h4>
<p><img src="http://s3.amazonaws.com/benchmark_nginx12_Resin429/setup_benchmark_diagram.png" alt="" /></p>
<h3><span id="Configuration" class="mw-headline">Configuration</span></h3>
<p>The only change that was made was the <strong>worker_processes</strong> were set to 8 for NginX to improve throughput.</p>
<h3><span id="Hardware_Software_Specifications" class="mw-headline">Hardware Software Specifications</span></h3>
<h4><span id="Client_HW.2FOS_specs:" class="mw-headline">Client HW/OS specs:</span></h4>
<ul>
<li> i7 4 core / 8 HT, 2.8 GHZ, 8Meg Cache, 8 GB RAM.</li>
<li> Ubuntu 12 / Linux Kernel 3.2.0-26-generic</li>
</ul>
<h4><span id="Server_HW_specs:" class="mw-headline">Server HW specs:</span></h4>
<ul>
<li> i7 4 core / 8 HT, 2.8 GHZ, 8Meg Cache, 8 GB RAM.</li>
<li> Ubuntu 12 / Linux Kernel 3.2.0-26-generic</li>
</ul>
<h4><span id="Test_software:" class="mw-headline">Test software:</span></h4>
<ul>
<li> Autobench 2.1.1</li>
<li> httperf 0.9.0</li>
</ul>
<h4><span id="Software_under_test:" class="mw-headline">Software under test:</span></h4>
<ul>
<li> Resin Pro             4.0.29</li>
<li> nginx                    1.2.0</li>
</ul>
<h2><span id="0k_test" class="mw-headline">0k test</span></h2>
<h3><span id="Command_Line_Arguments" class="mw-headline">Command Line Arguments</span></h3>
<h4><span id="0k.sh" class="mw-headline">0k.sh</span></h4>
<pre>./admin.sh 300000 2000 20000 1000 0k</pre>
<h4><span id="admin.sh" class="mw-headline">admin.sh</span></h4>
<pre>autobench_admin
--clients xen:4600,lancre:4600
--uri1 /file_$5.html
--host1 ch_resin --port1 8080
--uri2 /file_$5.html
--host2 ch_nginx --port2 80
--num_conn $1
--num_call 10
--low_rate $2
--high_rate $3
--rate_step $4
--timeout 3
--file out_con$1_start$2_end$3_step$4_$5.tsv</pre>
<p>Above is used to setup 300,000 connections at a rate of 20,000 to 200,000 requests per second.<br />
Each iteration increases the rate by 10,000 from 20,000 to 200,000.</p>
<h3><span id="0k_html_file_file_0k.html" class="mw-headline">0k html file file_0k.html</span></h3>
<pre> &lt;html&gt;
 &lt;body&gt;
 &lt;pre&gt;&lt;/pre&gt;
 &lt;/body&gt;
 &lt;/html&gt;</pre>
<h3><span id="0k_full_Results_for_0K_test" class="mw-headline">0k full Results for 0K test </span></h3>
<p><img src="http://s3.amazonaws.com/benchmark_nginx12_Resin429/resin_nginx_0k_full.png" alt="" /></p>
<p><img src="http://s3.amazonaws.com/benchmark_nginx12_Resin429/resin_nginx_0k.png" alt="" /></p>
<p><img src="http://s3.amazonaws.com/benchmark_nginx12_Resin429/resin_nginx_response_time.png" alt="" /></p>
<p><img src="http://s3.amazonaws.com/benchmark_nginx12_Resin429/nginx_resin_0k_IO_throughput.png"/></p>
<p><img src="http://s3.amazonaws.com/benchmark_nginx12_Resin429/nginx_resin_errors_0k.png" alt="" /></p>
<h2><span id="1K_test" class="mw-headline">1K test</span></h2>
<h3><span id="Command_line" class="mw-headline">Command line</span></h3>
<h4><span id="1k.sh" class="mw-headline">1k.sh</span></h4>
<pre>./admin.sh 200000 1000 10000 250 1k</pre>
<h4><span id="admin.sh_2" class="mw-headline">admin.sh</span></h4>
<pre>autobench_admin
--clients xen.caucho.com:4600,lancre.caucho.com:4600
--uri1 /file_$5.html
--host1 ch_resin --port1 8080
--uri2 /file_$5.html
--host2 ch_nginx --port2 80
--num_conn $1
--num_call 10
--low_rate $2
--high_rate $3
--rate_step $4
--timeout 3
--file out_con$1_start$2_end$3_step$4_$5.tsv</pre>
<h4><span id="1k.html" class="mw-headline">1k.html</span></h4>
<pre>html&gt;
&lt;body&gt;
&lt;pre&gt;
0 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789
1 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789
2 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789
3 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789
4 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789
5 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789
6 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789
7 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789
8 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789
9 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789
&lt;/pre&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<h3><span id="1k_full_Results_for_1K_test" class="mw-headline">1k full Results for 1K test </span></h3>
<p><img src="http://s3.amazonaws.com/benchmark_nginx12_Resin429/resin_nginx_1k_requests_per_second.png" alt="" /></p>
<p><img src="http://s3.amazonaws.com/benchmark_nginx12_Resin429/resin_nginx_1k_response_time.png" alt="" /></p>
<p><img src="http://s3.amazonaws.com/benchmark_nginx12_Resin429/resin_nginx_IO_1k.png" alt="" /></p>
<p><img src="http://s3.amazonaws.com/benchmark_nginx12_Resin429/resin_nginx_1k_errors.png" alt="" /></p>
<h2>8K test</h2>
<p><img src="http://s3.amazonaws.com/benchmark_nginx12_Resin429/resin_nginx_8k.png"/></p>
<h2>64K test</h2>
<p><img src="http://s3.amazonaws.com/benchmark_nginx12_Resin429/resin_nginx_64k.png"/></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.caucho.com/2012/07/05/nginx-120-versus-resin-4029-performance-tests/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Deploying Seam-Booking Example on Resin Server</title>
		<link>http://blog.caucho.com/2012/06/26/deploying-seam-booking-example-on-resin-server/</link>
		<comments>http://blog.caucho.com/2012/06/26/deploying-seam-booking-example-on-resin-server/#comments</comments>
		<pubDate>Tue, 26 Jun 2012 18:13:05 +0000</pubDate>
		<dc:creator>alex</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.caucho.com/?p=1065</guid>
		<description><![CDATA[Scott and I just finished work on making sure Seam-Booking example works on Resin. I posted a tutorial on deploying seam-booking in Resin at Resin Wiki: Seam On Resin . It requires Resin 4.0.29 which is due in  about a week from now.
]]></description>
			<content:encoded><![CDATA[<p>Scott and I just finished work on making sure Seam-Booking example works on Resin. I posted a tutorial on deploying seam-booking in Resin at <a href="http://wiki4.caucho.com/Seam_On_Resin_Deployment">Resin Wiki: Seam On Resin</a> . It requires Resin 4.0.29 which is due in  about a week from now.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.caucho.com/2012/06/26/deploying-seam-booking-example-on-resin-server/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Does Resin Support EJB remoting?</title>
		<link>http://blog.caucho.com/2012/05/16/java-ee-resin-cdi-remoting-hessian/</link>
		<comments>http://blog.caucho.com/2012/05/16/java-ee-resin-cdi-remoting-hessian/#comments</comments>
		<pubDate>Wed, 16 May 2012 21:08:20 +0000</pubDate>
		<dc:creator>caucho</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.caucho.com/?p=1062</guid>
		<description><![CDATA[The short answer is no. The longer answer is that Resin supports Hessian for remoting. And, in about 20 lines of code, you can expose all @Stateless/@Remote beans as remote services using the Hessian protocol using CDI and Servlet 3.0, which are part of Resin and part of Java EE Web Profile (as Resin 4 [...]]]></description>
			<content:encoded><![CDATA[<p>The short answer is no. The longer answer is that Resin supports Hessian for remoting. And, in about 20 lines of code, you can expose all @Stateless/@Remote beans as remote services using the Hessian protocol using CDI and Servlet 3.0, which are part of Resin and part of Java EE Web Profile (as Resin 4 is a Java EE Web Profile certified application server).</p>
<p>Hessian (now Hessian 2) predates many other forms of remoting and is a [http://daniel.gredler.net/2008/01/07/java-remoting-protocol-benchmarks/ wicked fast, binary protocol] (faster than CORBA, RMI, SOAP, XML-RPC, etc). You could think of Hessian as a high performance binary JSON. Hessian has been ported to many languages. Hessian is a remoting framework and a flexible Java serialization framework.</p>
<p>You can expose any bean as a Hessian remote bean quite easily. Hessian has been around for 10 years, and is very solid. (Both Hessian and Resin are development and maintained by Caucho).</p>
<p>Resin 4 documentation does not have Hessian documentation yet, but Hessian usage has not changed in years. You can find a good tutorial on getting started with Hessian from the [http://www.caucho.com/resin-3.0/protocols/hessian.xtp Resin 3 documentation]. I&#8217;ve tried these tutorial steps in Resin 4 and the tutorial works as advertised.</p>
<p>Resin 4 is Java EE Web Profile certified as such it does not support CORBA, EJB remoting, etc. However Resin does support Java Dependency Injection (CDI), which allows you to easily find beans with certain annotations. What follows is a simple example that finds all @Stateless beans that have @Remote interfaces and automatically exposes those beans as remote hessian objects.</p>
<p>To learn more go to our <a href="http://wiki4.caucho.com/Does_Resin_4_Support_Remoting%3F">wiki for Resin 4 Java EE WebProfile application server</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.caucho.com/2012/05/16/java-ee-resin-cdi-remoting-hessian/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
