<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9456112</id><updated>2012-01-02T05:25:46.385-08:00</updated><category term='jms'/><category term='java'/><title type='text'>stty -sane</title><subtitle type='html'>unix, java, php and other computer related thoughts</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sttysane.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sttysane.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>davet</name><uri>http://www.blogger.com/profile/01754795302797477444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9456112.post-3249377233536488984</id><published>2010-11-29T08:29:00.000-08:00</published><updated>2010-11-29T08:32:40.096-08:00</updated><title type='text'>Versioning Database Data</title><content type='html'>Some links to articles about tracking historical data in your database:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://re.solve.se/database-versioning"&gt;http://re.solve.se/database-versioning&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://docs.jboss.org/envers/docs/index.html"&gt;http://docs.jboss.org/envers/docs/index.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.simple-talk.com/sql/database-administration/database-design-a-point-in-time-architecture/"&gt;http://www.simple-talk.com/sql/database-administration/database-design-a-point-in-time-architecture/&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Products:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28424/adfns_flashback.htm"&gt;http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28424/adfns_flashback.htm&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9456112-3249377233536488984?l=sttysane.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sttysane.blogspot.com/feeds/3249377233536488984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9456112&amp;postID=3249377233536488984' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/3249377233536488984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/3249377233536488984'/><link rel='alternate' type='text/html' href='http://sttysane.blogspot.com/2010/11/versioning-database-data.html' title='Versioning Database Data'/><author><name>davet</name><uri>http://www.blogger.com/profile/01754795302797477444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9456112.post-5481225840747500273</id><published>2008-01-08T20:21:00.000-08:00</published><updated>2008-01-08T20:42:33.288-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='jms'/><title type='text'>JBoss WebsphereMQ Failover</title><content type='html'>IBM's MQSeries Message Broker doesn't have any built-in failover support.  The reccomended solution is to use IP level takeover where a standby machine monitors the main machine via a heartbeat.  If the heartbeat goes away, then the failover machine does IP takeover. Your clients will need to re-connect, but that should be all.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt;We didn't want to do that so instead I needed to have our MDBs and other JMS client code running in JBoss to failover to a different MQ server.  &lt;br /&gt;&lt;p/&gt;&lt;br /&gt;The solution I chose was to have an MBean that monitors the "main" server by listening on a "monitor" queue (just a normal queue created for monitoring purposes).  When a failure is detected (by a JMS exception listener) it re-populates the MQ JMS objects in JNDI.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt;The MDBs will automatically try and re-connect when they detect a failure.  Eventually, after the JNDI is updated to the new MQ server it will reconnect properly.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt;Other client code (MDBs that send messages, servlets that send/receive) need to know to re-connect when there is a failure.  I created a notification system so that they can re-get any objects from JNDI after they are re-populated.  In addition, any temporary queues that were created will need to be re-created since they now refer to the bad MQ server.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Hopefully, I can detail this out better over the next couple of weeks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9456112-5481225840747500273?l=sttysane.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sttysane.blogspot.com/feeds/5481225840747500273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9456112&amp;postID=5481225840747500273' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/5481225840747500273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/5481225840747500273'/><link rel='alternate' type='text/html' href='http://sttysane.blogspot.com/2008/01/jboss-webspheremq-failover.html' title='JBoss WebsphereMQ Failover'/><author><name>davet</name><uri>http://www.blogger.com/profile/01754795302797477444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9456112.post-5887096277769614488</id><published>2006-12-14T20:46:00.001-08:00</published><updated>2006-12-14T20:46:16.803-08:00</updated><title type='text'>Predicting bugs in code changes using SCM information</title><content type='html'>&lt;table cellpadding="0" cellspacing="0" border="0"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=7802818288058377867&amp;hl=en" flashvars=""&gt; &lt;/embed&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;This is to remid me that I might want to watch the whole video.&lt;br /&gt;&lt;br /&gt;Google TechTalks&lt;br /&gt;March 8, 2006&lt;br /&gt;&lt;br /&gt;Jim whitehead&lt;br /&gt;Jim Whitehead is an Assistant Professor of Computer Science at the University of California, Santa Cruz. He has recently been developing a new degree program on computer gaming, the BS in Computer Game Engineering. Jim received his PhD in Information and Computer Science from UC Irvine, in 2000&lt;br /&gt;&lt;br /&gt;Abstract:&lt;br /&gt;Almost all software contains undiscovered bugs, ones that have not yet been exposed by testing or by users. Wouldn&amp;#39;t it be nice if there was a way to know the location of these bugs? This talk presents two approaches for predicting the location of bugs. The bug cache contains 10% of the files in a software project.&lt;br /&gt;                &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9456112-5887096277769614488?l=sttysane.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sttysane.blogspot.com/feeds/5887096277769614488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9456112&amp;postID=5887096277769614488' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/5887096277769614488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/5887096277769614488'/><link rel='alternate' type='text/html' href='http://sttysane.blogspot.com/2006/12/predicting-bugs-in-code-changes-using.html' title='Predicting bugs in code changes using SCM information'/><author><name>davet</name><uri>http://www.blogger.com/profile/01754795302797477444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9456112.post-5895889050955384001</id><published>2006-11-03T06:48:00.001-08:00</published><updated>2006-11-03T06:48:59.928-08:00</updated><title type='text'>e^pi*i = -1 ; my favorite web comic</title><content type='html'>&lt;a href="http://xkcd.com/c179.html"&gt;http://xkcd.com/c179.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9456112-5895889050955384001?l=sttysane.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sttysane.blogspot.com/feeds/5895889050955384001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9456112&amp;postID=5895889050955384001' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/5895889050955384001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/5895889050955384001'/><link rel='alternate' type='text/html' href='http://sttysane.blogspot.com/2006/11/epii-1-my-favorite-web-comic.html' title='e^pi*i = -1 ; my favorite web comic'/><author><name>davet</name><uri>http://www.blogger.com/profile/01754795302797477444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9456112.post-116120317601687316</id><published>2006-10-18T13:19:00.000-07:00</published><updated>2006-11-03T12:01:59.218-08:00</updated><title type='text'>Filtering Blog posts</title><content type='html'>I use &lt;a href="http://www.bloglines.com/"&gt;bloglines &lt;/a&gt;to read weblogs. I recently added a site that posts different deals on the web every day because I was going to buy a new monitor. Anyway, I still like to see what is going on, but there are a lot of deals I'm not interested in. I'd really like to be able to filter the results.&lt;br /&gt;&lt;br /&gt;Bloglines doesn't have any filtering capability, but I could create a proxy server to do the filtering for me. So for example: Instead of giving bloglins http://feed.com/atom.xml I would give it http://myproxy.com/blogfilter/feed.com/atom.xml. My 'blogfilter' application would make the request to feed.com, get the data, filter stuff out and return the results.&lt;br /&gt;&lt;br /&gt;How should I filter? The simplest would be by keywords. Remove entries with these keywords in the title or body. You could have per-blog filters, too. A next step might be to use Bayesian filtering. But then you'd need an easy way to "train" the system. The proxy could add a small snippet of javascript at the end of each post. The javascript would be loaded from my site and would create a little panel with options to somehow rate the blog. It would then use this data to train the bayesian filter.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;Somes services that do this already:&lt;br /&gt;&lt;ul&gt;   &lt;li&gt;    &lt;a href="http://files.skyscrapr.net/users/jevdemon/SOASlideoftheDay_96DD/image03.png"&gt;FeedRinse&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://feedsifter.com/create.php"&gt;Feed Sifter&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.feedshake.com/"&gt;FeedShake&lt;/a&gt;&lt;br /&gt;  &lt;/li&gt;   &lt;/ul&gt;Articles on filtering feeds:&lt;br /&gt;&lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.readwriteweb.com/archives/rss_filter_prod.php"&gt;http://www.readwriteweb.com/archives/rss_filter_prod.php&lt;/a&gt;&lt;br /&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9456112-116120317601687316?l=sttysane.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sttysane.blogspot.com/feeds/116120317601687316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9456112&amp;postID=116120317601687316' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/116120317601687316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/116120317601687316'/><link rel='alternate' type='text/html' href='http://sttysane.blogspot.com/2006/10/filtering-blog-posts.html' title='Filtering Blog posts'/><author><name>davet</name><uri>http://www.blogger.com/profile/01754795302797477444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9456112.post-115526927345126373</id><published>2006-08-10T20:59:00.000-07:00</published><updated>2006-10-18T13:22:15.483-07:00</updated><title type='text'>Super Artificial Intelligence</title><content type='html'>Like most programmers, I've always been interested in AI, or Artificial Intelligence.    Countless books and movies have been based on machines that gain the intelligence of humans.  Usually, the plot involves the machines turning against their creators.&lt;br /&gt;&lt;br /&gt;But right now, AI is being put to other uses:  machine vision,  language translation, even &lt;a href="http://www.theinquirer.net/default.aspx?article=33583"&gt;managing restaurants.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The above tasks are accomplished quite well by humans, but we do &lt;a href="http://www.joannemossdesign.com/blooper.htm"&gt;error on occasion&lt;/a&gt;.  To err is human, we all accept that (to some degree).  But what happens when machines start to make the same mistakes.  Will we accept it?  I'm not sure that we will.  I think that we will demand machines that don't make the same mistakes we do.  What we really want is Super Artificial Intelligence; machines that are superior to us.&lt;br /&gt;&lt;br /&gt;That doesn't bode well for the day its &lt;a href="http://en.wikipedia.org/wiki/Hyperion_%28novel%29"&gt;Humanity vs. The Machine.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9456112-115526927345126373?l=sttysane.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sttysane.blogspot.com/feeds/115526927345126373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9456112&amp;postID=115526927345126373' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/115526927345126373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/115526927345126373'/><link rel='alternate' type='text/html' href='http://sttysane.blogspot.com/2006/08/super-artificial-intelligence.html' title='Super Artificial Intelligence'/><author><name>davet</name><uri>http://www.blogger.com/profile/01754795302797477444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9456112.post-112460478465156312</id><published>2005-08-20T23:03:00.000-07:00</published><updated>2006-10-18T13:22:15.321-07:00</updated><title type='text'>Evolution of Microformats</title><content type='html'>For the last year or so I've been keeping an eye out for interesting articles on the Semantic Web, NLP (Natural Language Processing) and other goodies.    Most of the work around the Semantic Web seems to be defining ways to annotate your content to contain semantic information.  Other work centers around using NLP to extract semantic information from content that isn't marked up.&lt;br /&gt;&lt;br /&gt;Microformats (&lt;a href="http://www.microformats.org"&gt;www.microformats.org&lt;/a&gt;) falls into the first camp.  Instead of being accademic, however, they offer very practical ways to add semantic information to your content (i.e., this represents a person, event, etc ...).  As simple as the formats are, nobody is going to add this to content &lt;a href="http://www.microformats.org/blog/2005/08/20/jon-udell-on-search-the-blogosphere-and-microformats/"&gt;without the help of tools &lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;My questions are how will new Microformats (or whatever ends up being used by our tools) be derived?  Will there be a voting procedure?  Some sort of standards group?  I can image lots and lots of different formats.  And how will those be integrated into new tools?&lt;br /&gt;&lt;br /&gt;One final thought is:  will advances in NLP make semantic markup obsolete?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9456112-112460478465156312?l=sttysane.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sttysane.blogspot.com/feeds/112460478465156312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9456112&amp;postID=112460478465156312' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/112460478465156312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/112460478465156312'/><link rel='alternate' type='text/html' href='http://sttysane.blogspot.com/2005/08/evolution-of-microformats.html' title='Evolution of Microformats'/><author><name>davet</name><uri>http://www.blogger.com/profile/01754795302797477444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9456112.post-111207249214520265</id><published>2005-03-28T20:51:00.000-08:00</published><updated>2006-10-18T13:22:15.206-07:00</updated><title type='text'>Mining CVS Data</title><content type='html'>I've been reading a &lt;a href="http://www.amazon.com/exec/obidos/tg/detail/-/1558605525/qid=1112072430/sr=8-4/ref=pd_csp_4/104-1338466-0248748?v=glance&amp;s=books&amp;amp;n=507846"&gt;book&lt;/a&gt; on Data Mining and was wondering how I might actually apply what I've read.  Fixing some bugs today got me thinking about mining CVS data.   If your cvs comments can be linked to defects (i.e. the comment contains a defect number) you might be able to make some useful observations.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Code Complexity&lt;br /&gt;&lt;/span&gt;If a "chunk" of code has lots of defects assigned to it, that might indicate a high level of complexity.  A "chunk" could be lots of things:  a function, a class, a module/package, anything.  My intuition is that the more bugs, the more difficult the code is to understand, maintain and test.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Probabalistic Reasoning&lt;br /&gt;&lt;/span&gt;Given a "commit" into cvs, what is the probability it will contain a bug?   What factors play into the decision?&lt;br /&gt;&lt;ul&gt;   &lt;li&gt;Number of lines changed.&lt;/li&gt;   &lt;li&gt;Number of previous bugs in this chunk?&lt;/li&gt;   &lt;li&gt;Did the current author make the previous, change, or is she working on this code for the first time?&lt;/li&gt;   &lt;li&gt;Number of dependancies introduces (i.e. a new import statment in a java class).&lt;/li&gt; &lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9456112-111207249214520265?l=sttysane.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sttysane.blogspot.com/feeds/111207249214520265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9456112&amp;postID=111207249214520265' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/111207249214520265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/111207249214520265'/><link rel='alternate' type='text/html' href='http://sttysane.blogspot.com/2005/03/mining-cvs-data.html' title='Mining CVS Data'/><author><name>davet</name><uri>http://www.blogger.com/profile/01754795302797477444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9456112.post-110986665231283013</id><published>2005-03-03T08:04:00.000-08:00</published><updated>2006-10-18T13:22:15.117-07:00</updated><title type='text'>javolution.org</title><content type='html'>I recently ran across a nice project that has some support for memory pools in java: &lt;a href="http://www.javolution.org/"&gt;javaolution.org&lt;/a&gt;. Since it works with the current JVM you need to do a bit of work. Instances of a pool context are created and bound to the current thread. Then, any objects created using a special factory are actually allocated in the pool. When the thread leaves the pool context the objects are recycled.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9456112-110986665231283013?l=sttysane.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sttysane.blogspot.com/feeds/110986665231283013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9456112&amp;postID=110986665231283013' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/110986665231283013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/110986665231283013'/><link rel='alternate' type='text/html' href='http://sttysane.blogspot.com/2005/03/javolutionorg.html' title='javolution.org'/><author><name>davet</name><uri>http://www.blogger.com/profile/01754795302797477444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9456112.post-110213950954183969</id><published>2004-12-03T21:42:00.000-08:00</published><updated>2006-10-18T13:22:14.994-07:00</updated><title type='text'>Java Memory Pools</title><content type='html'>Having developed primarily in garbage collected languages (perl, java, php), I read this article on &lt;a href="http://www-106.ibm.com/developerworks/library/l-memory/index.html?ca=drs-tp4704"&gt;memory allocation techniques&lt;/a&gt; mostly out of curiosity. The most interesting section was on using memory pools instead of the standard calls to malloc() and free(). Apache allocates a memory pool for each request. Any memory needed only for the request is put into this pool. At the end of the request the whole pool is freed.&lt;br /&gt;&lt;br /&gt;I've been working on a garbage intensive java application that does lots of EDI and XML translation. Reading XML and mapping objects creates lots of garbage quite quickly and the JVM spends a fair amount of time clearing up garbage. It seems that some sort of pool would help in this case. I would think this could be useful for lots of transactional and web based systems.&lt;br /&gt;&lt;br /&gt;How it would work is another matter. Perhaps a "pool context" could be associated with a thread.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt; MemoryPool pool = Runtime.createMemoryPool();&lt;br /&gt; Thread.currentThread().setMemoryPool();&lt;br /&gt;&lt;br /&gt; Foo foo = new Foo();   // allocated in pool&lt;br /&gt; Bar bar  = new Bar();   // allocated in pool&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;The garbage collector would not see &lt;span style="font-style: italic;"&gt;foo &lt;/span&gt;or &lt;span style="font-style: italic;"&gt;bar&lt;/span&gt;.  It would only see &lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;and collect from &lt;/span&gt;&lt;/span&gt;pool&lt;/span&gt;.It's more complicated than that, though, since you could allocate&lt;br /&gt;something in the pool and then assign it to a variable (for example,a Map) outside of the pool.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  HashMap map = new HashMap();&lt;br /&gt;&lt;br /&gt;  MemoryPool pool = Runtime.createMemoryPool();&lt;br /&gt;  Thread.currentThread().setMemoryPool();&lt;br /&gt;&lt;br /&gt;  Foo foo = new Foo();   // allocated in pool&lt;br /&gt;  map.put("Foo", foo);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In this case the garbage collector would see foo.&lt;br /&gt;&lt;br /&gt;The compexity probably outweighs any real benefits, but I find the idea interesting either way.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9456112-110213950954183969?l=sttysane.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sttysane.blogspot.com/feeds/110213950954183969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9456112&amp;postID=110213950954183969' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/110213950954183969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9456112/posts/default/110213950954183969'/><link rel='alternate' type='text/html' href='http://sttysane.blogspot.com/2004/12/java-memory-pools.html' title='Java Memory Pools'/><author><name>davet</name><uri>http://www.blogger.com/profile/01754795302797477444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
