<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2enclosuresfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Joshi's Tech Blog</title><link>http://joshitech.blogspot.com/</link><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/JoshiTechBlog" /><description>Notes to thy self.</description><language>en</language><managingEditor>noreply@blogger.com (Neuro Yogi)</managingEditor><lastBuildDate>Sun, 27 Nov 2011 15:15:42 PST</lastBuildDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">16</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">25</openSearch:itemsPerPage><feedburner:info uri="joshitechblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><itunes:explicit>no</itunes:explicit><itunes:subtitle>Notes to thy self.</itunes:subtitle><item><title>Installing Android 2.2 on HTC Aria</title><link>http://feedproxy.google.com/~r/JoshiTechBlog/~3/5L93xcO4I00/installing-android-22-on-htc-aria.html</link><category>HTC Aria</category><category>androird 2.2</category><category>jailbreak</category><category>root</category><author>noreply@blogger.com (Neuro Yogi)</author><pubDate>Wed, 01 Dec 2010 12:28:52 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-1562075531625076743</guid><description>Hi Guys,&lt;br /&gt;
&amp;nbsp; I was able to successfully root/jailbreak my HTC Aria phone and install Android 2.2.&amp;nbsp; Here are the steps. &lt;span style="font-size: x-small;"&gt;(Please try it at your own risk).&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Install &lt;a href="http://unrevoked.com/rootwiki/doku.php/public/unrevoked3"&gt;unrevoked3&lt;/a&gt; to root the phone. &amp;nbsp;&lt;/li&gt;
&lt;li&gt;Download&amp;nbsp; &lt;a href="http://wiki.cyanogenmod.com/index.php?title=Latest_Version"&gt;CyanogenMod&lt;/a&gt; for your version of the handset.&lt;/li&gt;
&lt;li&gt;Copy it into your phones SDcard and rename to update.zip&lt;/li&gt;
&lt;li&gt;Power off your phone and keep pressing power button (on top) and volume button (on side)&lt;/li&gt;
&lt;li&gt;It will reboot with recovery options with multiple menu options.&lt;/li&gt;
&lt;li&gt;Select option 6: nandroid to take backup &lt;/li&gt;
&lt;li&gt;Select option to 3: "wipe data/factory reset"&lt;/li&gt;
&lt;li&gt;Select option 4: "wipe cache partition"&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Select option 8: "Advance" and&amp;nbsp; select option "wipe delvik cache".&lt;/li&gt;
&lt;li&gt;Selection option "reboot recovery" &lt;/li&gt;
&lt;li&gt;Now select option to install update.zip from sdcard.&lt;/li&gt;
&lt;li&gt;Reboot the phone and you will have andorid 2.2 install.&lt;/li&gt;
&lt;/ol&gt;Once I installed, everything worked fine except android market place.&lt;br /&gt;
&amp;nbsp; 13.&amp;nbsp; Enable your wifi internet connection&lt;br /&gt;
&amp;nbsp; 14.&amp;nbsp; Goto&amp;nbsp; ROM Manager and upgrade FlashClockworkMode version&lt;br /&gt;
&amp;nbsp; 15. Download market fix to your sd card.&amp;nbsp; &lt;a href="http://www.megaupload.com/?d=XJTMQZY2"&gt;Market_fix_bgill55.zip&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
&amp;nbsp; 16. Again follow 5,7,8,9 and 10&lt;br /&gt;
&amp;nbsp; 17.&amp;nbsp; Go back to ROM manager and select option install from SD card.&lt;br /&gt;
&amp;nbsp; 18. Select Market_fix_bgill55.zip&lt;br /&gt;
&amp;nbsp; 19. once installation is done, reboot.&lt;br /&gt;
&lt;ol&gt;&lt;/ol&gt;I have no issues so far.&amp;nbsp; Let me know if you find any issue or need help installing it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012806236910902414-1562075531625076743?l=joshitech.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JoshiTechBlog/~4/5L93xcO4I00" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-01T15:28:52.698-05:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://joshitech.blogspot.com/2010/10/installing-android-22-on-htc-aria.html</feedburner:origLink></item><item><title>boost object pool destroy performance</title><link>http://feedproxy.google.com/~r/JoshiTechBlog/~3/IpntMjLH_UU/boost-object-pool-destroy-performance.html</link><author>noreply@blogger.com (Neuro Yogi)</author><pubDate>Mon, 17 May 2010 12:41:10 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-4065231134737998932</guid><description>In one of my application, we wanted to achieve 8000 TPS (Transactions per second) where every second, 8000 session objects will be created and destroyed. &lt;br /&gt;
To achieve this performance number, I wanted to optimize memory allocation and deallocation so&amp;nbsp; started looking for existing memory pool class particularly in boost libraries (assuming it would be faster) and I am already using few classes from boost.&lt;br /&gt;
&lt;br /&gt;
I found boost::object_pool.&amp;nbsp; It is a header only file so no need to include link library and I included into my application. At the same time, I used boost::multi_index_container to store session object with multiple indexes.&amp;nbsp; The performance was degrading as number of object increases in the container.&amp;nbsp; I thought that is due to boost multi-index-container.&lt;br /&gt;
&lt;br /&gt;
So I created two separate test applications to measure performance of boost object pool and boost multi-index-container and found that boost object_pool was the bottleneck.&lt;br /&gt;
&lt;br /&gt;
Here is the performance number of destroying 10K, 20K and 30K object from object_pool and using standard c++ delete.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;./object_pool_test 10000&lt;/b&gt;&lt;br /&gt;
Total time to destroy 10000 using delete: &lt;span style="color: blue;"&gt;0.3158860&lt;/span&gt;&lt;br /&gt;
Total time to destroy 10000 from object_pool: &lt;span style="color: red;"&gt;1.447002736 sec&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;./object_pool_test 20000&lt;/b&gt;&lt;br /&gt;
Total time to destroy 20000 using delete: &lt;span style="color: blue;"&gt;0.6340170&lt;/span&gt;&lt;br /&gt;
Total time to destroy 20000 from object_pool: &lt;span style="color: red;"&gt;9.624879974 sec &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;./object_pool_test 30000&lt;/b&gt;&lt;br /&gt;
Total time to destroy 30000 using delete: &lt;span style="color: blue;"&gt;0.10413087&lt;/span&gt;&lt;br /&gt;
Total time to destroy 30000 from object_pool: &lt;span style="color: red;"&gt;32.150515048 sec&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// File: test_object_pool.cpp&lt;br /&gt;
// Description: Test performance of deleting object from boost::object_pool versus standard delete operator.&lt;br /&gt;
// Author: Rohit Joshi&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;time.h&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/pool/object_pool.hpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class Test&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; char buffer[1024];&lt;br /&gt;
&amp;nbsp; unsigned long id;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char** argv) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; if(argc &amp;lt; 2) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "Usage: "&amp;lt;&amp;lt; argv[0] &amp;lt;&amp;lt; " NumObjects\n";&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&amp;nbsp; 0;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; int num_objs = atoi(argv[1]);&lt;br /&gt;
/////////////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//test1: using standard delete to delete objects&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&amp;nbsp; std::vector&amp;lt;Test*&amp;gt; vDelTest;&lt;br /&gt;
&amp;nbsp; vDelTest.reserve(num_objs);&lt;br /&gt;
&amp;nbsp; for(int i = 0; i &amp;lt; num_objs; ++i) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Test *pTest = new Test();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; vDelTest.push_back(pTest);&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; timespec tv;&lt;br /&gt;
&amp;nbsp; tv.tv_sec = 0;&lt;br /&gt;
&amp;nbsp; tv.tv_nsec = 0;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; clock_settime(CLOCK_PROCESS_CPUTIME_ID, &amp;amp;tv);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; for(int i = 0; i &amp;lt; num_objs; ++i) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; delete vDelTest[i];&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &amp;amp;tv);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; std::cout &amp;lt;&amp;lt; "Total time to destroy "&amp;lt;&amp;lt; num_objs &amp;lt;&amp;lt; " using delete: " &amp;lt;&amp;lt; tv.tv_sec &amp;lt;&amp;lt; "." &amp;lt;&amp;lt; tv.tv&lt;br /&gt;
_nsec &amp;lt;&amp;lt; "\n";&lt;br /&gt;
&lt;br /&gt;
//////////////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//delete using object_pool&lt;br /&gt;
/////////////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&amp;nbsp; boost::object_pool&amp;lt;Test&amp;gt; m_oPool;&lt;br /&gt;
&amp;nbsp; std::vector&amp;lt;Test*&amp;gt; vTest;&lt;br /&gt;
&amp;nbsp; vTest.reserve(num_objs);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; for(int i = 0; i &amp;lt; num_objs; ++i) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Test *pTest = m_oPool.construct();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; vTest.push_back(pTest);&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &amp;amp;tv);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; std::cout &amp;lt;&amp;lt; "Total time to destroy "&amp;lt;&amp;lt; num_objs &amp;lt;&amp;lt; " from object_pool: " &amp;lt;&amp;lt; tv.tv_sec &amp;lt;&amp;lt; "." &amp;lt;&amp;lt; tv.tv_nsec &amp;lt;&amp;lt; "\n";&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; return 0;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
To compile, copy this source into test_object_pool.cpp&lt;br /&gt;
&amp;nbsp;g++ -c test_object_pool.cpp &lt;br /&gt;
g++ -o test_object_pool test_object_pool.o -lrt&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012806236910902414-4065231134737998932?l=joshitech.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JoshiTechBlog/~4/IpntMjLH_UU" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-17T15:41:10.337-04:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://joshitech.blogspot.com/2010/05/boost-object-pool-destroy-performance.html</feedburner:origLink></item><item><title>Expose stop working after connecting to external monitor</title><link>http://feedproxy.google.com/~r/JoshiTechBlog/~3/6hJIN79HRD4/expose-stop-working-after-connecting-to.html</link><author>noreply@blogger.com (Neuro Yogi)</author><pubDate>Fri, 29 Jan 2010 11:20:14 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-7194401558251415020</guid><description>When ever I unplug my MacBook from an external monitor, Expose stops working. The solution to this problem is to kill "Dock" application.&amp;nbsp; To make it easier, I have created a script which allows you to do the same.&lt;br /&gt;
&lt;br /&gt;
set app_name to "/System/Library/CoreServices/Dock.app/Contents/MacOS/Dock"&lt;br /&gt;
set the_pid to (do shell script "ps ax | grep " &amp;amp; (quoted form of app_name) &amp;amp; " | grep -v grep | awk '{print $1}'")&lt;br /&gt;
display dialog "Killingn the application Dock with PID:" &amp;amp; the_pid&lt;br /&gt;
if the_pid is not "" then do shell script ("kill -9 " &amp;amp; the_pid)&lt;br /&gt;
&lt;br /&gt;
Copy following lines of code into text editor and copy under  $HOME/Library/Scripts/killdock.scpt.&amp;nbsp; Now you can see the script listed under  scripts as an shortcut. You can see "kill dock" listed at the end.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_6pRK3TGa7xI/S2MzGtZg8iI/AAAAAAAAAh0/ikSpXnD60tQ/s1600-h/Picture+3.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/_6pRK3TGa7xI/S2MzGtZg8iI/AAAAAAAAAh0/ikSpXnD60tQ/s400/Picture+3.png" width="228" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012806236910902414-7194401558251415020?l=joshitech.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JoshiTechBlog/~4/6hJIN79HRD4" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-29T14:20:14.630-05:00</app:edited><media:thumbnail url="http://4.bp.blogspot.com/_6pRK3TGa7xI/S2MzGtZg8iI/AAAAAAAAAh0/ikSpXnD60tQ/s72-c/Picture+3.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://joshitech.blogspot.com/2010/01/expose-stop-working-after-connecting-to.html</feedburner:origLink></item><item><title>Does Internet Speed check varies based on the browser</title><link>http://feedproxy.google.com/~r/JoshiTechBlog/~3/kF-NTc2EfS0/does-internet-speed-check-varies-based.html</link><author>noreply@blogger.com (Neuro Yogi)</author><pubDate>Sun, 10 Jan 2010 09:09:31 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-2603648092835515100</guid><description>I wanted to see whether browser makes different while checking the speed of the internet.&amp;nbsp; I did&amp;nbsp; speed check test using speedtest.net&amp;nbsp; and four different browser and surprisingly all of them gave different results.&lt;br /&gt;
&lt;br /&gt;
1: Safari&amp;nbsp; Version 4.0.3 (5531.9)&lt;br /&gt;
Download Speed: 17.16 Mb/s&lt;br /&gt;
Upload speed: 4.08 Mb/s&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/_6pRK3TGa7xI/S0oE4BfGG2I/AAAAAAAAAdE/UFCNRugwG8o/s1600-h/Safari.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_6pRK3TGa7xI/S0oE4BfGG2I/AAAAAAAAAdE/UFCNRugwG8o/s640/Safari.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
2. Firefox Version 3.6 (rv:1.9.2 Gecko 20100105)&lt;br /&gt;
Download Speed:15.84 Mb/s&lt;br /&gt;
Upload Speed:4.25 Mb/s&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/_6pRK3TGa7xI/S0oFAJeTVJI/AAAAAAAAAdM/4MQfddT9vT0/s1600-h/FireFox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_6pRK3TGa7xI/S0oFAJeTVJI/AAAAAAAAAdM/4MQfddT9vT0/s640/FireFox.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
3. Chrome Version 4.0.246.0 (31780)&lt;br /&gt;
Download Speed:15.47 Mb/s&lt;br /&gt;
Upload Speed:2.17 Mb/s&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_6pRK3TGa7xI/S0oFFJkIbVI/AAAAAAAAAdU/YIHi4IX1avY/s1600-h/Google+Chrome.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_6pRK3TGa7xI/S0oFFJkIbVI/AAAAAAAAAdU/YIHi4IX1avY/s640/Google+Chrome.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Chrome Version&amp;nbsp;4.0.249.43:&lt;br /&gt;
Download speed: 17.65 Mb/s&lt;br /&gt;
Upload speed: 3.98 Mb/s&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_6pRK3TGa7xI/S0oIFCHhR7I/AAAAAAAAAdc/AKDMRkSRa3g/s1600-h/Picture+2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_6pRK3TGa7xI/S0oIFCHhR7I/AAAAAAAAAdc/AKDMRkSRa3g/s640/Picture+2.png" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_6pRK3TGa7xI/S0oIFCHhR7I/AAAAAAAAAdc/AKDMRkSRa3g/s1600-h/Picture+2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;"&gt;&lt;br /&gt;
&lt;/a&gt;&lt;span style="color: black;"&gt;Looking at the results, it seems speeds varies based on the browser. You can see latest version of the Google Chrome has improves and you can see both the upload and download speed has increased.&lt;/span&gt;&lt;a href="http://2.bp.blogspot.com/_6pRK3TGa7xI/S0oIFCHhR7I/AAAAAAAAAdc/AKDMRkSRa3g/s1600-h/Picture+2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;"&gt;&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012806236910902414-2603648092835515100?l=joshitech.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JoshiTechBlog/~4/kF-NTc2EfS0" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-10T12:09:31.812-05:00</app:edited><media:thumbnail url="http://3.bp.blogspot.com/_6pRK3TGa7xI/S0oE4BfGG2I/AAAAAAAAAdE/UFCNRugwG8o/s72-c/Safari.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://joshitech.blogspot.com/2010/01/does-internet-speed-check-varies-based.html</feedburner:origLink></item><item><title>Why  google search engine is better than bing for technical information?</title><link>http://feedproxy.google.com/~r/JoshiTechBlog/~3/wUaCZcc42Xg/why-google-search-engine-is-better-than.html</link><category>bing</category><category>dbxml</category><category>search</category><category>google</category><author>noreply@blogger.com (Neuro Yogi)</author><pubDate>Fri, 02 Oct 2009 20:23:45 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-8178929827164257822</guid><description>When Microsoft launched&amp;nbsp; &lt;a href="http://www.bing.com/"&gt;bing&lt;/a&gt; search engine, I started using it. I really liked the picture on main page and&amp;nbsp; results are good when I am searching non-technical information.&amp;nbsp; So I changed my default search engine to Bing and set home page as http://www.bing.com.&lt;br /&gt;
&lt;br /&gt;
But when it comes to technical information, bing couldn't provide me information I wanted. It seems it doesn't display the latest information.&lt;br /&gt;
E.g&amp;nbsp; I was working on dbxml (Berkeley DB XML) and posted a question to the "dbxml forum".&amp;nbsp; When I searched "dbxml forum" (without quotes), bing fetches following first five search results.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;cite&gt;sourceforge.net/projects/&lt;b&gt;dbxml&lt;/b&gt;-core&lt;/cite&gt;&lt;/li&gt;
&lt;li&gt;&lt;cite&gt;rubyforge.org/&lt;b&gt;forum&lt;/b&gt;/?group_id=1643&lt;/cite&gt;&lt;/li&gt;
&lt;li&gt;&lt;cite&gt;sourceforge.net/projects/&lt;b&gt;dbxml&lt;/b&gt;&lt;/cite&gt;&lt;/li&gt;
&lt;li&gt;&lt;cite&gt;&lt;b&gt;dbxml&lt;/b&gt;-core.wiki.sourceforge.net/space/​stats&lt;/cite&gt;&lt;/li&gt;
&lt;li&gt;&lt;cite&gt;eiffel-&lt;b&gt;dbxml&lt;/b&gt;.wiki.sourceforge.net&lt;/cite&gt;&lt;/li&gt;
&lt;/ul&gt;When I search "dbxml forum" (without quotes), it fetches following results.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;cite&gt;&lt;b&gt;forums&lt;/b&gt;.oracle.com/&lt;b&gt;forums&lt;/b&gt;/&lt;b&gt;forum&lt;/b&gt;.jspa?&lt;b&gt;forum&lt;/b&gt;ID=274&lt;/cite&gt;&lt;/li&gt;
&lt;li&gt;&lt;cite&gt;www.nabble.com/Berkeley-&lt;b&gt;DB-Xml&lt;/b&gt;-f730.html&amp;nbsp;&lt;/cite&gt;&lt;/li&gt;
&lt;li&gt;&lt;cite&gt;www.nabble.com/Berkeley-&lt;b&gt;DB-XML&lt;/b&gt;-mailing-list-transition-td5475353.html&amp;nbsp;&lt;/cite&gt;&lt;/li&gt;
&lt;li&gt;&lt;cite&gt;www.mombu.com/.../t-getting-started-with-berkeley-&lt;b&gt;db-xml&lt;/b&gt;-806334.html&amp;nbsp;&lt;/cite&gt;&lt;/li&gt;
&lt;li&gt;&lt;cite&gt;www.eosdirectory.com/project/196/Berkeley+DB+XML.html&lt;/cite&gt;&lt;cite&gt;&amp;nbsp;&lt;/cite&gt;&lt;cite&gt;&amp;nbsp;&lt;/cite&gt;&lt;cite&gt;&amp;nbsp;&lt;/cite&gt;&lt;cite&gt;&amp;nbsp;&lt;/cite&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;cite&gt;&amp;nbsp;&lt;/cite&gt;You can see the difference. The first link is for berkeley db xml forum even though you don't see the dbxml word in the link.&amp;nbsp; Google search engine has latest information about Berkeley DB XML including information that it is bought by Oracle and forums.oracle.com is the latest page for Berkeley DB XML.&amp;nbsp;&amp;nbsp; So every time&amp;nbsp; I search in bing, I had to search it again in google to get the dbxml forum page which was waste of my time. Eventually, I decided had to switch back to google search engine.&lt;br /&gt;
&lt;cite&gt;&lt;br /&gt;
&lt;/cite&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012806236910902414-8178929827164257822?l=joshitech.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JoshiTechBlog/~4/wUaCZcc42Xg" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-02T23:23:45.598-04:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://joshitech.blogspot.com/2009/10/why-google-search-engine-is-better-than.html</feedburner:origLink></item><item><title>Glassfish Application Server Performance tunings</title><link>http://feedproxy.google.com/~r/JoshiTechBlog/~3/cEg4Q_PWUlw/glassfish-application-server.html</link><category>performance</category><category>jvm options</category><category>tunings</category><category>glassfish</category><category>garbage collection</category><author>noreply@blogger.com (Neuro Yogi)</author><pubDate>Fri, 02 Oct 2009 20:23:06 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-46250687384549554</guid><description>If you want to improve performance of your application running on Glassfish application server, you can try out following JVM options. We got significant performance improvement by using them.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;jvm-options&amp;gt;-server&amp;lt;/jvm-options&amp;gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;jvm-options&amp;gt;-Xms3000m&amp;lt;/jvm-options&amp;gt;&lt;br /&gt;
&amp;lt;jvm-options&amp;gt;-Xmx3000m&amp;lt;/jvm-options&amp;gt;&lt;br /&gt;
&amp;lt;jvm-options&amp;gt;-XX:MaxPermSize=192m&amp;lt;/jvm-options&amp;gt; &lt;br /&gt;
&amp;lt;jvm-options&amp;gt;-XX:NewRation=2&amp;lt;/jvm-options&amp;gt; &lt;br /&gt;
&amp;lt;jvm-options&amp;gt;-XX:+AggressiveHeap&amp;lt;/jvm-options&amp;gt;&lt;br /&gt;
&amp;lt;jvm-options&amp;gt;-XX:+AggressiveOpts&amp;lt;/jvm-options&amp;gt;&lt;br /&gt;
&amp;lt;jvm-options&amp;gt;-XX:+UseParallelGC&amp;lt;/jvm-options&amp;gt;&lt;br /&gt;
&amp;lt;jvm-options&amp;gt;-XX:+UseParallelOldGC&amp;lt;/jvm-options&amp;gt;&lt;br /&gt;
&amp;lt;jvm-options&amp;gt;-XX:ParallelGCThreads=5&amp;lt;/jvm-options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By using these performance tunings, we are able to get almost 30% more TPS (Transactions per Seconds).If I can be helpful, please do let me know. I have spent enough time on Glassfish and OpenESB performance tunings.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012806236910902414-46250687384549554?l=joshitech.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JoshiTechBlog/~4/cEg4Q_PWUlw" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-02T23:23:06.615-04:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://joshitech.blogspot.com/2009/09/glassfish-application-server.html</feedburner:origLink></item><item><title>Absolute Singleton.  Not Really...</title><link>http://feedproxy.google.com/~r/JoshiTechBlog/~3/hoo5rQMDNL8/absolute-singleton.html</link><category>absolute singleton</category><category>true singleton</category><category>singleton</category><author>noreply@blogger.com (Neuro Yogi)</author><pubDate>Tue, 29 Sep 2009 14:12:24 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-217129540120256088</guid><description>Singleton are not true singleton and there are many reasons: One of them is multiple class loaders can have their own copy of singleton. See &lt;a href="http://weblogs.java.net/blog/2005/08/24/how-single-can-your-singleton-instance-be"&gt;How single can your singleton instance be?&lt;/a&gt;. I started googling for true singleton and came across &lt;a href="http://surguy.net/articles/communication-across-classloaders.xml"&gt;Absolute Singleton&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
When I use this approach in my product, it didn't work instead it was throwing exception java.lang.ClassNotFoundException on the Singleton class.&lt;br /&gt;
&lt;br /&gt;
java.lang.ClassNotFoundException: com.example.common.utils.JCSCache at com.sun.enterprise.util.ConnectorClassLoader.loadClass(ConnectorClassLoader.java:222)&lt;br /&gt;
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)&lt;br /&gt;
at com.example.common.utils.JCSCache.getInstance(JCSCache.java:131)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After looking at the exception and class initialization, I found that what happens if the first instance is initiated by custom class loader and not the default one?&lt;br /&gt;
&lt;br /&gt;
It will not find an existing instance because while creating the instance, due to custom class loader, it will go into "if (! myClassLoader.toString().startsWith("sun.")) {" (see the &lt;a href="http://surguy.net/articles/communication-across-classloaders.xml"&gt;Absolute Singleton&lt;/a&gt;) condition and try to find existing instance instead of creating new which doesn't exits yet so it throws the java.lang.ClassNotFoundException.&lt;br /&gt;
&lt;br /&gt;
The work around I found is to catch the exception and create the instance of AbsoluteSingleton class.&lt;br /&gt;
&lt;br /&gt;
But next time, custom class loader try to get the instance, again it's not going to find it and create it's own instance.&lt;br /&gt;
See the below log.  &lt;br /&gt;
&lt;br /&gt;
First instance of JCSCache ( &lt;b&gt;com.example.common.utils.JCSCache@124adaf&lt;/b&gt;) created by class loader: &lt;b&gt;org.glassfish.openesb.pojose.jbi.su.SUClassLoader@1b78d60&lt;/b&gt;&lt;br /&gt;
and &lt;br /&gt;
&lt;br /&gt;
2nd instance (&lt;b&gt;com.example.common.utils.JCSCache@1a859dc&lt;/b&gt;) is created by &lt;b&gt;EJBClassLoader&lt;/b&gt;. &lt;br /&gt;
&lt;br /&gt;
So Absolute singleton is not really absolute singleton.&lt;br /&gt;
&lt;br /&gt;
[2009-09-27 21:56:04,713 | Thread-79 | common.utils.JCSCache | ENTRY] --&gt;getInstance()&lt;br /&gt;
[2009-09-27 21:56:04,713 | Thread-79 | common.utils.JCSCache | DEBUG] Class Loader:org.glassfish.openesb.pojose.jbi.su.SUClassLoader@1b78d60&lt;br /&gt;
[2009-09-27 21:56:04,713 | Thread-79 | common.utils.JCSCache | ERROR] Exception:com.example.common.utils.JCSCache&lt;br /&gt;
[2009-09-27 21:56:04,713 | Thread-79 | common.utils.JCSCache | ENTRY] --&gt;JCSCache()&lt;br /&gt;
[2009-09-27 21:56:04,713 | Thread-79 | common.utils.JCSCache | DEBUG] JCSCache constructor called.&lt;br /&gt;
[2009-09-27 21:56:04,713 | Thread-79 | common.utils.JCSCache | EXIT] &lt;--JCSCache()
[2009-09-27 21:56:04,713 | Thread-79 | common.utils.JCSCache | ENTRY] --&gt;init()&lt;br /&gt;
[2009-09-27 21:56:04,713 | Thread-79 | common.utils.JCSCache | DEBUG] Setting the cache configuratio name:/cache.ccf&lt;br /&gt;
[2009-09-27 21:56:04,721 | Thread-79 | common.utils.JCSCache | DEBUG] Initializing region base cache objects.&lt;br /&gt;
[2009-09-27 21:56:04,786 | Thread-79 | common.utils.JCSCache | EXIT] &lt;--init() true
[2009-09-27 21:56:04,786 | Thread-79 | common.utils.JCSCache | EXIT] &lt;--getInstance() &lt;b&gt;com.example.common.utils.JCSCache@124adaf&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
2nd instance:&lt;br /&gt;
&lt;br /&gt;
2009-09-27 21:56:06,812 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | ENTRY] --&gt;getInstance()&lt;br /&gt;
[2009-09-27 21:56:06,813 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | DEBUG] Class Loader:EJBClassLoader : &lt;br /&gt;
[2009-09-27 21:56:06,813 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | ERROR] Exception:com.example.common.utils.JCSCache&lt;br /&gt;
[2009-09-27 21:56:06,813 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | ENTRY] --&gt;JCSCache()&lt;br /&gt;
[2009-09-27 21:56:06,813 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | DEBUG] JCSCache constructor called.&lt;br /&gt;
[2009-09-27 21:56:06,813 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | EXIT] &lt;--JCSCache()
[2009-09-27 21:56:06,813 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | ENTRY] --&gt;init()&lt;br /&gt;
[2009-09-27 21:56:06,813 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | DEBUG] Setting the cache configuratio name:/cache.ccf&lt;br /&gt;
[2009-09-27 21:56:06,818 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | DEBUG] Initializing region base cache objects.&lt;br /&gt;
[2009-09-27 21:56:06,926 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | EXIT] &lt;--init() true
[2009-09-27 21:56:06,926 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | EXIT] &lt;--getInstance() &lt;b&gt;com.example.common.utils.JCSCache@1a859dc&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012806236910902414-217129540120256088?l=joshitech.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JoshiTechBlog/~4/hoo5rQMDNL8" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-29T17:12:24.023-04:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://joshitech.blogspot.com/2009/09/absolute-singleton.html</feedburner:origLink></item><item><title>How to Enabled logging in OpenLdap</title><link>http://feedproxy.google.com/~r/JoshiTechBlog/~3/AijF6ZU6zek/how-to-enabled-logging-in-openldap.html</link><category>olcLogLevel</category><category>enabled logging</category><category>ldap</category><author>noreply@blogger.com (Neuro Yogi)</author><pubDate>Thu, 15 Oct 2009 08:12:39 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-1022597141236764550</guid><description>I am working on performance improvement task for our new product where I wanted avoid duplicate Ldap seaches. To view the ldap searches in sldap log file, we have to enable the logging.  This is how you do it.&lt;br /&gt;
&lt;br /&gt;
To enabled logging:&lt;br /&gt;
&lt;br /&gt;
ldapmodify -x -H ldap://ldaphost -D cn=directory\ manager,cn=config -w password&lt;br /&gt;
dn: cn=Config&lt;br /&gt;
replace: olcLogLevel&lt;br /&gt;
olcLogLevel: Stats Stats2 None&lt;br /&gt;
Ctrl+d&lt;br /&gt;
&lt;br /&gt;
Now you can view the log file at /var/log/slapd.log. You will need a root/sudo access to view this log file.&lt;br /&gt;
&lt;br /&gt;
To disabled logging:&lt;br /&gt;
ldapmodify -x -H ldap://ldaphost -D cn=directory\ manager,cn=config -w password&lt;br /&gt;
dn: cn=Config&lt;br /&gt;
replace: olcLogLevel&lt;br /&gt;
olcLogLevel: None&lt;br /&gt;
Ctrl+d&lt;br /&gt;
&lt;br /&gt;
NOTE: Here is None is used for reporting errors so don't forget to specify None when you enable or disable logging.&lt;br /&gt;
&lt;br /&gt;
If you want to modify existing subscriber data in ldap, you can use this command&lt;br /&gt;
ldapmodify -x -H ldap://host -D cn=directory\ manager,o=example.com -w password123 -f modifieddata.ldif&lt;br /&gt;
&lt;br /&gt;
where modifieddata.ldif would contain&lt;br /&gt;
dn: uniqueIdentifier=0209091514-1015999999,ou=subscribers,ou=OU,o=example.com&lt;br /&gt;
changetype: modify&lt;br /&gt;
replace: &lt;attrname&gt;&lt;br /&gt;
&lt;attrname&gt;: &lt;attrvalue&gt;&lt;/attrvalue&gt;&lt;/attrname&gt;&lt;/attrname&gt;&lt;br /&gt;
&lt;br /&gt;
dn: uniqueIdentifier=0209091514-1016000000,ou=subscribers,ou=OU,o=example.com&lt;br /&gt;
changetype: modify&lt;br /&gt;
replace: &lt;attrname&gt;&lt;br /&gt;
&lt;attrname&gt;: &lt;attrvalue&gt;&lt;/attrvalue&gt;&lt;/attrname&gt;&lt;/attrname&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012806236910902414-1022597141236764550?l=joshitech.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JoshiTechBlog/~4/AijF6ZU6zek" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-15T11:12:39.100-04:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://joshitech.blogspot.com/2009/09/how-to-enabled-logging-in-openldap.html</feedburner:origLink></item><item><title>Berkeley DBXML and thread deadlock</title><link>http://feedproxy.google.com/~r/JoshiTechBlog/~3/4uZhFGA9vm8/berkeley-dbxml-and-thread-deadlock.html</link><category>thread</category><category>dbxml</category><category>deadlock</category><category>xcap</category><author>noreply@blogger.com (Neuro Yogi)</author><pubDate>Thu, 24 Sep 2009 19:41:55 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-5457839090622331236</guid><description>For my &lt;a href="http://sourceforge.net/projects/xcapserver/"&gt;XCAPServer&lt;/a&gt; project, I use Berkeley DB XML for XML document repository. I am kind of stuck due to all threads goes into deadlock while adding and removing documents.&lt;br /&gt;
&lt;br /&gt;
See more information on dbxml forum at: &lt;a href="http://forums.oracle.com/forums/thread.jspa?messageID=3782878"&gt;DBXML 2.4.16: Accessing containers from multiple threads and deadlock&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Solution: To avoid the deadlock, call set_lk_detect(DB_LOCK_MINWRITE) on DbEnv variable. Also make sure when exceptions are thrown, transactions must be either aborted or committed.&lt;br /&gt;
&lt;br /&gt;
Here is a link to the source code: &lt;a href="http://xcapserver.svn.sourceforge.net/viewvc/xcapserver/trunk/XCAPServer%2B%2B/src/db/dbxml_db.cpp?view=markup&amp;pathrev=32"&gt;dbxml_db.cpp&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012806236910902414-5457839090622331236?l=joshitech.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JoshiTechBlog/~4/4uZhFGA9vm8" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-24T22:41:55.124-04:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://joshitech.blogspot.com/2009/09/berkeley-dbxml-and-thread-deadlock.html</feedburner:origLink></item><item><title>XPATH Library performance</title><link>http://feedproxy.google.com/~r/JoshiTechBlog/~3/afpUeD253ug/xpath-library-performance.html</link><category>performance</category><category>xpath</category><category>jaxen</category><author>noreply@blogger.com (Neuro Yogi)</author><pubDate>Wed, 23 Sep 2009 17:48:32 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-2037025476539263986</guid><description>I am working on a project which requires invoking multiple JBI endpoints based on routing requirements and type of input message. It is developed using heavy xpath expressions to choose the right path in the routing logic. &lt;br /&gt;
&lt;br /&gt;
I started with default XPath library which is part of the JDK 1.6. To avoid the performance problem, I pre-compiled all the xpath expressions at startup time.  &lt;br /&gt;
&lt;br /&gt;
When I ran performance test on this router application, I was getting around 670 TPS (transactions per second) with 20% CPU idle (it's a 8 core machine) which is much slower than what I expected.&lt;br /&gt;
&lt;br /&gt;
So I started looking for alternate XPATH libraries and I found &lt;a href="http://vtd-xml.sourceforge.net/benchmark1.html"&gt;VDT-XML benchmark&lt;/a&gt; where you can see VDT-XML outperforms &lt;a href="http://jaxen.codehaus.org/"&gt;jaxen&lt;/a&gt; and default jkd xpath implementation.&lt;br /&gt;
&lt;br /&gt;
VDT-XML seem to be much faster (based on benchmark results :) )but due to it's license, I decided not to use for my project so I only option left was to try jaxen xpath library.&lt;br /&gt;
&lt;br /&gt;
When I replaced default xpath library with jaxen, performance numbers changes drastically. Now I get 800 TPS with 70% CPU idle. In-fact I couldn't drive more CPU usage with my jmeter running on one machine.&lt;br /&gt;
&lt;br /&gt;
So I would recommend jaxen library to anyone who is looking high performance, open source/free xpath library.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012806236910902414-2037025476539263986?l=joshitech.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JoshiTechBlog/~4/afpUeD253ug" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-23T20:48:32.352-04:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://joshitech.blogspot.com/2009/09/xpath-library-performance.html</feedburner:origLink></item><item><title>Boost Logging Library</title><link>http://feedproxy.google.com/~r/JoshiTechBlog/~3/Dtke71SULjQ/boost-logging-library.html</link><category>log</category><category>logging</category><category>boost</category><category>xcap</category><category>xcapserver</category><author>noreply@blogger.com (Neuro Yogi)</author><pubDate>Tue, 04 May 2010 12:06:26 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-8833826899155205861</guid><description>I was evaluating boost log library for my upcoming project &lt;a href="http://xcapserver.sourceforge.net/"&gt;XCAPServer&lt;/a&gt;.  When I googled for boost and logging, I found two boost based logging library.&lt;br /&gt;
&lt;br /&gt;
1. http://torjo.com/log2/doc/html/index.html&lt;br /&gt;
2. https://sourceforge.net/projects/boost-log/.&lt;br /&gt;
&lt;br /&gt;
I started with torjo's log library documentation but it looked more complex so I gave up on that.  &lt;br /&gt;
&lt;br /&gt;
boost-log library documentation is really good and getting started was much easier so I downloaded the boost-log source and compiled along with my other boost libraries. You can find how to compile boost libraries &lt;a href="http://joshitech.blogspot.com/2009/09/compiling-boost-libraries-on-maclinux.html"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
After spending some time on this library what I realized is that it doesn't support basic logging requirements for my multi-threading application so I had to use C++ macros to achieve what I wanted.&lt;br /&gt;
&lt;br /&gt;
Here is my logger files:&lt;br /&gt;
&lt;a href="http://xcapserver.svn.sourceforge.net/viewvc/xcapserver/trunk/C%2B%2B/XCAPServer%2B%2B/include/logger/xcap_logger.hpp?revision=35&amp;amp;view=markup"&gt;xcap_logger.hpp&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://xcapserver.svn.sourceforge.net/viewvc/xcapserver/trunk/C%2B%2B/XCAPServer%2B%2B/src/logger/xcap_logger.cpp?revision=35&amp;amp;view=markup"&gt;xcap_logger.cpp&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I just don't understand why logging libraries have to be so complex and still doesn't provide basic logging features e.g file-name, line-number, thread-id etc..we need to learn from java community.&lt;br /&gt;
&lt;br /&gt;
Sometime I feel that boost community should define the interface and let people implement rather than people contributing the implementations and boost community keep on rejecting :)&lt;br /&gt;
&lt;br /&gt;
Here is what I am looking in boost logging library.&lt;br /&gt;
&lt;br /&gt;
My basic requirements for logging libraries are below.&lt;br /&gt;
&lt;br /&gt;
1. Date and Time&lt;br /&gt;
2. File Name. Similar to __FILE__ macro&lt;br /&gt;
3. Line Number. Similar to __LINE__ macro &lt;br /&gt;
4. Current thread id. (pthread_self)&lt;br /&gt;
5. Parent thread id. (getpid())&lt;br /&gt;
6. Log level (from trace, debug, info, warn, error, critical)&lt;br /&gt;
7. Module name&lt;br /&gt;
8. Data&lt;br /&gt;
e.g&lt;br /&gt;
|2009-Sep-22 22:04:47.340047|file.cpp:212|0xb0103000:0xb01020000|INFO|XCAP|test-data&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012806236910902414-8833826899155205861?l=joshitech.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JoshiTechBlog/~4/Dtke71SULjQ" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-04T15:06:26.134-04:00</app:edited><feedburner:origLink>http://joshitech.blogspot.com/2009/09/boost-logging-library.html</feedburner:origLink></item><item><title>Compiling Boost libraries on  Mac/Linux</title><link>http://feedproxy.google.com/~r/JoshiTechBlog/~3/CVTcpkuGAfw/compiling-boost-libraries-on-maclinux.html</link><category>linux</category><category>boost</category><category>mac</category><category>compile</category><author>noreply@blogger.com (Neuro Yogi)</author><pubDate>Tue, 22 Sep 2009 19:28:53 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-7312074581405866507</guid><description>1. Download/checkout the boost source code. Let's say we are downloading it at /opt/boost directory&lt;br /&gt;
&gt;cd /opt/boost&lt;br /&gt;
&gt;svn co http://svn.boost.org/svn/boost/trunk boost-trunk&lt;br /&gt;
2. Download following external source libraries at /opt/boost directory and unzip and compile them.&lt;br /&gt;
a. bzip&lt;br /&gt;
b. expat&lt;br /&gt;
c. icu &lt;br /&gt;
d. zlib &lt;br /&gt;
3. cd to boost-trunk directory and run ./bootstrap.sh (you might have to execute chmod 755 bootstrap.sh)&lt;br /&gt;
4. Below is the script which sets the environments and compiles the boost libraries.&lt;br /&gt;
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib:/usr/local/lib:/usr/lib:.&lt;br /&gt;
export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH&lt;br /&gt;
export BOOST_BIN_ROOT=/opt/boost/boost-binary&lt;br /&gt;
export BOOST_INSTALL_DIR=/opt/boost/boost-trunk&lt;br /&gt;
export PATH=$PATH:/opt/boost/bjam&lt;br /&gt;
export EXPAT_INCLUDE=/opt/boost/expat/include&lt;br /&gt;
export EXPAT_LIBPATH=/opt/boost/expat/lib&lt;br /&gt;
export HAVE_ICU=1&lt;br /&gt;
export BZIP2_SOURCE=/opt/boost/bzip2-1.0.5&lt;br /&gt;
export ZLIB_SOURCE=/opt/boost/zlib-1.2.3&lt;br /&gt;
export ICU_PATH=/opt/boost/icu/source&lt;br /&gt;
cd $BOOST_INSTALL_DIR&lt;br /&gt;
bjam  threading=multi variant=release link=shared  --build-dir=$BOOST_BIN_ROOT --prefix=$BOOST_INSTALL_DIR --without-mpi toolset=darwin install&lt;br /&gt;
&lt;br /&gt;
5. If you want to compile specific library, replace bjam command from above script&lt;br /&gt;
bjam  threading=multi variant=release link=shared  --with-$1 --build-dir=$BOOST_BIN_ROOT --prefix=$BOOST_INSTALL_DIR  toolset=darwin install&lt;br /&gt;
&lt;br /&gt;
Here in --with-$1 where $1 would be your library name.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012806236910902414-7312074581405866507?l=joshitech.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JoshiTechBlog/~4/CVTcpkuGAfw" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-22T22:28:53.122-04:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://joshitech.blogspot.com/2009/09/compiling-boost-libraries-on-maclinux.html</feedburner:origLink></item><item><title>Performance Comparison: Apache ODE versus Sun's BPEL Engine</title><link>http://feedproxy.google.com/~r/JoshiTechBlog/~3/9NOi20VJjCg/performance-comparision-apache-ode.html</link><category>performance</category><category>ode</category><category>openesb</category><category>SOA</category><category>apache</category><category>servicemix</category><author>noreply@blogger.com (Neuro Yogi)</author><pubDate>Tue, 22 Sep 2009 19:26:25 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-2932849412462836274</guid><description>We are evaluating Apache ODE and Sun BPEL Engine for our Service Orchestration application. I read  in many blogs that ODE out performs other BPEL engine (no one gave real numbers) but we found  Sun's BPEL outperforms Apache ODE in terms of performance comparison as well as stability when persistent was enabled.&lt;br /&gt;
&lt;br /&gt;
We ran two tests. One with ServiceMix/ODE and other with glassfish ESB/Sun-bpel.&lt;br /&gt;
Server: RedHat AS (Linux quad core)&lt;br /&gt;
Client: 4 client machine running jmeter with 25 threads (Total 100 threads)&lt;br /&gt;
&lt;br /&gt;
JDK 1.5_0_16&lt;br /&gt;
&lt;br /&gt;
Service 3.2.2 :  Standalone mode :&lt;br /&gt;
&lt;a href="http://www.apache.org/dyn/closer.cgi?path=%2Fservicemix%2Fservicemix-3%2F3.2.2%2Fapache-servicemix-3.2.2.tar.gz" target="_top" rel="nofollow"&gt;http://www.apache.org/dyn/closer.cgi?path=%2Fservicemix%2Fservicemix-3%2F3.2.2%2Fapache-servicemix-3.2.2.tar.gz&lt;/a&gt;&lt;br /&gt;
Apache Ode 1.2  &lt;a href="http://www.apache.org/dyn/closer.cgi/ode/apache-ode-jbi-1.2.zip" target="_top" rel="nofollow"&gt;http://www.apache.org/dyn/closer.cgi/ode/apache-ode-jbi-1.2.zip&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Glassfish: V2-UR2-b4-20080411&lt;br /&gt;
OpenESB:080909&lt;br /&gt;
Sun-bpel: 080909 release&lt;br /&gt;
Test case:&lt;br /&gt;
One incoming SOAP request with 1st parameter as a number and 2nd as a String.&lt;br /&gt;
Inside BPEL, based on 1st parameter, we are executing while loop of that many times. Psuedo code:&lt;br /&gt;
function testLoop(int iteration, string data) {&lt;br /&gt;
int index = 0, count = 0;&lt;br /&gt;
int length = data.length;&lt;br /&gt;
while (index++ &lt; iteration) {
count = (index + 1) % length ;
}
} 

