<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<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/"
	>

<channel>
	<title>Parallel Development</title>
	<link>http://parade.sourceforge.net</link>
	<description>Collaborative development made easy</description>
	<pubDate>Fri, 10 Apr 2009 14:02:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<item>
		<title>New features: Users, Applications, Online status</title>
		<link>http://parade.sourceforge.net/?p=8</link>
		<comments>http://parade.sourceforge.net/?p=8#comments</comments>
		<pubDate>Tue, 08 Apr 2008 09:59:44 +0000</pubDate>
		<dc:creator>manu</dc:creator>
		
		<category><![CDATA[Feature]]></category>

		<guid isPermaLink="false">http://parade.sourceforge.net/?p=8</guid>
		<description><![CDATA[In the last days I did some development on ParaDe, here are the results:
User support
If you go on the front page of parade, you will be asked to fill in some  information about yourself. This is just in order to display it somewhere in  ParaDe. And if you have a gmail account, one [...]]]></description>
			<content:encoded><![CDATA[<p>In the last days I did some development on ParaDe, here are the results:</p>
<h2>User support</h2>
<p>If you go on the front page of parade, you will be asked to fill in some  information about yourself. This is just in order to display it somewhere in  ParaDe. And if you have a gmail account, one idea is that it would be used for a  ParaDe Gtalk bot - but that is just an idea for the moment.</p>
<h2>Application support</h2>
<p>This is not directly visible now, but will be useful later. There&#8217;s now an  applications.properties file in the same directory as rows.properties, which  specifies the module to an application. That way ParaDe knows all the files of  the CVS repository of the application.</p>
<p>By default, if not otherwise specified in rows.properties, rows use the  application configured in parade.properties (&#8221;parade.applications.default&#8221;  property).</p>
<p>Later on this will be used in order to provide support for CVS update of a  context (i.e. it will show you that you need to update 10 files, and make it  possible to update them fast) .</p>
<h2>Session tracking (aka &#8220;online users&#8221;)</h2>
<p>I made a small listener that listens to all the sessions opened on ParaDe. If  you go on the front page, you can now see who is online (i.e. who has a  session). This may not be entirely accurate, since they might be issues with  session expiration. I know it doesn&#8217;t work super-well yet, but will improve it,  since it&#8217;s cool.</p>
<p>By the way - if someone knows something about ajax-based chats or such, and has  some time to give me a hand, we could put a small Gmail-like chat in ParaDe. I  don&#8217;t have so much time for developing this kind of thing now, but I guess that  it would be a useful feature).</p>
<h2>Improved error pages</h2>
<p>Well, maybe you saw them already if you try to access ParaDe while it restarts.  Basically, instead of having an ugly error page from tomcat, you get something  that looks slightly nicer.</p>
<h2>CVS hook</h2>
<p>This ain&#8217;t in place yet, but when it will be, ParaDe will be notified of every  commit that is done. Besides of informing people that something changed, it  could for instance be used in order to generate statistics (since ParaDe knows  that if Bob commits something in Alice&#8217;s repository, it was still Bob&#8217;s commit).</p>
]]></content:encoded>
			<wfw:commentRss>http://parade.sourceforge.net/?feed=rss2&amp;p=8</wfw:commentRss>
		</item>
		<item>
		<title>More documentation</title>
		<link>http://parade.sourceforge.net/?p=7</link>
		<comments>http://parade.sourceforge.net/?p=7#comments</comments>
		<pubDate>Wed, 27 Feb 2008 21:08:53 +0000</pubDate>
		<dc:creator>manu</dc:creator>
		
		<category><![CDATA[Meta]]></category>

		<guid isPermaLink="false">http://parade.sourceforge.net/?p=7</guid>
		<description><![CDATA[Some ideas of other things to document:

the ParaDe cache model
various Hibernate tweaks, and ParaDe&#8217;s optimised cache configuration
the templating mechanism
ParaDe servlets and ViewManagers
Parade model managers: CVSManager, FileManager, RowManager, AntManager, MakumbaManager
ParaDe access control
the complex logging mechanism and ideas on how to improve it
the TriggerFilter mechanism

]]></description>
			<content:encoded><![CDATA[<p>Some ideas of other things to document:</p>
<ul>
<li>the ParaDe cache model</li>
<li>various Hibernate tweaks, and ParaDe&#8217;s optimised cache configuration</li>
<li>the templating mechanism</li>
<li>ParaDe servlets and ViewManagers</li>
<li>Parade model managers: CVSManager, FileManager, RowManager, AntManager, MakumbaManager</li>
<li>ParaDe access control</li>
<li>the complex logging mechanism and ideas on how to improve it</li>
<li>the TriggerFilter mechanism</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://parade.sourceforge.net/?feed=rss2&amp;p=7</wfw:commentRss>
		</item>
		<item>
		<title>ParaDe and JNotify</title>
		<link>http://parade.sourceforge.net/?p=6</link>
		<comments>http://parade.sourceforge.net/?p=6#comments</comments>
		<pubDate>Wed, 27 Feb 2008 21:02:55 +0000</pubDate>
		<dc:creator>manu</dc:creator>
		
		<category><![CDATA[Mechanism]]></category>

		<guid isPermaLink="false">http://parade.sourceforge.net/?p=6</guid>
		<description><![CDATA[In this post I&#8217;ll try to provide some insights on how JNotify is used by ParaDe to keep its cache up-to-date.
Some words about JNotify
JNotify is a Java library that allows Java applications to receive file system events on windows and linux. It basically is a Java wrapper around events issued by the OS, making it [...]]]></description>
			<content:encoded><![CDATA[<p>In this post I&#8217;ll try to provide some insights on how <a href="http://sourceforge.net/projects/jnotify/" target="_blank">JNotify</a> is used by ParaDe to keep its cache up-to-date.</p>
<h2>Some words about JNotify</h2>
<p>JNotify is a Java library that allows Java applications to receive file system events on windows and linux. It basically is a Java wrapper around events issued by the OS, making it possible to watch given files.</p>
<p>In order to do so, one needs to add watches (represented by a JNotify listener) on a given path, with several other options (whether to watch files in sub-directories, which kind of actions to watch, &#8230;).</p>
<p>The possible actions to watch are:</p>
<ul>
<li>creation of a file</li>
<li>deletion of a file</li>
<li>modification of a file</li>
<li>name change of a file</li>
</ul>
<p>On registration, JNotify will inform the OS that it wants to add a watch on the specific directory or file of the directory. Linux needs to have one watch per-file (directory watches don&#8217;t inform of changes in the files of a directory), hence it is useful to increase the max_user_watches limit in /proc/sys/fs/inotify.</p>
<h2>JNotify listeners in ParaDe</h2>
<p>ParaDe handles the notification of watches on startup, through the <strong>org.makumba.parade.model.Parade#addJNotifyListeners().</strong> ParaDe only registers user rows, but not the root row (i.e. the ParaDe webapp itself).</p>
<p>Depending on the event, it then performs specific operations on the concerned file, or rather on its cache. Those actions are carried out in a single Hibernate transaction, and before any cache update is carried out, two checks are performed:</p>
<h3>File name filtering</h3>
<p>The <strong>org.makumba.parade.tools.SimpleFileFilter</strong> specifies which files are relevant to the ParaDe cache. Following files are excluded:</p>
<ul>
<li>temporary files</li>
<li>.class files</li>
<li>CVS-related files (directories, temporary files due to merge/update)</li>
<li>tomcat-specific directories (work, logs)</li>
<li>internal ParaDe files (starting with &#8220;_new_&#8221;)</li>
<li>temporary <a href="http://www.cis.upenn.edu/~bcpierce/unison/" target="_blank">Unison</a> files</li>
</ul>
<h3>Lock verification</h3>
<p>It can happen that some actions lead to a massive modification or change in the file system. In this case, performing a per-file cache update through JNotify is very resource-consuming, since the JNotify listeners don&#8217;t have a context and need to query for the cache object on every access, triggering one transaction per file.</p>
<p>For this reason, ParaDe has per-file and per-directory locking mechanisms: when a CVS update is triggered from the ParaDe UI, it will automatically create a lock: a file that ends with &#8220;.parade-lock~&#8221; and is named after the file or directory to lock is created and removed before and after the operation is performed. That way the JNotify listener can detect a lock and ignore events occurring at this specific path.</p>
<p>Locks are created and removed through the <strong>org.makumba.parade.model.Parade#createFileLock()</strong>, <strong>org.makumba.parade.model.Parade#removeFileLock()</strong>, <strong>org.makumba.parade.model.Parade#createDirectoryLock()</strong> and <strong>org.makumba.parade.model.Parade.removeDirectoryLock()</strong> methods. These are called on:</p>
<ul>
<li>lcaol and recursive CVS update</li>
<li>CVS add, addBinary, delete, update</li>
<li>file creation/edition/deletion through the ParaDe UI</li>
</ul>
<h2>Limitations of the current mechanism</h2>
<p>Even though it is heavily optimised for performance, the current mechanism has some drawbacks and limitations. Those are:</p>
<ul>
<li>the lack of context on event notification. Whenever an event is fired, the JNotify listener needs to re-build its context, which leads to an expensive Hibernate transaction. Eventually, this brings a high load on the server, especially in case of a massive update (e.g. in the case of a Unison synchronisation that brings in many events)</li>
<li>the lack of control on which files to watch. It would be much more convenient to be able to filter out which files to watch by a set of names / patterns, instead of watching each single file and then filtering it out within ParaDe (through the SimpleFileFilter). Furthermore, this kind of &#8220;global watching&#8221; can lead to inconsistent error messages, e.g. when a temporary Unison file is created and remove right afterwards (the error message then looks like &#8220;<em>registerToSubTree : warning, failed to register /path/to/file: Permission denied</em>&#8220;).</li>
<li>the high dependency on the OS: JNotify is a workaround for Java&#8217;s lack of support of such OS file events. It has different ways of working in windows and linux and doesn&#8217;t work at all on Mac OS, hence breaking ParaDe&#8217;s platform-independency.</li>
</ul>
<p>A solution to those shortcomings may eventually be addressed by the implementation of <a href="http://jcp.org/en/jsr/detail?id=203" target="_blank">JSR 203</a> as part of Java 7.</p>
]]></content:encoded>
			<wfw:commentRss>http://parade.sourceforge.net/?feed=rss2&amp;p=6</wfw:commentRss>
		</item>
		<item>
		<title>ParaDe start-up</title>
		<link>http://parade.sourceforge.net/?p=5</link>
		<comments>http://parade.sourceforge.net/?p=5#comments</comments>
		<pubDate>Sun, 24 Feb 2008 22:56:41 +0000</pubDate>
		<dc:creator>manu</dc:creator>
		
		<category><![CDATA[Mechanism]]></category>

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

		<category><![CDATA[start-up]]></category>

		<guid isPermaLink="false">http://parade.sourceforge.net/?p=5</guid>
		<description><![CDATA[This is a short explanation of what happens on ParaDe startup.
Initialisation
org.makumba.parade.init contains the classes involved with initialisation. Amongst those, the InitServlet plays an important role. It is configured in the global web.xml to run at startup and tries to load the Parade object from the Hibernate cache. If it finds such an object, it will [...]]]></description>
			<content:encoded><![CDATA[<p>This is a short explanation of what happens on ParaDe startup.</p>
<h2>Initialisation</h2>
<p><strong>org.makumba.parade.init</strong> contains the classes involved with initialisation. Amongst those, the <strong>InitServlet</strong> plays an important role. It is configured in the global web.xml to run at startup and tries to load the Parade object from the Hibernate cache. If it finds such an object, it will load it, otherwise, it will create a new one, perform a global cache refresh on ParaDe and add the JNotify listeners to the rows.</p>
<p>Note that if the database is empty at this point, Hibernate will automatically create all the tables. At startup, Hibernate also performs schema update, i.e. it checks if the schema of the database corresponds to the one of the model and performs necessary steps if it isn&#8217;t. InitServlet is also the starting point for Hibernate: it provides a configuration and declares which Hibernate model files should be loaded.</p>
<p>Additionally, the Freemarker templating engine is also configured by the InitServlet.</p>
<p>The initialisation is being ran in a thread, which means that tomcat will probably finish loading way earlier than ParaDe. Wait for the &#8220;ParaDe initialisation finished at &#8230;&#8221; message before accessing ParaDe.</p>
<h2>ParaDe refresh</h2>
<p>Global ParaDe refresh is triggered in two ways: either on ParaDe startup, if no ParaDe object can be found, or manually by calling the RowsAction (http://hostname:port/Rows.do?op=parade).</p>
<p>The <strong>refresh()</strong> method of the <strong>org.makumba.parade.model.Parade</strong> class does following:</p>
<ol>
<li>read the row definitions file (rows.properties)</li>
<li>updates the cache accordingly to these definitions</li>
<li>calls the refresh() methods of all RowManagers</li>
</ol>
<p>The RowManagers perform row-wide refresh operations, which differ for each manager. Some of them call a directory-refresh method, which itself calls a file-refresh method etc.</p>
<p>It is during the row refresh() that all the files of a row are being cached and their other meta-information (CVS, etc&#8230;) is being cached.</p>
<p>Hence the rows.properties file is read only once: when there&#8217;s no previous ParaDe object available. If new rows are being added to the file, a ParaDe-wide refresh needs hence to be performed. This is of course not optimal, and a more direct way than this one should exist, but is not yet implemented.</p>
<h2>JNotify initialisation</h2>
<p>At startup, all the rows are getting a JNotify watch: in the case of linux, this will trigger the creation of a inotify node for all the files in a row, hence the <strong>/proc/sys/fs/inotify/max_user_watches</strong> file needs to contain a rather high value if many rows are being watched. If you get a lot of messages from JNotify at startup saying it can&#8217;t add watches, this probably means that this file is not properly configured.</p>
]]></content:encoded>
			<wfw:commentRss>http://parade.sourceforge.net/?feed=rss2&amp;p=5</wfw:commentRss>
		</item>
		<item>
		<title>First-time installation</title>
		<link>http://parade.sourceforge.net/?p=4</link>
		<comments>http://parade.sourceforge.net/?p=4#comments</comments>
		<pubDate>Sun, 24 Feb 2008 18:17:46 +0000</pubDate>
		<dc:creator>manu</dc:creator>
		
		<category><![CDATA[Configuration]]></category>

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

		<category><![CDATA[parade.properties]]></category>

		<guid isPermaLink="false">http://parade.sourceforge.net/?p=4</guid>
		<description><![CDATA[In order to run ParaDe, you&#8217;ll need:

a tomcat server, preferrably version 5.5 (we didn&#8217;t test it on 6 yet)
a sql database, like MySQL or else
an OS that supports JNotify. We recommend using a unix-based OS. Linux supports inotify natively since kernel 2.6.13.
the Java Virtual Machine, version 5 or higher
the Apache Ant tools

Step 1: Checking out [...]]]></description>
			<content:encoded><![CDATA[<p>In order to run ParaDe, you&#8217;ll need:</p>
<ul>
<li>a <a href="http://tomcat.apache.org/">tomcat</a> server, preferrably version 5.5 (we didn&#8217;t test it on 6 yet)</li>
<li>a sql database, like <a href="http://www.mysql.com">MySQL</a> or else</li>
<li>an OS that supports <a href="http://sourceforge.net/projects/jnotify/">JNotify</a>. We recommend using a unix-based OS. Linux supports inotify natively since kernel 2.6.13.</li>
<li>the <a href="http://java.sun.com/">Java Virtual Machine</a>, version 5 or higher</li>
<li>the <a href="http://ant.apache.org/">Apache Ant tools</a></li>
</ul>
<h2>Step 1: Checking out ParaDe<strong> </strong></h2>
<p>For the moment, the only way of downloading ParaDe is by checking it out from CVS. You can read more about it on the <a href="http://sourceforge.net/cvs/?group_id=143019">SourceForge project pages</a>.</p>
<p>The easiest method for checking out ParaDe is the anonymous checkout. In a new folder of your choice, type:</p>
<pre>cvs -d:pserver:anonymous@parade.cvs.sourceforge.net:/cvsroot/parade login

cvs -z3 -d:pserver:anonymous@parade.cvs.sourceforge.net:/cvsroot/parade co -P parade2</pre>
<p>This will check out ParaDe. For further updates from the repository you can type:</p>
<pre>cvs -z3 -d:pserver:anonymous@parade.cvs.sourceforge.net:/cvsroot/parade update</pre>
<h2>Step 2: The configuration files<strong> </strong></h2>
<p>Let&#8217;s say you have now a fresh checkout in the folder <em>parade</em>. You&#8217;ll now have to configure ParaDe and its interaction with tomcat and your database server.</p>
<p>The first thing you need to do is to configure the <strong><em>parade.properties</em></strong> file in <em>parade/webapp/WEB-INF/classes</em>. There&#8217;s an example file at <em>parade/webapp/WEB-INF/classes/parade.properties.example </em>which you can directly copy.</p>
<p>The next file that matters is <strong><em>tomcat.properties</em></strong> in the folder <em>parade</em>. There&#8217;s also a <em>tomcat.properties.example</em> file provided. Here you&#8217;ll only need to configure:</p>
<ul>
<li> the path to your tomcat folder (e.g. if you have extracted a tomcat distribution in the same folder as parade, the path will likely be something like <em>../apache-tomcat-5.5.x</em>)</li>
<li>the JVM&#8217;s Xms (minimum memory size) and Xmx (maximum memory size) values (by default those are suited to a production environment).</li>
</ul>
<p>The other parameters are by default configured to fit the tomcat configuration in ParaDe&#8217;s &#8220;tomcat&#8221;directory, and youdon&#8217;t need to change them unless you want to run ParaDe on a different port (or have a safer manager authentication). In this case, don&#8217;t forget to do the necessary changes in ParaDe&#8217;s tomcat/server.xml and tomcat/tomcat-users.xml.</p>
<p>Once this is done, all you need is configuring the database. First, you need to create a database for parade. with MySQL, issuing a</p>
<pre>CREATE DATABASE parade;</pre>
<p>statement will do it.  Then, you also need to configure the connection to the database in <strong><em>parade/webapp/WEB-INF/classes/hibernate.cfg.xml</em></strong>. ParaDe uses Hibernate to cache the state of the files and rows it handles, see <a href="http://www.hibernate.org/">the Hibernate website</a> for more information about supported database systems and configuration options.</p>
<h2>Step 3: Running ParaDe for the very first time</h2>
<p>So, at this point you should be ready to run parade. From your shell or command-line, type</p>
<pre>ant tomcat</pre>
<p>You should now see tomcat starting up, and then hibernate creating a lot of tables. If everything goes fine, accessing your tomcat (e.g. http://localhost:5050) should show you the ParaDe index page, with only one row (the root row).</p>
<h2>Step 4: Configuring the rows</h2>
<p>Now you can configure the rows. First, stop the running ParaDe (at this point, hitting Ctrl+C should just stop tomcat). In <strong><em>parade/webapp/WEB-INF/classes/rows.properties</em></strong> you can set-up which rows you&#8217;d like to deploy. The syntax goes as follows:</p>
<pre>rowName=/path/to/webapp/</pre>
<pre>rootrowdata.rowName.obs=Description of the row</pre>
<pre>rowdata.rowName.webapp=relative path to the context, leave blank if none</pre>
<h2>Step 5: Starting ParaDe properly</h2>
<p>You can then run ParaDe again in a more robust way by issuing</p>
<pre>nohup ant tomcat &amp;</pre>
<p>The logs will be in <strong><em>parade/tomcat/logs/catalina.out</em></strong> or accessible inside of ParaDe by looking on the root row.</p>
<p>If you plan to have ParaDe running regullarily, there is also a &#8220;<em><strong>parade</strong></em>&#8221; script which you can either copy over to e.g. /etc/init.d (for Debian-like distributions) or link from there. Don&#8217;t forget to &#8220;chmod +x&#8221; the script file!</p>
<p>That&#8217;s it! Enjoy using your new parade configuration!</p>
]]></content:encoded>
			<wfw:commentRss>http://parade.sourceforge.net/?feed=rss2&amp;p=4</wfw:commentRss>
		</item>
		<item>
		<title>ParaDe documentation blog</title>
		<link>http://parade.sourceforge.net/?p=3</link>
		<comments>http://parade.sourceforge.net/?p=3#comments</comments>
		<pubDate>Sun, 24 Feb 2008 17:36:15 +0000</pubDate>
		<dc:creator>manu</dc:creator>
		
		<category><![CDATA[Meta]]></category>

		<guid isPermaLink="false">http://parade.sourceforge.net/?p=3</guid>
		<description><![CDATA[Yes, there&#8217;s now a ParaDe blog! Here you will find various information on ParaDe: how it works, new features, how to configure it&#8230;
The main purpose of this blog (for the moment) is to write down documentation on ParaDe in an easy way. Then maybe one day we can turn all those posts into something more [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, there&#8217;s now a ParaDe blog! Here you will find various information on ParaDe: how it works, new features, how to configure it&#8230;</p>
<p>The main purpose of this blog (for the moment) is to write down documentation on ParaDe in an easy way. Then maybe one day we can turn all those posts into something more stable.</p>
]]></content:encoded>
			<wfw:commentRss>http://parade.sourceforge.net/?feed=rss2&amp;p=3</wfw:commentRss>
		</item>
	</channel>
</rss>
