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

<channel>
	<title>underdog-blog</title>
	<atom:link href="http://blog.underdog-projects.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.underdog-projects.net</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 23 Oct 2010 18:43:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>BusinessEvents 4: using Scorecards in a clustered environment</title>
		<link>http://blog.underdog-projects.net/2010/10/businessevents-4-using-scorecards-in-a-clustered-environment/</link>
		<comments>http://blog.underdog-projects.net/2010/10/businessevents-4-using-scorecards-in-a-clustered-environment/#comments</comments>
		<pubDate>Sat, 23 Oct 2010 18:43:18 +0000</pubDate>
		<dc:creator>jens</dc:creator>
				<category><![CDATA[TIBCO]]></category>
		<category><![CDATA[BusinessEvents]]></category>
		<category><![CDATA[CEP]]></category>

		<guid isPermaLink="false">http://blog.underdog-projects.net/?p=566</guid>
		<description><![CDATA[Scorecards have a special purpose in TIBCO BE. There are often used for static (as in Java-style static) values which should be globally accessible through the whole engine. As Java statics, TIBCO describes its main purpose in instance dependent Variables which are only valid in the context of one Processing Unit in an Inference engine. [...]]]></description>
			<content:encoded><![CDATA[<p>Scorecards have a special purpose in TIBCO BE. There are often used for static (as in Java-style static) values which should be globally accessible through the whole engine. As Java statics, TIBCO describes its main purpose in instance dependent Variables which are only valid in the context of one Processing Unit in an Inference engine.<br />
Here a little citation of the TIBCO documentation on this topic (p.144 &#8211; Understanding and Working With Scorecards):</p>
<blockquote><p>A scorecard is a special type of concept. A scorecard serves as a set of static<br />
variables that is available throughout the project.<br />
&#8230;<br />
It is more accurate to say there is one instance of a scorecard per inference agent.<br />
Each inference agent in an application has its own instance of the score card.<br />
Scorecards are not shared between agents.
</p></blockquote>
<p>So you can use Scorecards without any Issues as long as you consider the per Instance rule. Now I have a project where Timeouts are calculated an stored in Scorecards. This solution works perfectly in single instance environment because of the special behavior described above. Now there comes a new Requirement into the project. The Agents should be clustered over 2 Instances to ensure high availability. This really ruins the simplicity of the scorecard approach.</p>
<p>Digging a little deeper into the documentation I came to the conclusion that all the scorecards had to be stored in the cache-server. Knowing this, it came to me mind that the only thing I must accomplish would be, that all inference agents use the same instance of the scorecard.</p>
<p>To achieve the single Instance per Agent approach, TIBCO uses Instance keys for every Processing Unit. So if you could change this instance key, all agents had to us the same instance of the scorecards and the timeout-solution would still work. Searching the documentation the answer was also found really quickly on page 144 (Understanding and Working With Scorecards).<br />
On that page TIBCO described how to set this instance key via CDD.</p>
<blockquote><p>
Any agent that uses scorecards, and also uses Cache Manager, must be assigned a<br />
unique key so that the correct scorecard can be retrieved from the cache. The key<br />
is set in the Processing Unit tab of the CDD.
</p></blockquote>
<p>I also tried this approach on a little test project and it worked right away. </p>
<p>What this means is, you can change the behavior of Scorecards depending on your needs. If you need a per Instance Variable you just have to set different Instance keys for every Agent. On the other hand if you want a globally shared Variable you can achieve this by setting the same value to all instances.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.underdog-projects.net/2010/10/businessevents-4-using-scorecards-in-a-clustered-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>URL encode / decode in JavaScript</title>
		<link>http://blog.underdog-projects.net/2010/02/url-encode-decode-in-javascript-2/</link>
		<comments>http://blog.underdog-projects.net/2010/02/url-encode-decode-in-javascript-2/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 19:57:13 +0000</pubDate>
		<dc:creator>jens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[urldecode]]></category>
		<category><![CDATA[urlencode]]></category>

		<guid isPermaLink="false">http://blog.underdog-projects.net/?p=535</guid>
		<description><![CDATA[Decoding and Encoding URLs in JavaScript should be a pretty easy thing to do especially since all browsers still have the functionality built-in. Interestingly no browser allows the JavaScript runtime to use this feature. So I had to write it for myself. The code I came up with is far from perfect but it worked [...]]]></description>
			<content:encoded><![CDATA[<p>Decoding and Encoding URLs in JavaScript should be a pretty easy thing to do especially since all browsers still have the functionality built-in. Interestingly no browser allows the JavaScript runtime to use this feature. So I had to write it for myself.<br />
The code I came up with is far from perfect but it worked for me. To decode an URL use url_decode(url) and to reverse it just call the utf16to8 function. The rest does your browser for you.</p>
<pre class="prettyprint javascript">
function url_decode(str){
var hex = /^[0-9a-fA-F]{2}/;
var out='';
var arr = str.split('%');
if(arr.length&lt;2) return str;
for(var i=0;i&lt;arr.length;i++)
{
  /*look for hex values */
  if(hex.exec(arr[i])) {
    out += String.fromCharCode(parseInt(arr[i].substring(0,2),16))+arr[i].substring(2,arr[i].length);
  } else { if(i==0) out+=arr[i]; else out+='%'+arr[i];
  }
}
return utf8to16(out);
}

function utf16to8(str) {
    var out, i, len, c;

    out = "";
    len = str.length;
    for(i = 0; i &lt; len; i++) {
	c = str.charCodeAt(i);
	if ((c &gt;= 0x0001) &#038;&#038; (c &lt;= 0x007F)) {
	    out += str.charAt(i);
	} else if (c &gt; 0x07FF) {
	    out += String.fromCharCode(0xE0 | ((c &gt;&gt; 12) &#038; 0x0F));
	    out += String.fromCharCode(0x80 | ((c &gt;&gt;  6) &#038; 0x3F));
	    out += String.fromCharCode(0x80 | ((c &gt;&gt;  0) &#038; 0x3F));
	} else {
	    out += String.fromCharCode(0xC0 | ((c &gt;&gt;  6) &#038; 0x1F));
	    out += String.fromCharCode(0x80 | ((c &gt;&gt;  0) &#038; 0x3F));
	}
    }
    return out;
}

function utf8to16(str) {
    var out, i, len, c;
    var char2, char3;

    out = "";
    len = str.length;
    i = 0;
    while(i &lt; len) {
	c = str.charCodeAt(i++);
	switch(c &gt;&gt; 4)
	{
	  case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:
	    // 0xxxxxxx
	    out += str.charAt(i-1);
	    break;
	  case 12: case 13:
	    // 110x xxxx   10xx xxxx
	    char2 = str.charCodeAt(i++);
	    out += String.fromCharCode(((c &#038; 0x1F) &lt;&lt; 6) | (char2 &#038; 0x3F));
	    break;
	  case 14:
	    // 1110 xxxx  10xx xxxx  10xx xxxx
	    char2 = str.charCodeAt(i++);
	    char3 = str.charCodeAt(i++);
	    out += String.fromCharCode(((c &#038; 0x0F) &lt;&lt; 12) |
					   ((char2 &#038; 0x3F) &lt;&lt; 6) |
					   ((char3 &#038; 0x3F) &lt;&lt; 0));
	    break;
	}
    }
    return out;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.underdog-projects.net/2010/02/url-encode-decode-in-javascript-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tracking virtual links with google analytics</title>
		<link>http://blog.underdog-projects.net/2010/01/tracking-virtual-links-with-google-analytics/</link>
		<comments>http://blog.underdog-projects.net/2010/01/tracking-virtual-links-with-google-analytics/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 17:57:00 +0000</pubDate>
		<dc:creator>jens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cloudtheweb.com]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.underdog-projects.net/?p=521</guid>
		<description><![CDATA[Tracking dynamic sites is sometimes a bit tricky. Typically tracking systems are specialized in tracking page views. More sophisticated system have there own way of tracking custom event (like shown here). Unfortunately I needed to track clicks on a HTML canvas. To make these clicks visible to a tracking system, I wanted to transform each [...]]]></description>
			<content:encoded><![CDATA[<p>Tracking dynamic sites is sometimes a bit tricky. Typically tracking systems are specialized in tracking page views. More sophisticated system have there own way of tracking custom event (<a href="http://code.google.com/apis/analytics/docs/tracking/eventTrackerOverview.html">like shown here</a>).<br />
Unfortunately I needed to track clicks on a HTML canvas. To make these clicks visible to a tracking system, I wanted to transform each click to virtual URL. That way I could use Google analytics not only for tracking but also for popularity statistics of certain content.<br />
The script for doing so is actually pretty simple.</p>
<pre class='prettyprint'>
function trace(url){
var tracker = _gat._getTracker("UA-XXXXXXX-X");
tracker._trackPageview(url);
}
</pre>
<p>Now every time I need to track something I call this function with a custom build URL.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.underdog-projects.net/2010/01/tracking-virtual-links-with-google-analytics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>handling a few thousand simultaneous connections in TIBCO BusinessWorks</title>
		<link>http://blog.underdog-projects.net/2009/12/handling-a-few-thousand-simultaneous-connections-in-tibco-businessworks/</link>
		<comments>http://blog.underdog-projects.net/2009/12/handling-a-few-thousand-simultaneous-connections-in-tibco-businessworks/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 15:22:16 +0000</pubDate>
		<dc:creator>jens</dc:creator>
				<category><![CDATA[TIBCO]]></category>
		<category><![CDATA[BusinessWorks]]></category>
		<category><![CDATA[c10k]]></category>
		<category><![CDATA[nio]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://blog.underdog-projects.net/?p=472</guid>
		<description><![CDATA[Scaling with TIBCO BusinessWorks can sometimes be a bit tricky. Recently I began testing some scenarios how to scale a Webservice a bit larger. The first source of information was of course the official documentation and to look at the proposed best practice values for such an engine. To start small, I tried a HTTP [...]]]></description>
			<content:encoded><![CDATA[<p>Scaling with TIBCO BusinessWorks can sometimes be a bit tricky. Recently I began testing some scenarios how to scale a Webservice a bit larger. The first source of information was of course the official documentation and to look at the proposed best practice values for such an engine.<br />
To start small, I tried a HTTP Receiver with a 32bit JVM runtime. I set the heap to the maximum amount possible (something about 1.7gig) and tried how many connections I could handle with that. After a few hundred (300-400) the engine alsways ran into an Out-Of-Memory Exception. From that point the engine was often not recoverable and had to be killed.<br />
After that I tried my luck with an 64bit JVM. Theoretically, with more RAM more connections should be possible, so lets go for it.<br />
I increased the heap size to about 4gig. With that value, the engine actually consumed something about 6gig of memory (I only had 8gig on my test machine). Running the same test as before the connection count increased linearly. That was something I didn&#8217;t expect. First of I expeceted the Memory consumption should lower on the amount of connections (because of the more reusable objects) and an increase in CPU load because of the more and more complicated handling of the larger heap on the JVM end.<br />
Despite that I came close to handle about one thousand connections. This seems pretty good but was not enough for what I had in mind. The only possibility I saw at that point was to increase the Memory further and further to get more connections running. A second concern which came to my mind was the thread handling. In a default Tomcat installation ever connection gets its own thread. This does consume a lot of memory but also increases the thread count of the server engine dramatically.<br />
With that in mind I remembered something I read about Tomcat 6 a while ago. For the purpose of handling a lot of simultaneous and enduring Javascript requests Tomcat introduced a new kind of connector engine which uses the Java NIO Framework. To explain this a little, Sun introduced this framework in Java 1.4 to handle IO over a single thread mechanism and use mostly OS provided functions for memory allocation and interaction. So in theory this could be the ideal framework for handling a lot of network IO. Tomcat introduced this feature with the c10k problem specifically in mind. So I began searching around how I could get a similar behvior out of BusinessWorks.<br />
What I didn&#8217;t know at that point was, that TIBCO already introduced this feature into BusinessWorks with version 5.7. You can switch the HTTP connector engine with some parameter in the HTTP Connection resource.</p>
<div id="attachment_511" class="wp-caption aligncenter" style="width: 359px"><img src="http://blog.underdog-projects.net/wp-content/uploads/2009/12/http_connection.jpg" alt="HTTP Connection - engine selector" title="http_connection" width="349" height="281" class="size-full wp-image-511" /><p class="wp-caption-text">HTTP Connection - engine selector</p></div>
<p>So I changed the connector engine and restartet the test. This time I started small. I set the heap to 512MB and limited the maxProcessor to 500. What I then saw was unexpected. The engine filled up right to the ten thousand requests I send. There occured no Out-Of-Memory at all. What was also interesting was, that the engine held 10k connections despite the maxprocessors was set to 500.<br />
So to conclude the result, the new connector is quite impressive when you need to handle a lot of simultanous connection and have not a lot of memory to spare. On the other hand, when you use it, you loose some of the TIBCO integrated features to limit your load. Further to that, the TIBCO documentation states that due to the single thread arcitecture you increase latency. So as always there is a tradeoff.</p>
<p>One final sidenote. I had some issues with the BusinessWorks 5.7.1 engine so I upgraded it to 5.7.2. Than it ran without a glitch.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.underdog-projects.net/2009/12/handling-a-few-thousand-simultaneous-connections-in-tibco-businessworks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TIBCO Designer Panel too small</title>
		<link>http://blog.underdog-projects.net/2009/10/tibco-designer-panel-too-small/</link>
		<comments>http://blog.underdog-projects.net/2009/10/tibco-designer-panel-too-small/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 16:52:38 +0000</pubDate>
		<dc:creator>jens</dc:creator>
				<category><![CDATA[TIBCO]]></category>
		<category><![CDATA[BusinessWorks]]></category>
		<category><![CDATA[designer]]></category>

		<guid isPermaLink="false">http://blog.underdog-projects.net/?p=459</guid>
		<description><![CDATA[Recently I ran into some rather trivial problem which isn&#8217;t really addressed by the TIBCO Designer. I had a process which wouldn&#8217;t fit into the Design Panel. There was just not enough space on the canvas to fit in the actual flow. After asking around I came to the conclusion that every designer (from different [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I ran into some rather trivial problem which isn&#8217;t really addressed by the TIBCO Designer. I had a process which wouldn&#8217;t fit into the Design Panel. There was just not enough space on the canvas to fit in the actual flow.<br />
After asking around I came to the conclusion that every designer (from different colleges I work with) had a different resolution for the Design canvas. Nobody knew any kind of property where you can set this resolution, so I began searching around.<br />
The designer uses basically 2 Folder for its configs. One is the installation folder with the designer.tra (<a href="http://blog.underdog-projects.net/2009/04/improve-tibco-designer-tester-performance-under-linux/">already explored this one</a>). The other one is the .TIBCO folder in your user home directory. In that folder there exists a file with the name &#8220;Designer5.prefs&#8221;.<br />
The content of this file consists mainly of position data of the various dialogs. Further to that it includes all the values which you can set through the designer preferences window. Back to the actual topic, I found the following two values:</p>
<blockquote><p>graph.height.pref=712<br />
graph.width.pref=1515</p></blockquote>
<p>These values represent the default size which the Designer allocated for its canvas. As you can see the default is pretty small on this one. I also found installations where both values where ten times larger then this. So far I found no performance penalty to this.<br />
The only pattern I found is that newer installation had smaller values as default. Where this value comes from and how it is determined stays unclear to me.</p>
<p>One other thing I found during my research. If the panel is to small for the current process you can drag one activity right next to the border and then start to move it via keyboard (&#8216;Shift + Cursor&#8217;). By doing so you drag the icon out of the canvas, but the position will be updated internally. After that you just need to refresh the process view and voila you have expanded the canvas size. But this is just a quick and dirty work-around.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.underdog-projects.net/2009/10/tibco-designer-panel-too-small/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>searching for hash strings in postgres</title>
		<link>http://blog.underdog-projects.net/2009/09/searching-for-hash-strings-in-postgres/</link>
		<comments>http://blog.underdog-projects.net/2009/09/searching-for-hash-strings-in-postgres/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 13:54:14 +0000</pubDate>
		<dc:creator>jens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hash]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[postgres]]></category>

		<guid isPermaLink="false">http://blog.underdog-projects.net/?p=442</guid>
		<description><![CDATA[For one of my projects a have a database which has a rather large table consisting of just an url and a corresponding id. For performance reasons I added a md5 column which hashes the url. With this column it should be a lot faster to look up an url. CREATE TABLE pages ( id [...]]]></description>
			<content:encoded><![CDATA[<p>For one of my projects a have a database which has a rather large table consisting of just an url and a corresponding id. For performance reasons I added a md5 column which hashes the url. With this column it should be a lot faster to look up an url.</p>
<pre class="prettyprint lang-sql">CREATE TABLE pages
(
  id bigint NOT NULL,
  url character varying(255),
  md5 character(32),
  CONSTRAINT pages_pkey PRIMARY KEY (id)
)</pre>
<p>The faster lookup should mainly be possible through the shorter column length (and therefore smaller index). Actually I don&#8217;t know if the fixed width is good or bad here, but hashes usually don&#8217;t vary in length. After creating this table I added a B-Tree unique Index to the md5 column to enable a fast lookup.<br />
After a while a noticed a rather high CPU load on lookups for this table so I tried  to analyze the problem. First I tried the obvious through psql.</p>
<pre class="prettyprint lang-sql">cloud=# explain analyze select * from pages where md5 ='abc';
                                                     QUERY PLAN
---------------------------------------------------------------------------------------------------------------------
 Index Scan using i_pages_md5 on pages  (cost=0.00..8.50 rows=1 width=166) (actual time=0.046..0.046 rows=0 loops=1)
   Index Cond: (md5 = 'abc'::bpchar)
 Total runtime: 0.157 ms
(3 rows)</pre>
<p>As the explain shows all works perfectly fine and lookups shouldn&#8217;t be a problem. So there had to be something different what was going on.</p>
<p>After that I tried the same select with an actual md5.</p>
<pre class="prettyprint lang-sql">cloud=# explain analyze select * from pages where md5 = md5('abc');
                                                  QUERY PLAN
--------------------------------------------------------------------------------------------------------------
 Seq Scan on pages  (cost=0.00..32017.63 rows=3994 width=166) (actual time=1203.699..1203.699 rows=0 loops=1)
   Filter: ((md5)::text = '900150983cd24fb0d6963f7d28e17f72'::text)
 Total runtime: 1203.769 ms
(3 rows)</pre>
<p>Now you can see the plan does change quite a lot. I have a full table scan instead of an index scan. You can also see that the query time increases nearly by factor ten thousand.</p>
<p>The reason for this dramatic change is a simple type mismatch. For whatever reason the md5 function will be evaluated to a string of the type text. To create a match with the column md5 all values had to be casted to that type. The side effect of this is that the index can no longer be used, because it is of the wrong type.</p>
<p>To solve this I just had to cast the result of the md5 function back to something that is compatible with the index type. In my case I used a fixed width character field which is represented in the database as bpchar (blank padded character). So after modifying the query to the following I was back on index usage.</p>
<pre class="prettyprint lang-sql">cloud=# explain analyze select * from pages where md5 = md5('abc')::bpchar;
                                                     QUERY PLAN
---------------------------------------------------------------------------------------------------------------------
 Index Scan using i_pages_md5 on pages  (cost=0.00..8.50 rows=1 width=166) (actual time=0.141..0.141 rows=0 loops=1)
   Index Cond: (md5 = '900150983cd24fb0d6963f7d28e17f72'::bpchar)
 Total runtime: 0.199 ms
(3 rows)</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.underdog-projects.net/2009/09/searching-for-hash-strings-in-postgres/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>init script for the TIBCO Administrator</title>
		<link>http://blog.underdog-projects.net/2009/09/init-script-for-the-tibco-administrator/</link>
		<comments>http://blog.underdog-projects.net/2009/09/init-script-for-the-tibco-administrator/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 17:03:06 +0000</pubDate>
		<dc:creator>jens</dc:creator>
				<category><![CDATA[TIBCO]]></category>
		<category><![CDATA[Administrator]]></category>
		<category><![CDATA[BusinessWorks]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://blog.underdog-projects.net/?p=428</guid>
		<description><![CDATA[I recently ran into the situation that I needed to install a TIBCO BusinessWorks with Administrator onto a RedHat Server. Under Windows the installer provides everthing you need to run your domain as a Service. In Linux this looks different. I have found no init script templates nor did the installer generate me some stubs. [...]]]></description>
			<content:encoded><![CDATA[<p>I recently ran into the situation that I needed to install a TIBCO BusinessWorks with Administrator onto a RedHat Server. Under Windows the installer provides everthing you need to run your domain as a Service. In Linux this looks different. I have found no init script templates nor did the installer generate me some stubs. So I had to write them myself. So here is what I came up with (I know it isn&#8217;t perfect, but it works &#8211; suggestions are always welcome).</p>
<p><strong>for the Administrator:</strong></p>
<pre class='prettyprint lang-shell'>
#!/bin/bash

DOMAIN=tibcoesb
USER=esb
TIBCO_HOME=/home/$USER/tibco
PATH=/bin:/usr/bin:/sbin:/usr/sbin
NAME=tibco-admin

start() {
# Start daemons.
echo "Starting Tibco Admin"
/bin/su $USER -c"cd $TIBCO_HOME/administrator/domain/$DOMAIN/bin;./tibcoadmin_$DOMAIN 2>&#038;1 | /usr/bin/logger -t $NAME" &#038;
echo "done"
}

stop() {
# Stop daemons.
echo "Shutting down Tibco Admin"
killall tibcoadmin_$DOMAIN
echo "done"
}

case "$1" in
  start)
	start
	    ;;
  stop)
	stop
    	    ;;
  *)
        echo $"Usage: $0 {start|stop}"
    	exit 2
esac
</pre>
<p><strong>for the Hawk</strong></p>
<pre class='prettyprint lang-shell'>
#!/bin/bash

DOMAIN=tibcoesb
USER=esb
TIBCO_HOME=/home/$USER/tibco
PATH=/bin:/usr/bin:/sbin:/usr/sbin
NAME=tibco-hawk

start() {
# Start daemons.
echo "Starting Tibco Hawk"
/bin/su $USER -c"cd $TIBCO_HOME/tra/domain/$DOMAIN;./hawkagent_$DOMAIN 2>&#038;1 | /usr/bin/logger -t $NAME" &#038;
echo "done"
}

stop() {
# Stop daemons.
echo "Shutting down Tibco Hawk"
killall hawkagent_$DOMAIN
echo "done"
}

case "$1" in
  start)
	start
	    ;;
  stop)
	stop
    	    ;;
  *)
        echo $"Usage: $0 {start|stop}"
    	exit 2
esac
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.underdog-projects.net/2009/09/init-script-for-the-tibco-administrator/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>adding IP-restriction to BusinessWorks processes</title>
		<link>http://blog.underdog-projects.net/2009/08/adding-ip-restriction-to-businessworks-processes/</link>
		<comments>http://blog.underdog-projects.net/2009/08/adding-ip-restriction-to-businessworks-processes/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 23:16:07 +0000</pubDate>
		<dc:creator>jens</dc:creator>
				<category><![CDATA[TIBCO]]></category>
		<category><![CDATA[BusinessWorks]]></category>
		<category><![CDATA[TRA]]></category>

		<guid isPermaLink="false">http://blog.underdog-projects.net/?p=417</guid>
		<description><![CDATA[Recently I got into the situation that somebody used some interface a way it was not designed for and so created an out-of-memory situation which couldn&#8217;t be handled by the engine itself. So now I got the case that one client block the complete service due to invalid requests which he shouldn&#8217;t do in the [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I got into the situation that somebody used some interface a way it was not designed for and so created an out-of-memory situation which couldn&#8217;t be handled by the engine itself. So now I got the case that one client block the complete service due to invalid requests which he shouldn&#8217;t do in the first place.<br />
In the short term there seemed to be only one solution, block the client. So I began to search around how this could be done.</p>
<p>The easiest way to achieve this would be to change the authentication for this service. Unluckily this service is used by a lot of other clients, so I can&#8217;t change it out of the blue. Next thing that came to my mind was using the underlying tomcat to do some IP-based blocking. After some searching around I gave that one up. Tibco has a really complex deployment model for BusinessWorks so I wasn&#8217;t able to even find the process-specific section for the tomcat engine.<br />
After some searching around in the documentation (actually several hours &#8211; hooray to a usable documentation) I found some parameter which allows you to block IPs with some TRA-file parameters. In case you want to look it up yourself it is in the BusinessWorks documentation under &#8216;Administration&#8217; -> Chapter 8 &#8216;Custom Engine Properties&#8217; -> &#8216;Available Custom Engine Properties&#8217; (and another hooray to the excellent formatting &#8211; Note to Tibco: HTML has tags, so you can do more with the content then continuous text &#8211; even some breaks would enhance the experience).<br />
So back to the point:</p>
<blockquote><p>
bw.plugin.http.server.allowIPAddresses<br />
bw.plugin.http.server.restrictIPAddresses
</p></blockquote>
<p>Both tags are rather self explanatory so you can use right away. Tibco says you can use it with a single IP, a list of IPs (comma-separated) or regular expression. As stated before this highlight of a documentation doesn&#8217;t say what reg-exp syntax means. I guess Tibco means they use the Tomcat engine for evaluation of these values an that means they use the Java syntax described <a href="http://java.sun.com/developer/technicalArticles/releases/1.4regex/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.underdog-projects.net/2009/08/adding-ip-restriction-to-businessworks-processes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>cloud-the-web &#8211; my new web project</title>
		<link>http://blog.underdog-projects.net/2009/08/cloud-the-web-my-new-web-project/</link>
		<comments>http://blog.underdog-projects.net/2009/08/cloud-the-web-my-new-web-project/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 10:28:01 +0000</pubDate>
		<dc:creator>jens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[cloudtheweb.com]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.underdog-projects.net/?p=379</guid>
		<description><![CDATA[A little time ago I started experimenting with some of the new HTML 5 features. Some seam pretty impressive although some a rather unnecessary in my opinion. But one thing got me really hooked &#8211; the HTML canvas. The possibilities of this control are only limited by the performance of javascript and the missing 3d [...]]]></description>
			<content:encoded><![CDATA[<p>A little time ago I started experimenting with some of the new HTML 5 features. Some seam pretty impressive although some a rather unnecessary in my opinion. But one thing got me really hooked &#8211; the HTML canvas.<br />
The possibilities of this control are only limited by the performance of javascript and the missing 3d feature (hopefully this comes pretty soon). With that technology I finally got some way to implement something I wanted to try for some time now. So here is the basic idea what it is all about.</p>
<p>A lot of people out there use services like delicious where you tag you favorite sites and make this available to other users. Now I started to grab that data and began to build a massive tag cloud. After some time the site collected hundreds of thousands of links with their corresponding tags. So now you can start on the site and search for tags which interests you. These search tags will then be correlated against the cloud database and you get the most active links for your tags. So here is an example.<br />
Let&#8217;s say you are interested in a tomcat tutorial.<br />
tags:</p>
<blockquote><p> tutorial, tomcat</p></blockquote>
<p>results: </p>
<blockquote><p>howtoforge.com<br />
howtogeek.com<br />
java.sun.com</p></blockquote>
<p>Of course those results will be a link to the concrete tutorial (not just the entry page).<br />
So far to the official part. For me this is more of a fun project. I prefer to start with some random tag and then wander around. It&#8217;s more like browsing, cause you start at points that you don&#8217;t already know. You have the chance to break out of your existing network of most used sites and see something new.</p>
<p>So have fun with it.<br />
<strong><br />
<a href="http://www.cloudtheweb.com">www.cloudtheweb.com</a><br />
</strong><br />
PS: For the implementation part &#8211; if you have any questions, just ask. I&#8217;m planning to explain some details about how it works on some later posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.underdog-projects.net/2009/08/cloud-the-web-my-new-web-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>shell-tools.net version2</title>
		<link>http://blog.underdog-projects.net/2009/07/shell-tools-net-version2/</link>
		<comments>http://blog.underdog-projects.net/2009/07/shell-tools-net-version2/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 21:10:27 +0000</pubDate>
		<dc:creator>jens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[shell-tools.net]]></category>

		<guid isPermaLink="false">http://blog.underdog-projects.net/?p=403</guid>
		<description><![CDATA[After nearly a full year, I finally got the time to rework my existing shell-tools.net site. The changes are rather small, because I think the site already works well, so why destroy a working site. So here is what I have done. I have added some new features like evaluating XPaths, pretty print JSON and [...]]]></description>
			<content:encoded><![CDATA[<p>After nearly a full year, I finally got the time to rework my existing <a href="http://www.shell-tools.net">shell-tools.net</a> site. The changes are rather small, because I think the site already works well, so why destroy a working site. So here is what I have done.<br />
I have added some new features like evaluating XPaths, pretty print JSON and transform XML files into JSON. Further to that I modified the css slightly so that from now on the current location will be highlighted in the navigation. I also removed some features which were rarely used because otherwise the menu would get to crowded.<br />
There are still some features which I really would like to implement, but haven&#8217;t got the time so far, for example resizing the input and output boxes on demand.</p>
<p>So enjoy the new features and lets hope the next release will not take another year.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.underdog-projects.net/2009/07/shell-tools-net-version2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