To can read more about performance comparison and download a sample BPEL file and a service assembly at &lt;a href="http://www.nabble.com/Apache-ODE-performance-compare-to-Sun--BPEL-Engine-Performance-td20440881.htmlhttp://www.nabble.com/Apache-ODE-performance-compare-to-Sun--BPEL-Engine-Performance-td20440881.html"&gt;Apache Ode User Forum&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012806236910902414-2932849412462836274?l=joshitech.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JoshiTechBlog/~4/9NOi20VJjCg" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-22T22:26:25.425-04:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://joshitech.blogspot.com/2009/05/performance-comparision-apache-ode.html</feedburner:origLink></item><item><title>HSQLDB support for OpenESB's BPEL-SE Persistent</title><link>http://feedproxy.google.com/~r/JoshiTechBlog/~3/SzsPEiALqKw/hsqldb-support-for-openesbs-bpel-se.html</link><category>Cluster</category><category>HSQLDB</category><category>BPLE-SE</category><category>Persistent</category><author>noreply@blogger.com (Neuro Yogi)</author><pubDate>Sat, 30 May 2009 12:53:56 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-8755627748979339511</guid><description>Currently BPEL-SE only supports MySQL and Derby databases for its persistent feature. I have implemented support for HSQLDB by modifying the BPEL-SE source code and also fixing some issues in HSQLDB which eventually incorporated in HSQLDB by Fred.&lt;br /&gt;&lt;br /&gt;See the  HSQLDB support &lt;a href="https://open-esb.dev.java.net/issues/show_bug.cgi?id=1875"&gt;patch &lt;/a&gt; for BPLE-SE submitted to OpenESB forum. You will have to download latest BPEL-SE  source code and apply this patch untill it is incorporated into mainline.&lt;br /&gt;&lt;br /&gt;See patches &lt;a href="https://sourceforge.net/tracker/?func=detail&amp;amp;aid=2783683&amp;amp;group_id=23316&amp;amp;atid=378133"&gt;2783683&lt;/a&gt; and &lt;span&gt;&lt;strong&gt;&lt;a href="https://sourceforge.net/tracker/?func=detail&amp;amp;aid=2783683&amp;amp;group_id=23316&amp;amp;atid=378133"&gt;&lt;span style="font-weight: normal;"&gt;2786071&lt;/span&gt;&lt;/a&gt; &lt;/strong&gt;&lt;/span&gt; submitted to HSQLDB forum.&lt;br /&gt;Fred has incorporated/fixed all the pending issues related to BPEL-SE support. So download latest code and try it out !!&lt;span&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012806236910902414-8755627748979339511?l=joshitech.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JoshiTechBlog/~4/SzsPEiALqKw" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-30T15:53:56.695-04:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://joshitech.blogspot.com/2009/05/hsqldb-support-for-openesbs-bpel-se.html</feedburner:origLink></item><item><title>IMS Training: Worth it !!</title><link>http://feedproxy.google.com/~r/JoshiTechBlog/~3/ho27L5pq9Oo/ims-training-worth-it.html</link><category>IMS</category><category>training</category><author>noreply@blogger.com (Neuro Yogi)</author><pubDate>Sat, 30 May 2009 12:54:22 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-1596349007471230096</guid><description>My company invited Christophe Gourraud; author of &lt;a href="http://theimslantern.blogspot.com/"&gt;The IMS Lantern&lt;/a&gt; to give us three days training on &lt;a href="http://theimslantern.blogspot.com/2008/04/course-on-ims-application-layer.html"&gt;The IMS Application Layer&lt;/a&gt;. We thoroughly enjoyed this course. The course doesn't only describe IMS application related specification but also helps understanding what lies behind by providing insights on historical time lines, assumptions, mistakes, conflicts between companies and reason behind that and most importantly his personal view on certain IMS specifications and what is the best way to implement it.&lt;br /&gt;&lt;br /&gt;I would personally recommend Christophe and his course on the IMS Application Layer to any one who want to understand why IMS !!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012806236910902414-1596349007471230096?l=joshitech.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JoshiTechBlog/~4/ho27L5pq9Oo" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-30T15:54:22.292-04:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://joshitech.blogspot.com/2009/05/ims-training-worth-it.html</feedburner:origLink></item><item><title>DLink DWL-G120 B1 Wireless Adapter installation guide</title><link>http://feedproxy.google.com/~r/JoshiTechBlog/~3/2K75BlJDpKM/dlink-dwl-g120-b1-wireless-adapter.html</link><category>wireless adapter</category><category>ndiswrapper</category><category>DWL G120</category><author>noreply@blogger.com (Neuro Yogi)</author><pubDate>Tue, 14 Aug 2007 21:18:38 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-8939518916425249723</guid><description>Since I installed Ubnutu 7.0.4, I lost my wireless connectivity and had to stay in my bedroom where my network hub is installed. I had been trying to get it working but was not successful.&lt;br /&gt;I came across &lt;a href="http://www.sammyliu.com/2006/08/21/d-link-dwl-g120-wireless-adapter-linux-installation-guide/"&gt;Sam Liu's blog&lt;/a&gt; about installing the wireless adapter which is a step by step tutorial  to install the driver.&lt;br /&gt;It uses ndiswrapper and prism02 driver from windows.&lt;br /&gt;&lt;br /&gt;If I remember correctly, earlier I followed his steps but didn't work and that was because I didn't follow his steps to reboot the laptop. So follow his steps and have wireless access to net !!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012806236910902414-8939518916425249723?l=joshitech.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JoshiTechBlog/~4/2K75BlJDpKM" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2007-08-15T00:18:38.815-04:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://joshitech.blogspot.com/2007/08/dlink-dwl-g120-b1-wireless-adapter.html</feedburner:origLink></item><media:rating>nonadult</media:rating></channel></rss>

