<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Distributed Conscience</title>
	<atom:link href="http://khartig.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://khartig.wordpress.com</link>
	<description>Raising global consciousness using technology</description>
	<lastBuildDate>Thu, 22 Dec 2011 18:43:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='khartig.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Distributed Conscience</title>
		<link>http://khartig.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://khartig.wordpress.com/osd.xml" title="Distributed Conscience" />
	<atom:link rel='hub' href='http://khartig.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Generating SerialVersionUID in Netbeans 7</title>
		<link>http://khartig.wordpress.com/2011/11/03/generating-serialversionuid-in-netbeans-7/</link>
		<comments>http://khartig.wordpress.com/2011/11/03/generating-serialversionuid-in-netbeans-7/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 21:44:03 +0000</pubDate>
		<dc:creator>khartig</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java object serialization]]></category>
		<category><![CDATA[kenai]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[serializable]]></category>
		<category><![CDATA[serialversionuid]]></category>

		<guid isPermaLink="false">http://khartig.wordpress.com/?p=183</guid>
		<description><![CDATA[There are many reasons why you should generate a unique id for Serializable java objects. making sure you serialize and deserialize objects with the same structure serializable objects without a defined id have one generated. different JVMs use different algorithms to generate ids. if you marshall objects across different platforms, the ids may not match [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=183&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are many reasons why you should generate a unique id for <a title="Serializable javadoc" href="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html">Serializable</a> java objects.</p>
<ul>
<li>making sure you serialize and deserialize objects with the same structure</li>
<li>serializable objects without a defined id have one generated. different JVMs use different algorithms to generate ids. if you marshall objects across different platforms, the ids may not match</li>
<li>changes to classes that break backward compatibility should declare a changed UID to insure errors are thrown by old code using those objects.</li>
</ul>
<div>To name just a few. If you&#8217;re interested, there is a <a href="http://java.sun.com/j2se/1.4/pdf/serial-spec.pdf">Java Object Serialization Specification</a>.</div>
<div>If you use <a href="http://netbeans.org/">Netbeans 7</a>, there is a plugin that will auto-generate SerialVersionUIDs. In <a href="http://projectkenai.com/">Kenai</a>, there is a  <a href="http://kenai.com/projects/nb-svuid-generator">SerialVerionsUID Generator</a> project that has an nbm plugin <a title="eu-easyedu-netbeans-svuid-1.9.7.nbm" href="http://kenai.com/projects/nb-svuid-generator/downloads/download/nbms/nb7.0.1/eu-easyedu-netbeans-svuid.nbm">eu-easyedu-netbeans-svuid-1.9.7.nbm</a> .  The link points to the Netbeans 7.0.1 version. There are earlier versions of the plugin available to download from the project as well, at the time of this posting.</div>
<div>Once the plugin is installed, when creating a class that implements Serializable, right-click in the edit window, select Insert Code&#8230; , then select:</div>
<div>
<ul>
<li>add generated serialVersionUID or</li>
<li>add default serialVersionUID</li>
</ul>
<div>The correct syntax is added to the class file code.</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khartig.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khartig.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khartig.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khartig.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khartig.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khartig.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khartig.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khartig.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khartig.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khartig.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khartig.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khartig.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khartig.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khartig.wordpress.com/183/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=183&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khartig.wordpress.com/2011/11/03/generating-serialversionuid-in-netbeans-7/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f7c5df1ce75de5a4532fa9dbac529f4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kevin</media:title>
		</media:content>
	</item>
		<item>
		<title>Clearing cache in JPA 2.0</title>
		<link>http://khartig.wordpress.com/2011/10/23/clearing-cache-in-jpa-2-0/</link>
		<comments>http://khartig.wordpress.com/2011/10/23/clearing-cache-in-jpa-2-0/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 19:52:24 +0000</pubDate>
		<dc:creator>khartig</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[clearing cache]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[evictAll]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[JPA 2.0]]></category>

		<guid isPermaLink="false">http://khartig.wordpress.com/?p=179</guid>
		<description><![CDATA[Managing a data cache effectively is important for application or service performance, although not necessarily easy to do. A simple and common design with a data cache that occurs and seems to cause problems is the following: a process that continually commits new data to a database another process executing is a separate virtual machine, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=179&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Managing a data cache effectively is important for application or service performance, although not necessarily easy to do. A simple and common design with a data cache that occurs and seems to cause problems is the following:</p>
<ul>
<li>a process that continually commits new data to a database</li>
<li>another process executing is a separate virtual machine, typically a web service, marshaling data from the database</li>
</ul>
<div>The web service needs to pull the most current data from the database each time there is a client request to access data. With different product implementations of caching, not all the JPA calls seem to work the same. There can be multiple levels of caching as well. The clear() and flush() methods of EntityManager don&#8217;t clear multiple levels of caching in all cases, even with caches turned off as set with persistence properties.</div>
<div>Every time there is a request to pull data from the service, the current set of data in the database needs to be represented. Not what is in the cache since it may not be in synch with the database. It seems like this should be simple but it took some experimenting on my part to get this working as needed. There also doesn&#8217;t appear to be much information about handling this particular scenario. There are probably solutions posted somewhere but I add one solution here to make it easier to find.</div>
<div>Before making any gets for data, use the following call:</div>
<p>em.getEntityManagerFactory().getCache().evictAll();</p>
<p>This seems to work for all cache settings and forces all caches to be cleared.  Subsequent calls to get data result in getting the latest committed data in the database. This may not be the most efficient way, but it always gets the latest data. For high systems requiring high performance, this won&#8217;t wok very well. It would be better to refresh the cache periodically and have all clients just get the latest cached values. But there is still the issue of refreshing the entire cache.</p>
<p>Any suggestions on doing this better are appreciated. But for now, this works consistently across platforms and reasonably quick for small to moderate amounts of data.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khartig.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khartig.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khartig.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khartig.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khartig.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khartig.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khartig.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khartig.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khartig.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khartig.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khartig.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khartig.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khartig.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khartig.wordpress.com/179/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=179&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khartig.wordpress.com/2011/10/23/clearing-cache-in-jpa-2-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f7c5df1ce75de5a4532fa9dbac529f4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kevin</media:title>
		</media:content>
	</item>
		<item>
		<title>User Feedback in Design</title>
		<link>http://khartig.wordpress.com/2011/09/22/user-feedback-in-design/</link>
		<comments>http://khartig.wordpress.com/2011/09/22/user-feedback-in-design/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 14:59:08 +0000</pubDate>
		<dc:creator>khartig</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[social media]]></category>
		<category><![CDATA[test driven design]]></category>
		<category><![CDATA[user feedback]]></category>
		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://khartig.wordpress.com/?p=170</guid>
		<description><![CDATA[The difference between an easy to use and useful application and one that you&#8217;re forced to struggle with, usually directly correlates with whether or not  the application was designed and built considering user input during the course of development. This applies both to user interface design and application functions. Original ideas come from project stakeholders [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=170&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The difference between an easy to use and useful application and one that you&#8217;re forced to struggle with, usually directly correlates with whether or not  the application was designed and built considering user input during the course of development. This applies both to user interface design and application functions. Original ideas come from project stakeholders and they drive the project. Users evaluate features and ease of use in the context of what they wish to accomplish. Their feedback drives the implementation. With as much as 75% of Facebook users unhappy with the changes introduced 21 Sept 2011, it&#8217;s safe to say that their user base did not have much input during the development of the latest release. Facebook now has an earful of feedback. Let this be a prominent example showing the importance of:</p>
<ul>
<li>knowing who your users are,</li>
<li>knowing what your users wish to accomplish,</li>
<li>understanding what makes your users&#8217; tasks simple and efficient to accomplish,</li>
<li>listening to your users for product success!</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khartig.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khartig.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khartig.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khartig.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khartig.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khartig.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khartig.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khartig.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khartig.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khartig.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khartig.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khartig.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khartig.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khartig.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=170&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khartig.wordpress.com/2011/09/22/user-feedback-in-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f7c5df1ce75de5a4532fa9dbac529f4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kevin</media:title>
		</media:content>
	</item>
		<item>
		<title>The Importance of Distributed Systems Development</title>
		<link>http://khartig.wordpress.com/2009/09/21/the-importance-of-distributed-systems-development/</link>
		<comments>http://khartig.wordpress.com/2009/09/21/the-importance-of-distributed-systems-development/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 22:35:17 +0000</pubDate>
		<dc:creator>khartig</dc:creator>
				<category><![CDATA[distributed computing]]></category>
		<category><![CDATA[Artificial intelligence]]></category>
		<category><![CDATA[Berkeley Open Infrastructure for Network Computing]]></category>
		<category><![CDATA[BOINC]]></category>
		<category><![CDATA[Central processing unit]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[collective intelligence]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[DHT]]></category>
		<category><![CDATA[Free. The Future of a Radical Pric]]></category>
		<category><![CDATA[Gelernter]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Mirror World]]></category>
		<category><![CDATA[Mobile phone]]></category>
		<category><![CDATA[SKA telescope]]></category>

		<guid isPermaLink="false">http://khartig.wordpress.com/?p=151</guid>
		<description><![CDATA[In an age of ever increasing information collection and the need to evaluate it, building systems which utilize the yet untapped and available compute resources in everyone&#8217;s home and hands  should be driving the development of more sophisticated distributed computing systems. Today, large data processing facilities provide significant compute capabilities. Utilizing the worldwide plethora of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=151&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In an age of ever increasing information collection and the need to evaluate it, building systems which utilize the yet untapped and available compute resources in everyone&#8217;s home and hands  should be driving the development of more sophisticated distributed computing systems. Today, large data processing facilities provide significant compute capabilities. Utilizing the worldwide plethora of distributed resources in a coherent way is much more powerful.</p>
<p>Distributed programming and processing tools and techniques are currently a reality but are in their infancy. Potential rapid growth of distributed systems is already supported by:</p>
<ul>
<li>Storage, bandwidth and CPUs staying on course to becoming nearly free. (<a href="//www.amazon.com/Free-Future-Radical-Chris-Anderson/dp/1401322905">Free. The Future of a Radical Price</a>)</li>
<li>The number of people and devices connected to the internet continually grows.</li>
<li>Data storage requirements increase as data accumulation from all sources grows as does the number of sources.</li>
</ul>
<p>It is becoming more  common to see Terabyte storage devices in homes. Desktop and laptop appliances have become somewhat of a commodity affordable to your average consumer. You can stake out claim to a table for a period of time at your local coffee shop and access the internet for free. Becoming a social citizen on the internet with portable compute resource was once cost prohibitive and is now plummeting to a price affordable to a significant portion of the population.</p>
<p>Distribution of affordable, cheap and free compute devices to the general public continues to grow. Most of the resources sit idle much of the time. Game consoles, cell phones, laptops, desktops, etc. can now all participate in the storage and processing of data.</p>
<p>Like it or not, the ability to capture and share data is becoming increasingly easy. You can <a href="http://www.friendagorilla.org/">watch your favorite gorilla in the jungle</a> or use <a href="http://www.amazon.com/Programming-Collective-Intelligence-Building-Applications/dp/0596529325">collective intelligence</a> to extract social and individual&#8217;s patterns with service apis provided by large corporations like Google and Amazon. Today&#8217;s transient data coming from sources in real time will eventually be stored. Much of the data is and will be captured and stored in perpetuity at corporate web sites and in data centers. Some of what should be available may be accessible through the gates of these data centers.</p>
<p>The approach to managing and controlling processing remains focused on huge data centers. In this sense, social and engineering thought is still akin to 19th century practice of building monolithic systems with centralized control. As data generation increases and the cost of storage decreases, huge data centers are being built to house and process data. Google, Apple, Codera and NTT America to name just a few. What will they do with all this data and how much will be shared?</p>
<p>IBM announced its plans to build a petaflop machine for the <a href="http://www.computerworld.com.au/article/319128/ska_telescope_provide_billion_pcs_worth_processing">SKA telescope program</a>. It is a laudable and beneficial effort. Undoubtedly, research and lessons learned from the effort will be valuable. But efforts should be made to build distributed systems of equal or greater benefit. Efforts such as <a href="http://boinc.berkeley.edu/">BOINC</a> provide a rudimentary effective start. File sharing peers using <a href="http://en.wikipedia.org/wiki/Distributed_hash_table">DHT</a> have already demonstrated power and influence. Both illustrate cost effective usage of existing distributed compute resources where most data is accessible to everyone.</p>
<p>Distributed Computing is in its infancy (I&#8217;m not referring to Cloud Computing). A number of technologies supporting distributed computing have been developed. Some have survived and some waned. A sophisticated distributed system is on par with the importance of nanotechnologies and artificial intelligence. It will support those other technologies as well. It has the potential to distribute energy needs for processing rather than requiring a power plant dedicated to running a data center. It has the potential to distribute data storage so it&#8217;s never lost and provides a means for individuals to control their own personal information. It has the potential to provide mechanisms which capture data in real time and process as needed where needed with most efficient usage of resources. In so doing, mirroring the real world (ala Gelernter&#8217;s <a href="http://www.amazon.com/Mirror-Worlds-Software-Universe-Shoebox-How/dp/019507906X">Mirror World</a>).</p>
<p>So although building data center citadels and powerful HPC computers is valuable so is developing and building sophisticated  distributed computing systems. In fact, it&#8217;s likely much more important.</p>
<div class="zemanta-pixie" style="margin-top:10px;height:15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/6d7a2c87-8572-4713-922d-8372641bda98/"><img class="zemanta-pixie-img" style="border:medium none;float:right;" src="http://img.zemanta.com/reblog_e.png?x-id=6d7a2c87-8572-4713-922d-8372641bda98" alt="Reblog this post [with Zemanta]" /></a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khartig.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khartig.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khartig.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khartig.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khartig.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khartig.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khartig.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khartig.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khartig.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khartig.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khartig.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khartig.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khartig.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khartig.wordpress.com/151/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=151&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khartig.wordpress.com/2009/09/21/the-importance-of-distributed-systems-development/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f7c5df1ce75de5a4532fa9dbac529f4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kevin</media:title>
		</media:content>

		<media:content url="http://img.zemanta.com/reblog_e.png?x-id=6d7a2c87-8572-4713-922d-8372641bda98" medium="image">
			<media:title type="html">Reblog this post [with Zemanta]</media:title>
		</media:content>
	</item>
		<item>
		<title>TED 2009 and Distributed Computing</title>
		<link>http://khartig.wordpress.com/2009/02/06/ted-2009-and-distributed-computing/</link>
		<comments>http://khartig.wordpress.com/2009/02/06/ted-2009-and-distributed-computing/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 00:30:13 +0000</pubDate>
		<dc:creator>khartig</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[2009]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[data mining]]></category>
		<category><![CDATA[distributed computing]]></category>
		<category><![CDATA[grid computing]]></category>
		<category><![CDATA[Ted]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://khartig.wordpress.com/?p=132</guid>
		<description><![CDATA[The 2009 TED conference was this week. This is its 25th year although the first time I have heard of it thanks to Twitter mostly and those twittering the experience. I didn&#8217;t attend but monitored the activities and sessions some. It is a gathering and sharing of great minds, their visions, aspirations and creations in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=132&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://conferences.ted.com/TED2009/">2009 TED conference</a> was this week. This is its 25th year although the first time I have heard of it thanks to <a href="http://www.twitter.com">Twitter </a>mostly and those twittering the experience. I didn&#8217;t attend but monitored the activities and sessions some. It is a gathering and sharing of great minds, their visions, aspirations and creations in both science and art.  I hope to be able to attend in person at some point.</p>
<p>With all the talk and demos about technological advances and the need to capture, mine and process the vast amounts of electronic data produced, I&#8217;m surprised there was no mention of harnessing the compute power available in phones, desktops, clouds, supercomputers, and all devices everywhere. Also, how that might be done. Maybe I missed it (since I wasn&#8217;t there) or maybe it wasn&#8217;t the proper forum for that kind of discussion, but it seems to me that it was glaringly missing.</p>
<p>If anyone knows about such discussions taking place at the conference in sessions or even breakout groups, I am interested in finding out about them.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khartig.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khartig.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khartig.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khartig.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khartig.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khartig.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khartig.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khartig.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khartig.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khartig.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khartig.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khartig.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khartig.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khartig.wordpress.com/132/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=132&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khartig.wordpress.com/2009/02/06/ted-2009-and-distributed-computing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f7c5df1ce75de5a4532fa9dbac529f4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kevin</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing Puppet on Solaris</title>
		<link>http://khartig.wordpress.com/2009/01/30/installing-puppet-on-solaris/</link>
		<comments>http://khartig.wordpress.com/2009/01/30/installing-puppet-on-solaris/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 19:15:02 +0000</pubDate>
		<dc:creator>khartig</dc:creator>
				<category><![CDATA[distributed computing]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[blastwave]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[gpg]]></category>
		<category><![CDATA[idempotency]]></category>
		<category><![CDATA[idempotent]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[James Turnbull]]></category>
		<category><![CDATA[manifest]]></category>
		<category><![CDATA[pkg-get]]></category>
		<category><![CDATA[puppet]]></category>
		<category><![CDATA[puppetd]]></category>
		<category><![CDATA[puppetmasterd]]></category>
		<category><![CDATA[recipes]]></category>
		<category><![CDATA[reductive labs]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[system administration]]></category>
		<category><![CDATA[wget]]></category>

		<guid isPermaLink="false">http://khartig.wordpress.com/?p=124</guid>
		<description><![CDATA[There are a number of sites with information about installing Puppet on Solaris. They each contain slightly different instructions which get you most of the way there. With a little finesse it&#8217;s not hard to follow the instructions and get things working. This post includes yet another set of instructions for installing Puppet and getting [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=124&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are a number of sites with information about installing Puppet on Solaris. They each contain slightly different instructions which get you most of the way there. With a little finesse it&#8217;s not hard to follow the instructions and get things working. This post includes yet another set of instructions for installing Puppet and getting things running. Hopefully with these instructions and others as reference your installation goes smoothly.</p>
<p>For those who are unfamiliar with Puppet, it is a tool for automating system administration. It is built and supported by <a href="http://reductivelabs.com">Reductive Labs</a>. They describe Puppet as  a <strong>declarative language</strong> for expressing system configuration, a <strong>client and server</strong> for distributing it, and a <strong>library</strong> for realizing the configuration. Rather than a system administrator having to follow procedures, run scripts and configure things by hand, Puppet enables defining a configuration and automatically applies it to specified servers and then maintains it. Puppet can be downloaded for many of the most popular operating systems. There is a <a href="http://reductivelabs.com/trac/puppet/wiki/DownloadingPuppet">download page </a>with links to some installation instructions.</p>
<h2>Installation on Solaris</h2>
<p>1. To make installation more automated, install the Solaris package pkg-get. This tool simplifies getting the latest version of packages from a known site. A copy can be found at  <a href="http://www.blastwave.org">Blastwave</a>.</p>
<p>download <a rel="nofollow" href="http://www.blastwave.org/pkg_get.pkg">http://www.blastwave.org/pkg_get.pkg</a> to /tmp<br />
Make sure the installation is done with root privilege. su to root.<br />
run the following command from the /tmp directory</p>
<p># pkgadd -d pkg_get.pkg</p>
<p>The package can also be added using the following command</p>
<p>#pkgadd -d http://www.opencsw.org/pkg_get.pkg</p>
<p>2) Verify that the pkg-get configuration file is configured for your region. In this case in the U.S. Change the default download site in the configuration file /opt/csw/etc/pkg-get.conf to:</p>
<p>url=<a rel="nofollow" href="http://www.ibiblio.org/pub/packages/solaris/opencsw/stable">http://www.ibiblio.org/pub/packages/solaris/opencsw/stable</a></p>
<p>or</p>
<p>url=<a rel="nofollow" href="http://www.ibiblio.org/pub/packages/solaris/opencsw/stable">http://www.ibiblio.org/pub/packages/solaris/opencsw/current</a></p>
<p>3) Add some new directories to your path.  pkg-get, wget and gpg are installed in /opt/csw/bin.</p>
<p># export PATH=/opt/csw/bin:/opt/csw/sbin:/usr/local/bin:$PATH</p>
<p>4) Install the complete wget package. wget is a tool GNU tool used to download and install packages from the web. This is a very useful tool to automate installs and software updates. This tool will be used by pkg-get.</p>
<p># pkg-get -i wget</p>
<p>Note:</p>
<p>If you haven&#8217;t installed the entire Solaris OS, the pkg-get may fail to install wget, with the error:</p>
<p>&#8220;no working version of wget found, in PATH&#8221;</p>
<p>This is probably due to missing  SUNWwgetr and SUNWwgetu packages. Install them by inserting an installation DVD disk into the DVDROM and mount it to /media/xxxx</p>
<p>Install the Solaris packages</p>
<p><span># </span>pkgadd -d . SUNWwgetr<span><br />
</span># pkgadd -d . SUNWwgetu</p>
<p>5) Configure pkg-get to support automation.</p>
<p># cp -p /var/pkg-get/admin-fullauto /var/pkg-get/admin</p>
<p>6) Install gnupg and an md5 utility so security validation of Blastwave packages can be done.</p>
<p># pkg-get -i gnupg textutils</p>
<p>You may also need to define $LD_LIBRARY_PATH to /usr/sfw/lib to find needed libraries.</p>
<p>7) Copy the Blastwave PGP public key to the local host.</p>
<p># wget &#8211;output-document=pgp.key <a rel="nofollow" href="http://www.blastwave.org/mirrors.html">http://www.blastwave.org/mirrors.html</a></p>
<p>8) Import pgp key</p>
<p># gpg &#8211;import pgp.key</p>
<p>9) Verify that the following two lines in /opt/csw/etc/pkg-get.conf are COMMENTED OUT.</p>
<p>#use_gpg=false<br />
#use_md5=false</p>
<p>10) Puppet is build with Ruby. Install the Ruby software (CSWruby) from Blastwave.</p>
<p># pkg-get -i ruby</p>
<p>11) Install the Ruby Gems software (CSWrubygems) from Blastwave.</p>
<p># pkg-get -i rubygems</p>
<p>12) Update to the latest versions and install a the gems used by Puppet</p>
<p># gem update &#8211;system</p>
<p># gem install facter</p>
<p># gem install puppet &#8211;version &#8217;0.24.7&#8242;</p>
<p>or current version. The gem update command can also be used to update the software.</p>
<p># gem update puppet</p>
<p>13) Create the puppet user and group:</p>
<p>Info to add in /etc/passwd: puppet:x:35001:35001:puppet user:/home/puppet:/bin/sh<br />
Info to add in /etc/shadow: puppet:LK:::::::<br />
Info to add in /etc/group: puppet::35001:</p>
<p>14) Create the following core directories and set the permissions:</p>
<p># mkdir -p /sysprov/dist/apps /sysprov/runtime/puppet/prod/puppet/master<br />
# chown -R puppet:puppet /sysprov/dist /sysprov/runtime</p>
<p>15) add puppet configuration definitions in /etc/puppet/puppet.conf. The initial content using your own puppetmaster hostname should be:</p>
<p>[puppetd]<br />
server = myserver.mycompany.com<br />
report = true</p>
<p>16) Repeat this process for the servers which will run Puppet. At least 2 should be set up. One will be the Master Puppet server, the other a Puppet client server that will be managed.</p>
<h2>Validating the Installation and Configuring Secure Connections</h2>
<p>To verify that the Puppet installation is working as expected, pick a single client to used as a testbed. With Puppet installed on that machine, run a single client against the central server to verify that everything is working correctly.</p>
<p>Start the master puppet daemon on the server defined in puppet.conf files.</p>
<p># puppetmasterd &#8211;debug</p>
<p>Start the first client in verbose mode, with the &#8211;waitforcert flag enabled. The default server name for puppetd is Puppet. Use the server flag and define the server name running puppetmasterd. Later the server hostname can be added to the configuration file.</p>
<p># puppetd &#8211;server myserver.mycompany.com &#8211;waitforcert 60 &#8211;test<br />
Adding the &#8211;test flag causes puppetd to stay in the foreground, print extra output, only run once and then exit, and to just exit if the remote configuration fails to compile (by default, puppetd will use a cached configuration if there is a problem with the remote manifests).<br />
Running the client should produce a message like:</p>
<p>info: Requesting certificate<br />
warning: peer certificate won&#8217;t be verified in this SSL session<br />
notice: Did not receive certificate</p>
<p>This message will repeat every 60 seconds with the above command. This is normal, since your server is not initially set up to auto-sign certificates as a security precaution. On your server running puppetmasterd, list the waiting certificates:</p>
<p># puppetca &#8211;list</p>
<p>You should see the name of the test client. Now go ahead and sign the certificate:</p>
<p># puppetca &#8211;sign myserver.mycompany.com</p>
<p>The test client should receive its certificate from the server, receive its configuration, apply it locally, and exit normally.<br />
By default, puppetd runs with a waitforcert of five minutes; set the value to the desired number of seconds or to 0 to disable it entirely.</p>
<p>Getting this far, you now have puppet installed with a base initial configuration and secure connections defined between a Puppet master server and one puppet client server. At this point you can start defining manifests for desired server configurations.</p>
<p>There are various sample recipes and manifest to start working with. Viewing and editing some of thes is a good place to start learning how to create configuration defintions. If there is interest I can share sample as well if I have one that may be useful for your needs.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khartig.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khartig.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khartig.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khartig.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khartig.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khartig.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khartig.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khartig.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khartig.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khartig.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khartig.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khartig.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khartig.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khartig.wordpress.com/124/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=124&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khartig.wordpress.com/2009/01/30/installing-puppet-on-solaris/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f7c5df1ce75de5a4532fa9dbac529f4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kevin</media:title>
		</media:content>
	</item>
		<item>
		<title>US Government Cites Cloud Computing as Part of Change</title>
		<link>http://khartig.wordpress.com/2009/01/26/us-government-cites-cloud-computing-as-part-of-change/</link>
		<comments>http://khartig.wordpress.com/2009/01/26/us-government-cites-cloud-computing-as-part-of-change/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 00:00:58 +0000</pubDate>
		<dc:creator>khartig</dc:creator>
				<category><![CDATA[distributed computing]]></category>
		<category><![CDATA[bandwagon]]></category>
		<category><![CDATA[change]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[technology innovation and governmental reform]]></category>
		<category><![CDATA[US Government]]></category>

		<guid isPermaLink="false">http://khartig.wordpress.com/?p=114</guid>
		<description><![CDATA[Typically &#8216;Change in Government&#8217; is an oxymoron. It has been a mantra in the U.S. for past months. I&#8217;m all for changing things for the benefit of everyone. I&#8217;m positive about things becoming better in the next 4-8 years. I would like to be part of the positive changes. But claiming that Cloud Computing will [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=114&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Typically &#8216;Change in Government&#8217; is an oxymoron. It has been a mantra in the U.S. for past months. I&#8217;m all for changing things for the benefit of everyone. I&#8217;m positive about things becoming better in the next 4-8 years. I would like to be part of the positive changes. But claiming that Cloud Computing will be a positive change in how people work with the government is just plain marketing hype and jumping on the technology bandwagon.</p>
<span style="text-align:center; display: block;"><a href="http://khartig.wordpress.com/2009/01/26/us-government-cites-cloud-computing-as-part-of-change/"><img src="http://img.youtube.com/vi/InI5n3NTvR4/2.jpg" alt="" /></a></span>
<p>This is just another example of a perceived (marketed) new technology that will solve our problems. Don&#8217;t hold your breath. Things don&#8217;t Change overnight. Cloud Computing is not a panacea for computing problems. It is an architecture perspective that can be leveraged for specific computing needs. There are a number of good application implementations using this architecture approach. However it&#8217;s not appropriate to force everything into this box.</p>
<p>In the case of the government and many corporations, existing applications can&#8217;t be easily ported over to Cloud Computing. Application software needs to be re-engineered or built from scratch to take best advantage of the cloud model.  There are small pockets of innovation in government and large industry. It&#8217;s typically sequestered off in a corner, has a hard time making headway and gets quickly surpassed by more agile small companies. This has been the scenario with most all new technologies and ideas.</p>
<p>Will the government&#8217;s use of Cloud Compuing introduce change? Hmm, maybe. Certainly not though if there is no substance behind the marketing hype.  And certainly not if they try implementing this from within the oragnization rather than using innovative startups. For anyone else considering Cloud Computing, make sure you understand what it is and why you want to use it. Then make sure you and others will benefit from your use of it. Otherwise your just spreading the hype and jumping on the bandwagon.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khartig.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khartig.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khartig.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khartig.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khartig.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khartig.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khartig.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khartig.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khartig.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khartig.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khartig.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khartig.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khartig.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khartig.wordpress.com/114/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=114&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khartig.wordpress.com/2009/01/26/us-government-cites-cloud-computing-as-part-of-change/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f7c5df1ce75de5a4532fa9dbac529f4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kevin</media:title>
		</media:content>
	</item>
		<item>
		<title>Moving Away from a Statically Defined Distributed Environment</title>
		<link>http://khartig.wordpress.com/2009/01/14/moving-away-from-a-statically-defined-distributed-environment/</link>
		<comments>http://khartig.wordpress.com/2009/01/14/moving-away-from-a-statically-defined-distributed-environment/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 17:02:26 +0000</pubDate>
		<dc:creator>khartig</dc:creator>
				<category><![CDATA[distributed computing]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[Data center]]></category>
		<category><![CDATA[File sharing]]></category>
		<category><![CDATA[network overlay]]></category>
		<category><![CDATA[Peer-to-peer]]></category>

		<guid isPermaLink="false">http://khartig.wordpress.com/?p=105</guid>
		<description><![CDATA[Most distributed computing environments consist of a set of known devices in well known configurations. The devices are usually cataloged somewhere in a database by a person. If the state of the environment changes by a server being removed, replaced or taken offline, the database must be updated. This kind of environment I refer to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=105&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Most distributed computing environments consist of a set of known devices in well known configurations. The devices are usually cataloged somewhere in a database by a person. If the state of the environment changes by a server being removed, replaced or taken offline, the database must be updated. This kind of environment I refer to as Statically Defined and inflexible.</p>
<p>This is a feasible way of accounting for a small number of machines in a network. However as data centers grow in dimensions to 100s or thousands of servers and as all computing devices begin to randomly come and go, keeping track of changes must become dynamic.</p>
<p>Assumptions in software architecture are typically made with the expectation that there will always be access to a desired server at a known location. To handle a worst case scenario it&#8217;s typical to configure clusters of servers  in case one fails and the software architect can ignore failures.  This only marginally protects against failures. More realistic designs must account for the fact that most anything can fail and any given moment. The architects philosophy should be that all things will fail and all failures should be handled.</p>
<p>Consider an architecture that represents a system that is hard to shut down rather than one representing handling a few failure scenarios. One such architecture represents the <a class="zem_slink" title="Peer-to-peer" rel="wikipedia" href="http://en.wikipedia.org/wiki/Peer-to-peer">peer-to-peer</a> (p2p) file sharing systems executing across the internet. From the perspective of any client, the system is always running and available. As long as the client has access to the internet, accessing shared files is almost always possible.</p>
<p>Core to p2p architecture is a <a href="http://khartig.wordpress.com/2008/07/02/network-overlays/">network overlay</a> using distributed hash table algorithms to manage mappings of hosts across the internet which dynamically join and leave.  Add to this</p>
<ul>
<li>a mechanism to determine the attributes of the server such as hardware, OS, storage capacity, etc.,</li>
<li>software deployment and installation capabilities  at each host,</li>
<li>an algorithm to match services to a host that is best suited for executing the service</li>
<li>monitoring capabilities to insure services are executing to defined SLAs</li>
</ul>
<p>Then you have an architecture that dynamically scales and maintains itself. <a href="http://assimilator.sourceforge.net/">Assimilator </a>is one of the few systems that is capable of doing this today.</p>
<p>Some Cloud Computing vendors claim massive scaling capabilities. This of course assumes the vendor has many thousands of server and that clients have statically defined usage of servers in advance. True massive scaling will come with resources that are allocated automatically and managed dynamically without human intervention.</p>
<div class="zemanta-pixie" style="margin-top:10px;height:15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/7712d927-e619-4eeb-b712-f86753f066ba/"><img class="zemanta-pixie-img" style="border:medium none;float:right;" src="http://img.zemanta.com/reblog_e.png?x-id=7712d927-e619-4eeb-b712-f86753f066ba" alt="Reblog this post [with Zemanta]" /></a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khartig.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khartig.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khartig.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khartig.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khartig.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khartig.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khartig.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khartig.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khartig.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khartig.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khartig.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khartig.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khartig.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khartig.wordpress.com/105/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=105&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khartig.wordpress.com/2009/01/14/moving-away-from-a-statically-defined-distributed-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f7c5df1ce75de5a4532fa9dbac529f4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kevin</media:title>
		</media:content>

		<media:content url="http://img.zemanta.com/reblog_e.png?x-id=7712d927-e619-4eeb-b712-f86753f066ba" medium="image">
			<media:title type="html">Reblog this post [with Zemanta]</media:title>
		</media:content>
	</item>
		<item>
		<title>Perian codecs for QuickTime on Mac OS X</title>
		<link>http://khartig.wordpress.com/2009/01/09/perian-codecs-for-quicktime-on-mac-os-x/</link>
		<comments>http://khartig.wordpress.com/2009/01/09/perian-codecs-for-quicktime-on-mac-os-x/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 23:22:29 +0000</pubDate>
		<dc:creator>khartig</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[codecs]]></category>
		<category><![CDATA[MacBook Pro]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Perian]]></category>
		<category><![CDATA[QuickTime]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://khartig.wordpress.com/?p=108</guid>
		<description><![CDATA[In searching for some needed codecs for QuickTime to play avi files ripped from DVDs  on my Macbook Pro, I ran across Perian &#8216;The swiss-army knife for QuickTime&#8217;. Perian includes video and audio codecs for many common formats. It&#8217;s simple to use! Download the disk image, open it, double click the Perian.prefPane icon and all [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=108&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In searching for some needed codecs for QuickTime to play avi files ripped from DVDs  on my Macbook Pro, I ran across <a href="http://perian.org">Perian </a>&#8216;The swiss-army knife for QuickTime&#8217;. Perian includes video and audio codecs for many common formats.</p>
<p>It&#8217;s simple to use! Download the disk image, open it, double click the Perian.prefPane icon and all the components are automatically installed in the correct directories. All the video and audio plays properly for me.</p>
<p>Hats off to the Perian Project Team for a great job!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khartig.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khartig.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khartig.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khartig.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khartig.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khartig.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khartig.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khartig.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khartig.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khartig.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khartig.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khartig.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khartig.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khartig.wordpress.com/108/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=108&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khartig.wordpress.com/2009/01/09/perian-codecs-for-quicktime-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f7c5df1ce75de5a4532fa9dbac529f4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kevin</media:title>
		</media:content>
	</item>
		<item>
		<title>Dynamic Schema and Database Table Creation with Netbeans, Hibernate and EJB3</title>
		<link>http://khartig.wordpress.com/2008/12/20/dynamic-schema-and-database-creation-with-netbeans-hibernate-and-ejb3/</link>
		<comments>http://khartig.wordpress.com/2008/12/20/dynamic-schema-and-database-creation-with-netbeans-hibernate-and-ejb3/#comments</comments>
		<pubDate>Sat, 20 Dec 2008 22:51:50 +0000</pubDate>
		<dc:creator>khartig</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[automatic database creation]]></category>
		<category><![CDATA[database modeling]]></category>
		<category><![CDATA[ejb3]]></category>
		<category><![CDATA[entities]]></category>
		<category><![CDATA[entity]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[inheritance strategy]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://khartig.wordpress.com/?p=56</guid>
		<description><![CDATA[Overview There are plenty of examples describing how to build applications from existing database content using various tools and techniques. The assumption in the examples is that either the developer must use a legacy database or that the application is being built from the perspective of data modeling with an existing database. Some examples include: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=56&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Overview</h2>
<p>There are plenty of examples describing how to build applications from existing database content using various tools and techniques. The assumption in the examples is that either the developer must use a legacy database or that the application is being built from the perspective of data modeling with an existing database. Some examples include:</p>
<ul>
<li><a href="http://www.netbeans.org/kb/docs/web/hibernate-jpa.html">Using Hibernate with the Java Persistence API</a></li>
<li><a href="http://www.netbeans.org/kb/60/web/customer-book.html">Using Java Persistence in a Web Application</a></li>
</ul>
<p>But what if you want to build the logical data model defining classes first and you don&#8217;t have a pre-built database? You want to define only the object model with attributes and operations that make sense for the application in terms of business requirements and not have to be concerned with database entities and the corresponding relationships. Also you need serialized objects that can be easily passed between servers and clients. This article describes a way to define the logical business model first and dynamically create the corresponding schema, database and scripts which can be used to manage the database. It also briefly covers using inheritance strategies which can be applied in the creation of a database.</p>
<p>This example was built with</p>
<ul>
<li>Netbeans 6.5</li>
<li>Java 6</li>
</ul>
<p>The project files are located <a href="http://assimilator.sourceforge.net/misc/CyclingTeam.zip">at my open source Assimilator project site</a>.</p>
<h2>The Model</h2>
<p>A simple model for  cycling teams is constructed in this example.  Represented are teams, team members and an inheritance structure for different types a bicycles that a team member may have. The UML class diagram for the logical object model looks like.</p>
<div id="attachment_68" class="wp-caption alignnone" style="width: 619px"><img class="size-full wp-image-68" title="Cycling Teams Class Diagram" src="http://khartig.files.wordpress.com/2008/12/cyclingteamsclassdiagram1.png?w=480" alt="Cycling Teams Class Diagram"   /><p class="wp-caption-text">Cycling Teams Class Diagram</p></div>
<p>Each team has a set of members, each member is designated a specific type and each member can have a set of associated bicycles. Bicycle is an abstract base class and there are three concrete classes which extend Bicycle.</p>
<h2><strong>Defining the Database Connection</strong></h2>
<p>Create a new database for the cycling team information &#8230;</p>
<ol>
<li>In Netbeans, click on the Services tab,</li>
<li>right-click on JavaDB and select Create Database&#8230;</li>
<li>fill in the dialog with the following information (the database location will be in the default Netbeans install directories)</li>
<li>click OK</li>
</ol>
<div id="attachment_59" class="wp-caption alignnone" style="width: 478px"><img class="size-full wp-image-59" title="createjavadb" src="http://khartig.files.wordpress.com/2008/12/createjavadb.png?w=480" alt="Create Java DB"   /><p class="wp-caption-text">Create Java DB</p></div>
<ol>
<li>right-click on Databases</li>
<li>select create Database connection</li>
<li>fill in the dialog with the values defined using the user name and password assigned while creating the database</li>
<li>add &#8216;create=true&#8217; in the Additional Props field</li>
<li>select OK which makes the Advanced settings visible</li>
<li>enter CYCLING for the schema type</li>
<li>select OK</li>
</ol>
<div id="attachment_62" class="wp-caption alignnone" style="width: 478px"><img class="size-full wp-image-62" title="dbconnection" src="http://khartig.files.wordpress.com/2008/12/dbconnection.png?w=480" alt="Database Connection"   /><p class="wp-caption-text">Database Connection</p></div>
<p>The new connection should show up in the connection list.</p>
<h2><strong>Creating the Netbeans Project</strong></h2>
<h3>Project Creation</h3>
<p>A compressed file containing all the Netbeans project files is include with this post. Uncompress the file and open the project with Netbeans using File-&gt;Open Project and open the uncompress project file.</p>
<p>Alternatively you create a new project and add in the files from the included archive. To create a new projects</p>
<ol>
<li>select File-&gt;New Project&#8230;</li>
<li>select Java category and Java Application Project type</li>
<li>select the Next button</li>
<li>enter CyclingTeam for the project</li>
<li>define the directory location to store the project files</li>
<li>deselect Create Main Class and Set as Main Project</li>
<li>select the Finish Button</li>
</ol>
<p><img class="alignnone size-full wp-image-94" title="newproject" src="http://khartig.files.wordpress.com/2008/12/newproject.png?w=480" alt="newproject"   /></p>
<p><img class="alignnone size-full wp-image-93" title="newjavaapp" src="http://khartig.files.wordpress.com/2008/12/newjavaapp.png?w=480" alt="newjavaapp"   /></p>
<h3><strong>Libraries</strong></h3>
<p>To compile and run the code Hibernate and JavaDB libraries need to be included in the project settings. These libraries are included with the sample project file.</p>
<ol>
<li>right-click on the project icon and select Properties</li>
<li>select Libraries from in the Categories panel and</li>
<li>select the Compile tab</li>
<li>click the Add Jar/Folder&#8230; button and add all the jar files from the hibernate-support directory and the javaee.jar</li>
<li>select relative path</li>
<li>Click the Choose button</li>
<li>add the same libraries under the Run Tests tab</li>
<li>add the JUnit 4.5 library under the Compile Test tab</li>
<li>click OK on the properties dialog box</li>
</ol>
<div id="attachment_85" class="wp-caption alignnone" style="width: 478px"><img class="size-full wp-image-85" title="projectlibs" src="http://khartig.files.wordpress.com/2008/12/projectlibs.png?w=480" alt="Project Library Settings"   /><p class="wp-caption-text">Project Library Settings</p></div>
<h2><strong>Coding</strong></h2>
<h3>Implementing the Business Model</h3>
<p>All the code for this project is included in the project file. There are a few things to note about the source code. Following the logical model, first create the the CyclingTeams class. Creating this class using the Netbeans wizards is an easy way to be guided through the creation of persistence unit file.</p>
<ol>
<li>right-click the project CyclingTeams Source Package</li>
<li>select new entity class</li>
<li>enter CyclingTeam for the classname</li>
<li>com.sample.cycling for the package name</li>
<li>Long for the Primary key type</li>
<li>click on the Create Persistence Unit button</li>
<li>in the new dialog box enter CyclingTeamsPU for the Persistence Unit Name</li>
<li>select Hibernate for the Persistence Provider</li>
<li>on the Data Source pull-down menu select New Data Source</li>
<li>enter CyclingTeams for the JNDI name</li>
<li>select the CyclingTeams database connection</li>
<li>click OK</li>
<li>click Create</li>
<li>click Finish</li>
</ol>
<p>This example uses EJB3 annotations. Every class defined in this example corresponds to an entity so is tagged with the @Entity annotation at the beginning of the class definition. Also,  classes have an @Id annotation defined on the variable to be used as the database key value. In this example, the strategy for generating the value is Auto which is the default value.</p>
<p>In the CyclingTeam class, in addition to the code generated by the wizard, add the following code:</p>
<pre>@OneToMany(cascade = CascadeType.ALL, fetch=FetchType.EAGER)
    Collection&lt;TeamMember&gt; teamMembers;

    public Collection&lt;TeamMember&gt; getTeamMembers() {
        return teamMembers;
    }

    public void setTeamMembers(Collection&lt;TeamMember&gt; teamMembers) {
        this.teamMembers = teamMembers;</pre>
<p>The class contains a Collection of TeamMembers. The OneToMany annotation defines a many-valued association with one-to-many multiplicity to be used in the database schema. The cascade type defines which  operations that must be cascaded to   the target of the association. In this case, all operations. Fetch defines that the association must be eagerly fetched rather than the default lazily loaded. The corresponding getter and setter methods are defined. The TeamMember class also has a collection of Bicycles defined in the same way with annotations.</p>
<p>Notice that an @Id is defined in the Bicycle abstract base class but not in the other concrete bicycle classes. The key value only needs to be defined in the base class.</p>
<p><strong>Note.</strong> At the time of writing, the Hibernate JPA persistence provider has some known issues that can cause problems. While not specific to NetBeans, these issues can be worked around by choosing <tt>eager</tt> as the association fetch value [@OneToMany(cascade = CascadeType.ALL, fetch=FetchType.EAGER] and <tt>java.util.Set</tt> as the collection type. When using the Hibernate JPA persistence provider and choosing <tt>default</tt> or <tt>lazy</tt> as the association fetch value for mapping,     an <tt>org.hibernate.LazyInitializationException</tt> exception can occur at runtime.     If you choose an association fetch value of <tt>eager</tt> and you do not     also choose <tt>java.util.Set</tt> as the collection type,     an <tt>org.hibernate.HibernateException</tt> can occur (with the message &#8220;cannot simultaneously fetch multiple bags&#8221;) at runtime. These issues pertain to the Hibernate JPA persistence provider and not to the default persistence provider.</p>
<h3>Persistence Unit</h3>
<p>The persistence.xml file generated earlier needs to have all the entity classes added. Open the file which is in the Configuration Files folder.</p>
<ol>
<li>select the Design tab</li>
<li>select Add Classes button</li>
<li>select all the classes listed in the Add Entity Class dialog box</li>
<li>select OK</li>
</ol>
<p>To add the rest of the Hibernate properties, select the XML tab and copy in the properties listed below. The entire persistence.xml file contents should looks like the following:</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"&gt;
  &lt;persistence-unit name="CyclingTeamPU" transaction-type="RESOURCE_LOCAL"&gt;
    &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;
    &lt;class&gt;com.sample.cycling.Bicycle&lt;/class&gt;
    &lt;class&gt;com.sample.cycling.CyclingTeam&lt;/class&gt;
    &lt;class&gt;com.sample.cycling.RoadBicycle&lt;/class&gt;
    &lt;class&gt;com.sample.cycling.TeamMember&lt;/class&gt;
    &lt;class&gt;com.sample.cycling.TimeTrialBicycle&lt;/class&gt;
    &lt;class&gt;com.sample.cycling.TrackBicycle&lt;/class&gt;
    &lt;properties&gt;
      &lt;property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/&gt;
      &lt;property name="hibernate.dialect" value="org.hibernate.dialect.DerbyDialect"/&gt;
      &lt;property name="hibernate.show_sql" value="false"/&gt;
      &lt;property name="hibernate.sequence" value="cycling_teams_sequence"/&gt;
      &lt;property name="hibernate.connection.url" value="jdbc:derby://localhost:1527/CyclingTeams;create=true"/&gt;
      &lt;property name="hibernate.connection.driver_class" value="org.apache.derby.jdbc.ClientDriver"/&gt;
      &lt;property name="hibernate.connection.password" value="rocks"/&gt;
      &lt;property name="hibernate.connection.username" value="cycling"/&gt;
      &lt;property name="hibernate.hbm2ddl.auto" value="create-drop"/&gt;
    &lt;/properties&gt;
  &lt;/persistence-unit&gt;
&lt;/persistence&gt;</pre>
<h3>JPA Controllers</h3>
<p>A set of classes which control access to the entities, manage the database connections and provide the base logic for correctly mapping the relationships within the business classes can be  automatically generated.</p>
<ol>
<li>right-click the CyclingTeam-ejb project icon</li>
<li>select New-&gt;Generated JPA Controller Classes from Entity Classes&#8230;</li>
<li>select Add All to include all the entity classes</li>
<li>select Next</li>
<li>set the package name to com.sample.cycling.jpacontrollers</li>
<li>select Finish</li>
</ol>
<p>Controllers define the JPA access through create, edit, destroy, and find methods. The controllers define the entity managers to use and manage the transactions. There are controllers for each entity type. Each controller manages the associations between entities as well. For example, if a CyclingTeam has a collection of associated TeamMembers  and the CyclingTeam is deleted from the database, the association references in the database are also cleaned up.</p>
<p>Additional code may need to be added to the controllers to help manage the objects in the model. Im this example a check for null Collection fields is added to the default generated code. In CyclingTeamJpaController the follwoing code was added to the create method</p>
<pre>if (cyclingTeam.getTeamMembers() == null) {
            cyclingTeam.setTeamMembers(new HashSet&lt;TeamMember&gt;());
 }</pre>
<p>Similar code is added to the create method in TeamMember to check for a null Bicycles collection.</p>
<h3>Testing</h3>
<p>Creating unit test is a useful way to exercise the code to understand how it works and to identify errors.</p>
<ol>
<li>right-click on the CyclingTeamJpaCopntroller class</li>
<li>select Tools -&gt; Create JUnit Tests&#8230;</li>
<li>use the default settings making sure the Location is set to  Test Packages</li>
<li>click ok</li>
</ol>
<p>A default unit test class is created with code generated to exercise all the methods in the CyclingTeamJpaController class. By default all the test are set to fail. They must be edited to perform the desired tests. The project file included with this post has a few edited unit test classes. The tests provide a start to understand how the JPAControllers can be called by web services or EJBs.</p>
<p>To run the unit test, right-click in the edit window of the class and select Run File.  The unit test causes the database schema to be created and test records to be inserted, read and edited.</p>
<p>To view the contents in the database, comment out the code in the teardown method of the CyclingTeamJpaController class and run the tests. Select the Services tab and open the jdbc connection for CyclingTeams. Right click on the Tables node and select Refresh. The tables created in the database should now be visible. Right-click on the CYCLINGTEAM table and select View Data. This will subit an SQL query to show all the records in the table.</p>
<h2>Creating DDL</h2>
<p>Using the hibernate tools, ddl sql scripting can be generated to create all the tables and relationships for the business model and to clean up the database with drop statement for all the generated tables. In the project build.xml file that is located in the top level directory of the project, add the following script to the end of the file.</p>
<pre>&lt;target name="-post-jar"&gt;
        &lt;path id="hibernate.tools.lib"&gt;
            &lt;pathelement path="${file.reference.antlr-2.7.6.jar}"/&gt;
            &lt;pathelement path="${file.reference.asm-attrs.jar}"/&gt;
            &lt;pathelement path="${file.reference.asm.jar}"/&gt;
            &lt;pathelement path="${file.reference.cglib-2.1.3.jar}"/&gt;
            &lt;pathelement path="${file.reference.commons-collections-2.1.1.jar}"/&gt;
            &lt;pathelement path="${file.reference.commons-logging-1.1.jar}"/&gt;
            &lt;pathelement path="${file.reference.dom4j-1.6.1.jar}"/&gt;
            &lt;pathelement path="${file.reference.ehcache-1.2.3.jar}"/&gt;
            &lt;pathelement path="${file.reference.hibernate-annotations.jar}"/&gt;
            &lt;pathelement path="${file.reference.hibernate-commons-annotations.jar}"/&gt;
            &lt;pathelement path="${file.reference.hibernate-entitymanager.jar}"/&gt;
            &lt;pathelement path="${file.reference.hibernate-tools.jar}"/&gt;
            &lt;pathelement path="${file.reference.hibernate3.jar}"/&gt;
            &lt;pathelement path="${file.reference.javassist.jar}"/&gt;
            &lt;pathelement path="${file.reference.jdbc2_0-stdext.jar}"/&gt;
            &lt;pathelement path="${file.reference.jta.jar}"/&gt;
            &lt;pathelement path="${file.reference.javaee.jar}"/&gt;
            &lt;pathelement path="${file.reference.freemarker.jar}"/&gt;
            &lt;pathelement path="${dist.jar}"/&gt;
        &lt;/path&gt;

        &lt;taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="hibernate.tools.lib" /&gt;
        &lt;hibernatetool destdir="${dist.dir}"&gt;
            &lt;jpaconfiguration persistenceunit="CyclingTeamPU"/&gt;
            &lt;classpath&gt;
                &lt;path location="${dist.jar}"/&gt;
            &lt;/classpath&gt;

            &lt;!-- Create SQL script --&gt;
            &lt;hbm2ddl outputfilename="cycling_teams_create.sql" export="false" format="true"/&gt;

            &lt;!-- Drop SQL script --&gt;
            &lt;hbm2ddl outputfilename="cycling_teams_drop.sql" export="false" create="false" drop="true" format="true"/&gt;
        &lt;/hibernatetool&gt;

    &lt;/target&gt;</pre>
<p>The target is executed after the project jar file is successfully created. Two scripts are generated in the ./dist directory.</p>
<p>cycling_teams_create.sql to create the tables,</p>
<p>cycling_teams_drop.sql to cleanup the tables.</p>
<p>These scripts are generated each time a Clean and Build is run on the project.</p>
<h2>Summary</h2>
<p>Projects requiring storing data in a database can be developed by creating the data model and database first and coding to the structure, or in this example a business object model can be created first and used to automatically generate the schema and database tables. Team skills and familiarity with various tools tend to dictate which approach is used.</p>
<p>For new projects, if you use the method described in this example, you&#8217;ll  see how development can rapidly cycle through business object model development and directly map changes to a database. Many development cycles can be done to accomodate rapid changes until the model and database structure have been normalized. The result should be a coherent object model easy to develop with serilaized objects easy to pass around  and a direct mapping to a database taking advantage of the Hibernate and EJB3 tools to help manage the data for you.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khartig.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khartig.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khartig.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khartig.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khartig.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khartig.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khartig.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khartig.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khartig.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khartig.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khartig.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khartig.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khartig.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khartig.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khartig.wordpress.com&amp;blog=2392218&amp;post=56&amp;subd=khartig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khartig.wordpress.com/2008/12/20/dynamic-schema-and-database-creation-with-netbeans-hibernate-and-ejb3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f7c5df1ce75de5a4532fa9dbac529f4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kevin</media:title>
		</media:content>

		<media:content url="http://khartig.files.wordpress.com/2008/12/cyclingteamsclassdiagram1.png" medium="image">
			<media:title type="html">Cycling Teams Class Diagram</media:title>
		</media:content>

		<media:content url="http://khartig.files.wordpress.com/2008/12/createjavadb.png" medium="image">
			<media:title type="html">createjavadb</media:title>
		</media:content>

		<media:content url="http://khartig.files.wordpress.com/2008/12/dbconnection.png" medium="image">
			<media:title type="html">dbconnection</media:title>
		</media:content>

		<media:content url="http://khartig.files.wordpress.com/2008/12/newproject.png" medium="image">
			<media:title type="html">newproject</media:title>
		</media:content>

		<media:content url="http://khartig.files.wordpress.com/2008/12/newjavaapp.png" medium="image">
			<media:title type="html">newjavaapp</media:title>
		</media:content>

		<media:content url="http://khartig.files.wordpress.com/2008/12/projectlibs.png" medium="image">
			<media:title type="html">projectlibs</media:title>
		</media:content>
	</item>
	</channel>
</rss>
