<?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>Ghattu&#039;s Technology Blog &#187; Clustering</title>
	<atom:link href="http://ghattus.com/tag/clustering/feed/" rel="self" type="application/rss+xml" />
	<link>http://ghattus.com</link>
	<description>A blog about technology that I work on in my day to day job</description>
	<lastBuildDate>Thu, 03 Dec 2009 00:56:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WebLogic Clustering with Unicast</title>
		<link>http://ghattus.com/2009/06/04/weblogic-clustering-with-unicast/</link>
		<comments>http://ghattus.com/2009/06/04/weblogic-clustering-with-unicast/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 01:49:00 +0000</pubDate>
		<dc:creator>sghattu</dc:creator>
				<category><![CDATA[channel]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[multicast]]></category>
		<category><![CDATA[NetworkAccessPoint]]></category>
		<category><![CDATA[unicast]]></category>
		<category><![CDATA[WebLogic]]></category>
		<category><![CDATA[wlst]]></category>
		<category><![CDATA[Clustering]]></category>

		<guid isPermaLink="false">http://ghattus.com/2009/06/weblogic-clustering-with-unicast/</guid>
		<description><![CDATA[Until WebLogic 9.2 the only communication mode available between the Cluster members of your WebLogic domain is ‘Multicast’. Starting with WebLogic 10.0, Oracle in addition to MultiCast, supports communication between the Cluster members using Unicast. Quick definitions of Unicast and Multicast from Wikipedia. Unicast: Unicast messaging is used for all network processes where a private [...]]]></description>
			<content:encoded><![CDATA[<p>Until WebLogic 9.2 the only communication mode available between the Cluster members of your WebLogic domain is ‘Multicast’. Starting with WebLogic 10.0, Oracle in addition to MultiCast, supports communication between the Cluster members using Unicast. Quick definitions of Unicast and Multicast from Wikipedia.</p>
<p><span id="more-42"></span></p>
<p style="font-weight: bold">Unicast:</p>
<p style="font-style: italic"><span lang="EN">Unicast messaging is used for all network processes where a private or unique resource is requested making most networking traffic Unicast in form. Unicast is used where two way connections are needed to complete the network transaction.</span></p>
<p style="font-weight: bold"><span lang="EN">Multicast:</span></p>
<p style="font-style: italic"><span lang="EN">Multicast</span><span lang="EN"> addressing is a network technology for the delivery of information to a group of destinations simultaneously using the most efficient strategy to deliver the messages over each link of the network only once, creating copies only when the links to the multiple destinations split.</span></p>
<p><span lang="EN">I believe, support for Unicast </span>is a very important feature. Although Multicast is efficient when compared to Unicast, it causes a network configuration overhead where your Network Administrator need to dedicate a Multicast address. Also, when using Multicast you should make sure the end points or systems that don’t want the information have to be shielded from receiving these unwanted multicast broadcast messages.</p>
<p>Recently we have automated our Cluster configuration creations to Unicast messaging mode. In this post I would like to share wlst scripts and some guidelines to follow when using Unicast. Assuming you already have a domain, let us create a Cluster definition.<span style="font-size:100%"> First connect to the server and start an edit session</span></p>
<blockquote>
<p style="font-style: italic;font-family:courier new"><span style="font-size:100%">connect(uname,pwd,url)</span></p>
<p style="font-style: italic;font-family:courier new"><span style="font-size:100%">edit()</span></p>
<p style="text-align: left"><span>startEdit()</span></p>
<div><span><br />
 </span></div>
<div><span> </span></div>
<p><span> </p>
<p></span></p></blockquote>
<p style="font-family:courier new"><span style="font-size:100%"> </span></p>
<p><span> </span></p>
<div style="text-align: left">Now create the Cluster and set the messaging mode to &#8216;unicast&#8217;.</div>
<p style="font-style: italic;font-family:courier new"><span style="font-size:100%;color:black"> </span></p>
<blockquote>
<div style="text-align: left">
<p style="font-style: italic;font-family:courier new"><span style="font-size:100%;color:black">theCluster = cmo.createCluster(‘mycluster’)</span></p>
</div>
<div style="text-align: left">
<p style="font-style: italic;font-family:courier new"><span style="font-size:100%;color:black"> </span></p>
<p style="font-style: italic;font-family:courier new"><span style="font-size:100%;color:black">theCluster.setClusterMessagingMode(</span><span style="font-size:100%;color:teal">&#8216;unicast&#8217;</span><span style="font-size:100%;color:black">);</span></p>
</div>
</blockquote>
<div style="text-align: left">
<p style="font-style: italic;font-family:courier new"><span style="font-size:100%;color:black"> </span></p>
<p style="font-family:courier new"><span style="font-size:100%;color:black">It is recommended to use a custom broadcast channel instead of the default. </span></p>
<p style="font-style: italic;font-family:courier new"><span style="font-size:100%;color:black"> </span></p>
<blockquote><p><span style="font-size:100%;color:black">theCluster.setClusterBroadcastChannel(</span><span style="font-size:100%;color:teal">&#8216;myclusterChannel&#8217;</span><span style="font-size:100%;color:black">);</span></p></blockquote>
<p><span style="font-size:100%;color:black"> </span></p>
<p><span> </span></p>
<p><span> </span></p>
<p><span>Now let’s create a basic managed server and add that to the cluster. We will configure a Network access point for the managed server that will be used for communicating with other managed servers in the cluster. </span></p>
<p style="font-style: italic"><span> </span></p>
<blockquote>
<p style="font-style: italic"><span>msSvr = cmo.createServer(“ms1”)</span></p>
<p style="font-style: italic"><span>msSvr.setListenAddress(“msMachine”)</span></p>
<p style="font-style: italic"><span>msSvr.setListenPort(8001)</span></p>
<p style="font-style: italic"><span>msSvr.setCluster(theCluster)</span></p>
<p style="font-style: italic"><span>cd(</span><span>&#8216;/Servers/ms&#8217;</span><span>)</span></p>
<p style="font-style: italic"><span>cmo.createNetworkAccessPoint(</span><span>&#8216;myclusterChannel&#8217;</span><span>)</span><span> </span></p>
<p style="font-style: italic"><span>cd(</span><span>&#8216;/Servers/ms/NetworkAccessPoints/myclusterChannel&#8217;</span><span>)</span></p>
<p style="font-style: italic"><span>cmo.setListenPort(8002)</span></p>
<p style="font-style: italic"><span>cmo.setPublicPort(-1)</span></p>
<p><span>cmo.setEnabled(true)</span></p></blockquote>
<p><span> </span><span>if you would like to secure conmmunication between the servers</span></p>
<p><span> </span></p>
<blockquote><p><span>cmo.setProtocol(</span><span>&#8216;cluster-broadcast-secure&#8217;</span><span>)</span></p></blockquote>
<p><span> </span><span> </span></p>
<p>Now make sure you enable the Outbound communication for this channel, otherwise your managed server will not be able to communicate with other managed servers in the cluster. </p>
<blockquote><p><span>cmo.setOutboundEnabled(true)</span></p></blockquote>
<p> </p>
<p><span>I have pasted the entire working script below that you can use to create a 2 Node Cluster that uses Unicast messaging mode on a custom Network channel.<br />
</span></p>
<blockquote><p>def init():<br />
connect(uname,pwd,url)<br />
edit()<br />
startEdit()</p>
<p>def createCluster(clusterName):<br />
theCluster = cmo.createCluster(clusterName)<br />
theCluster.</p>
<div id=":12f" class="ii gt">setClusterMessagingMode(&#8216;unicast&#8217;);<br />
# It is recommended to use a custom broadcast channel instead of default<br />
theCluster.setClusterBroadcastChannel(&#8216;myclusterChannel&#8217;);<br />
return theCluster</div>
<p>def createMS(msname, port, mname, channelPort, clusterBean):<br />
msSvr1 = cmo.createServer(msname)<br />
msSvr1.setListenAddress(mname)<br />
msSvr1.setListenPort(port)<br />
msSvr1.setCluster(clusterBean)<br />
cd(&#8216;/Servers/&#8217;+msname)<br />
cmo.createNetworkAccessPoint(&#8216;myclusterChannel&#8217;)<br />
cd(&#8216;/Servers/&#8217;+msname+&#8217;/NetworkAccessPoints/myclusterChannel&#8217;)<br />
# if you want secure conmmunication between the servers<br />
cmo.setProtocol(&#8216;cluster-broadcast-secure&#8217;)<br />
cmo.setListenPort(channelPort)<br />
cmo.setPublicPort(-1)<br />
cmo.setEnabled(true)<br />
# This is very very important<br />
cmo.setOutboundEnabled(true)<br />
cd(&#8216;/&#8217;)</p>
<p>def run():<br />
init()<br />
bean = createCluster(&#8216;mycluster&#8217;)<br />
createMS(&#8220;ms1&#8243;,8001,&#8221;ms1Machine&#8221;,8002,bean)<br />
save()<br />
activate()</p>
<p>run()</p></blockquote>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ghattus.com/2009/06/04/weblogic-clustering-with-unicast/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

