<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Aayush: weblog</title>
	<atom:link href="http://whitelassiblog.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://whitelassiblog.wordpress.com</link>
	<description></description>
	<lastBuildDate>Sun, 29 Jan 2012 17:06:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='whitelassiblog.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/fe7c38ad5dfdc7a1100de12011558855?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Aayush: weblog</title>
		<link>http://whitelassiblog.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://whitelassiblog.wordpress.com/osd.xml" title="Aayush: weblog" />
	<atom:link rel='hub' href='http://whitelassiblog.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Net Neutrality Simplified &#8211; Information super-highway analogy.</title>
		<link>http://whitelassiblog.wordpress.com/2011/12/06/net-neutrality-simplified-information-super-highway-analogy/</link>
		<comments>http://whitelassiblog.wordpress.com/2011/12/06/net-neutrality-simplified-information-super-highway-analogy/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 19:41:11 +0000</pubDate>
		<dc:creator>whitelassiblog</dc:creator>
				<category><![CDATA[4G]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Carriers]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[LTE]]></category>
		<category><![CDATA[OTT]]></category>
		<category><![CDATA[policy]]></category>
		<category><![CDATA[QoS]]></category>

		<guid isPermaLink="false">http://whitelassiblog.wordpress.com/?p=321</guid>
		<description><![CDATA[A few months back, during an informal discussion with a colleague &#8211; the concept of net neutrality came along. During this discussion, a very interesting analogy was made with respect to the information super-highway. I am extending that analogy into a story-board, and which I feel would serve as a helpful tool to understand net neutrality. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=whitelassiblog.wordpress.com&amp;blog=4873685&amp;post=321&amp;subd=whitelassiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A few months back, during an informal discussion with a colleague &#8211; the concept of net neutrality came along.</p>
<p>During this discussion, a very interesting analogy was made with respect to the information super-highway. I am extending that analogy into a story-board, and which I feel would serve as a helpful tool to understand net neutrality.</p>
<p>First we will review the official FCC broadband policy statement which defines Net Neutrality, and then we will look at the analogy.</p>
<p><span style="color:#000080;"><strong>Official Regulation in the US:</strong></span></p>
<p>According to the FCC broadband policy statement, Net Neutrality regulations are defined for both wireless and fixed broadband providers.</p>
<p>Wireless providers need to follow the definition below, while for fixed broadband providers some additional rules apply.</p>
<p><span style="color:#000080;"><strong>Definition of Net Neutrality (for wireless providers):</strong></span></p>
<blockquote><p>&#8220;To encourage broadband deployment and preserve and promote the open and interconnected nature of the public Internet, consumers are entitled to:&#8221;</p>
<ul>
<li>access the lawful Internet content of their choice.</li>
<li>run applications and use services of their choice, subject to the needs of law enforcement.</li>
<li>connect their choice of legal devices that do not harm the network.</li>
<li>competition among network providers, application and service providers, and content providers.</li>
</ul>
</blockquote>
<div><span style="color:#000080;"><strong>Additional rules which apply for fixed broadband providers are as follows:</strong></span></div>
<div>
<p><strong>Transparency:</strong> Fixed and mobile broadband providers must disclose the network management practices, performance characteristics, and terms and conditions of their broadband services</p>
<p><strong>No blocking:</strong> Fixed broadband providers may not block lawful content, applications, services, or non-harmful devices; mobile broadband providers may not block lawful websites, or block applications that compete with their voice or video telephony services.</p>
<p><strong>No unreasonable discrimination:</strong> Fixed broadband providers may not unreasonably discriminate in transmitting lawful network traffic.</p>
<p>In our analogy, we will combine the definitions above.</p>
<p><span style="color:#000080;"><strong>The Information super-highway analogy:</strong></span></p>
<p style="text-align:center;"><a href="http://whitelassiblog.files.wordpress.com/2011/12/info-super-highway.png"><img class="aligncenter  wp-image-322" title="info-super-highway" src="http://whitelassiblog.files.wordpress.com/2011/12/info-super-highway.png?w=739&#038;h=522" alt="" width="739" height="522" /></a></p>
<p><span style="color:#000000;">Consider a multi-lane highway which has several toll booths installed at the very start on a toll station. Let us call this the information super highway.</span></p>
<p><span style="color:#000000;"> Vehicle owners need to pay a certain amount as toll tax whenever they traverse the toll booth. These vehicle owners can choose which toll booth they queue up at, depending upon their previous quality of experience on that booth. </span></p>
<p><span style="color:#000000;">For example, a certain toll booth may process vehicles very slowly and hence provides an inferior customer experience with respect to another booth..and so on. </span></p>
<p>Let us consider these vehicle owners as <em><strong>customers</strong></em>, and let us consider the toll booths as network service providers (<em><strong>carriers</strong></em>).</p>
<p>The toll station has a certain governance structure in place. Let this governance structure be the <strong><em>regulator</em></strong>.</p>
<p>Let the toll tax be the<em><strong> rating/charging plan</strong></em> of the carrier levied on the customer.</p>
<p>The story gets interesting once the customers pass the toll booth after paying their tax.</p>
</div>
<p>As a customer, as long as I pay my toll tax I have complete freedom to access the information present on the super-highway. On both sides of the super-highway we have huge digital &#8220;marts&#8221; &#8211; such as the facebooks of the world, and the Googles of the world. Each digital mart has its own nuances, its own services, its own pros and its own cons.</p>
<p>The best part is, that all products and services offered by these marts are &#8220;free&#8221; for the customers!<br />
In order to attract customers and merchants alike, these marts offer advertising programs and provide benefit points as part of a well structured points program.</p>
<p>Usually, customers park their cars in one of these digital marts to enjoy their products and services freely.</p>
<p>This is where one of the core concepts of net neutrality resonate &#8211; that customers are free to consume lawful content of their choice.</p>
<p>However, service providers also have some small, less glamorous road-side marts which offer services to the same customers. Hence, the operator-controlled digital marts are in direct competition to the OTT player controlled digital marts.</p>
<p>Some of these OTT digital marts also provide shop-space to individual digital retail providers. Let these individuals be the &#8220;developers&#8221; who use the OTT APIs to develop their apps &#8211; that run on android, IOS, Facebook widgets etc.</p>
<p>All these ecosystem players are competing against one another.</p>
<p>At this point, another core concept of net neutrality resonates &#8211; &#8220;competition among network providers, application and service providers, and content providers.&#8221;</p>
<div></div>
<div><span style="color:#000080;"><strong>The problem:</strong></span></div>
<div></div>
<p>As expected, the carrier controlled digital marts get fewer customers as opposed to the OTT player digital marts. The reasons are several, and we will not get into that analysis here.</p>
<p>As a result, the carrier controlled marts lose out on revenues made and also find it difficult to recover their CAPEX / OPEX which they had invested in building their digital marts, as well as the information super-highway itself !</p>
<p>Moreover, there is constant pressure of more traffic on the information super-highway, and these carriers have to periodically invest in increasing the capacity of the super-highway by adding more lanes, so that they can cater to the ever- increasing demand. This results in more CAPEX outflows by the carrier.</p>
<p>As soon as the new lane is added, it only adds to the woes of the carriers, as more customers throng the OTT digital marts and lead to congestion on the super-highway. A new lane is added with every<span style="text-decoration:underline;"> technological evolution</span> in wireless standards- from 2G, through 3G and now 4G wireless networks &#8211; thus offering customers increased bandwidth.</p>
<p>Some operators build cheaper by-lanes to the information super-highway to offload some traffic. These by-lanes are Wi-Fi offload by-lanes. This provides only temporary help in reducing network congestion, but the major problem still remains.</p>
<p><span style="color:#000080;"><strong>Knee-Jerk Reactions:</strong></span></p>
<blockquote><p>In order to reduce congestion, some carriers resort to bandwidth throttling &#8211; by employing speed breakers in front of OTT digital marts. This is not a fair thing to do, <em><span style="color:#000080;">as service providers  may not unreasonably discriminate in transmitting lawful network traffic. (See rules above).</span></em></p>
<p>Some carriers resort to heavy volume based charging strategies if customers are heavy users of OTT services. All these steps are retrograde in my opinion, as you cannot charge a heavier toll tax based on which digital mart the customer intends to visit. The customer is entitled to choose and consume products and services freely on the information super highway.</p></blockquote>
<p><span style="color:#000080;"><strong>Probable Solutions:</strong></span></p>
<p>There are two solutions to this catch-22 situation:</p>
<p>1. Build a policy aware network.</p>
<p>2. Save on servers and infrastructure CAPEX by moving  to a virtualized IaaS cloud. Use these savings to build a bigger and better digital mart to challenge the OTT players.</p>
<p>The first option is immediately feasible with the advent of LTE networks and the Evolved Packet Core (EPC), which define nine QCI levels in the wireless standard. The PCRF node in the EPC is the nerve center for policy rules and QoS.</p>
<p>The second option is a bit dramatic, but can be an option. Some people would argue that the cloud business model is not proven, and that the savings on infrastructure may not be significant. I feel that rather than blindly investing heavily on infrastructure all the time, carriers can evaluate cloud based IaaS solutions and invest more on building their own digital marts to challenge the facebooks and the googles of the world.</p>
<p>This may sound to be an outrageous idea as of today, but you never know if a cool social network platform may click with customers and give the OTT players a run for their money. The operator holds valuable information about his customers, and this information can be used to give a more personalized customer experience in the digital mart ! Put policy, QoS and bandwidth boost in the mix, and these can act as critical differentiations. Furthermore, add reliable HD video communications capabilities to complete the customer experience.</p>
<p>A good customer care system coupled with a reliable policy controlled digital mart can become a competitor to OTT marts, only if the operators think in this direction and give this possibility a chance.</p>
<p><strong>Food for thought ?</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/whitelassiblog.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/whitelassiblog.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/whitelassiblog.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/whitelassiblog.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/whitelassiblog.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/whitelassiblog.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/whitelassiblog.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/whitelassiblog.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/whitelassiblog.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/whitelassiblog.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/whitelassiblog.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/whitelassiblog.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/whitelassiblog.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/whitelassiblog.wordpress.com/321/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=whitelassiblog.wordpress.com&amp;blog=4873685&amp;post=321&amp;subd=whitelassiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://whitelassiblog.wordpress.com/2011/12/06/net-neutrality-simplified-information-super-highway-analogy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3793235d75f5c3a867182effca5ec17?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">whitelassiblog</media:title>
		</media:content>

		<media:content url="http://whitelassiblog.files.wordpress.com/2011/12/info-super-highway.png" medium="image">
			<media:title type="html">info-super-highway</media:title>
		</media:content>
	</item>
		<item>
		<title>Java Concurrency Utilities (Part-02): Rejected Execution Handlers, Thread Factories and Runnable Queues</title>
		<link>http://whitelassiblog.wordpress.com/2011/09/25/java-concurrency-utilities-part-02-rejected-execution-handlers-thread-factories-and-runnable-queues/</link>
		<comments>http://whitelassiblog.wordpress.com/2011/09/25/java-concurrency-utilities-part-02-rejected-execution-handlers-thread-factories-and-runnable-queues/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 17:08:29 +0000</pubDate>
		<dc:creator>whitelassiblog</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[rejected execution handler]]></category>
		<category><![CDATA[runnable queue]]></category>
		<category><![CDATA[thread factory]]></category>

		<guid isPermaLink="false">http://whitelassiblog.wordpress.com/?p=312</guid>
		<description><![CDATA[In the first part of Java concurrency utilities, we discussed the Callable interface, Future interface and FutureTask class. The post can be found here. In this post, we will introduce the Rejected Execution Handler utility of the Java concurrency package. The RejectedExecutionHandler is an interface, which can be implemented by the application. This interface acts as a &#8220;callback&#8221; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=whitelassiblog.wordpress.com&amp;blog=4873685&amp;post=312&amp;subd=whitelassiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the first part of Java concurrency utilities, we discussed the Callable interface, Future interface and FutureTask class. The post can be found <strong><a href="http://whitelassiblog.wordpress.com/2011/09/25/java-concurrency-utilities-part-01-callable-future-and-futuretask/">here.</a></strong></p>
<p>In this post, we will introduce the Rejected Execution Handler utility of the Java concurrency package.</p>
<p>The <a href="http://download.oracle.com/javase/6/docs/api/java/util/concurrent/RejectedExecutionHandler.html">RejectedExecutionHandler </a>is an interface, which can be implemented by the application. This interface acts as a &#8220;callback&#8221; interface and it is called when the thread pool executor is unable to execute a task.</p>
<p>The application can then do some &#8220;housekeeping&#8221; work &#8211; which may include the queuing of this task for future execution.</p>
<p>In this example, the thread pool is switched off on purpose, and the Runnable task fails. The failed runnable task is redirected to the rejected execution handler, which queues it in a Linked Blocking Queue.</p>
<p>There is another thread pool with a custom Thread Factory consisting of Deferred worker threads.</p>
<p>The deferred thread pool has all its worker threads &#8220;pre-started&#8221;, and they all block on the runnable queue. As the Runnable tasks start failing, they are added to the runnable queue and picked up by the deferred worker threads for execution.</p>
<p><strong>Code Files:</strong></p>
<p>1. RejectedTasksDemo.java &#8211; where all the action starts</p>
<p>2. RejectedHandler.java &#8211; which implements the RejectedExecutionHandler interface</p>
<p>3. WorkerThread.java &#8211; the thread which does all the hard work !</p>
<p>4. DeferredWorker.java &#8211; the worker thread which does the clean-up once the Runnable fails after reading from the runnable queue.</p>
<p>5. CustomThreadFactory.java &#8211; the thread factory for the deferred thread pool.</p>
<p><strong>Code Snippets:</strong></p>
<p><strong>RejectedTasksDemo Class:</strong></p>
<blockquote>
<pre><strong>package org.demo.java.rejectedhandlers;</strong>

<strong>import java.util.Queue;</strong>
<strong>import java.util.concurrent.Executors;</strong>
<strong>import java.util.concurrent.LinkedBlockingQueue;</strong>
<strong>import java.util.concurrent.ThreadPoolExecutor;</strong>

<strong>/**</strong>
<strong> * </strong>
<strong> * @author aayush.bhatnagar</strong>
<strong> * </strong>
<strong> * A class demonstrating the rejected execution handler.</strong>
<strong> *</strong>
<strong> */</strong>
<strong>public class RejectedTasksDemo </strong>
<strong>{</strong>

<strong>// Thread pool with the rejected executor handler configured</strong>
<strong>public static ThreadPoolExecutor threadP = (ThreadPoolExecutor) Executors.newFixedThreadPool(3);</strong>

<strong>// Threads which will block on the runnable queue.</strong>
<strong>public static ThreadPoolExecutor threadR = (ThreadPoolExecutor) Executors.newFixedThreadPool(3);</strong>

<strong>// Queue for storing the runnable instances which cannot be executed by threadP</strong>
<strong>public static Queue&lt;Runnable&gt; runnable_queue = new LinkedBlockingQueue&lt;Runnable&gt;();</strong>

<strong> public static void main (String[] args) throws InterruptedException </strong>

<strong> {</strong>
<strong> threadR.setThreadFactory(new CustomThreadFactory());</strong>
<strong> threadP.setRejectedExecutionHandler(new RejectedHandler());</strong>

<strong> // pre start all core threads..</strong>
<strong> threadR.prestartAllCoreThreads();</strong>

<strong> threadP.submit(new WorkerThread("runnable executed by the thread pool executor.."));</strong>
<strong> Thread.sleep(300L);</strong>
<strong> // shutdown..</strong>
<strong> threadP.shutdownNow();</strong>
<strong> // Now the rejected tasks handler comes into the picture..</strong>
<strong> threadP.submit(new WorkerThread("runnable which got rejected-1.."));</strong>
<strong> threadP.submit(new WorkerThread("runnable which got rejected-2.."));</strong>
<strong> threadP.submit(new WorkerThread("runnable which got rejected-3.."));</strong>

<strong> // shut down the deferred thread pool:</strong>
<strong> threadR.shutdown();</strong>

<strong> }</strong>

<strong>}</strong></pre>
</blockquote>
<p><strong>RejectedHandler.java</strong></p>
<pre></pre>
<blockquote>
<pre><strong>package org.demo.java.rejectedhandlers;</strong>

<strong>import java.util.concurrent.RejectedExecutionHandler;</strong>
<strong>import java.util.concurrent.ThreadPoolExecutor;</strong>

<strong>/**</strong>
<strong> * </strong>
<strong> * @author aayush.bhatnagar</strong>
<strong> * </strong>
<strong> * The call back handler which is invoked when a task cannot be </strong>
<strong> * executed by the thread pool executor.</strong>
<strong> *</strong>
<strong> */</strong>
<strong>public class RejectedHandler implements RejectedExecutionHandler</strong>
<strong>{</strong>

<strong> @Override</strong>
<strong> public void rejectedExecution(Runnable task, ThreadPoolExecutor executor) </strong>
<strong> {</strong>

<strong> System.out.println("oops..race condition. Somebody turned off the thread pool executor..");</strong>
<strong> System.out.println("need to complete the rejected task..");</strong>
<strong> // Implementations may even decide to queue the task for deferred execution.</strong>
<strong> System.out.println("Adding the rejected task to runnable queue -- "+RejectedTasksDemo.runnable_queue.add(task));</strong>

<strong> }</strong>

<strong>}</strong></pre>
</blockquote>
<pre></pre>
<p><strong>WorkerThread.java</strong></p>
<blockquote>
<pre><strong>package org.demo.java.rejectedhandlers;</strong>

<strong>/**</strong>
<strong> * </strong>
<strong> * @author aayush.bhatnagar</strong>
<strong> * </strong>
<strong> * A worker thread.</strong>
<strong> *</strong>
<strong> */</strong>

<strong>public class WorkerThread implements Runnable</strong>
<strong>{</strong>
<strong> private String description;</strong>

<strong> public WorkerThread(String description)</strong>
<strong> {</strong>
<strong> this.description = description;</strong>
<strong> }</strong>

<strong> public WorkerThread() {</strong>

<strong> }</strong>
<strong> @Override</strong>
<strong> public void run() {</strong>
<strong> System.out.println("Thread type -- "+description);</strong>
<strong> System.out.println("Doing some work....");</strong>
<strong> System.out.println("Work done..retiring for the day..\n");</strong>

<strong> }</strong>
}</pre>
</blockquote>
<pre></pre>
<p><strong>DeferredWorker.java</strong></p>
<pre></pre>
<blockquote>
<pre><strong>package org.demo.java.rejectedhandlers;</strong>

<strong>/**</strong>
<strong> * </strong>
<strong> * @author aayush.bhatnagar</strong>
<strong> * </strong>
<strong> * Thread which blocks on the runnable queue and picks up tasks from it </strong>
<strong> * for deferred execution.</strong>
<strong> *</strong>
<strong> */</strong>
<strong>public class DeferredWorker extends Thread</strong>
<strong>{</strong>

<strong> private boolean exit_flag = true;</strong>
<strong> public DeferredWorker() </strong>
<strong> {</strong>

<strong> }</strong>

<strong> @Override</strong>
<strong> public void run() {</strong>
<strong> System.out.println("Deferred thread started -- "+ this.getName());</strong>

<strong> while(exit_flag)</strong>
<strong> {</strong>
<strong> if(RejectedTasksDemo.runnable_queue.peek()!=null)</strong>
<strong> {</strong>
<strong> System.out.println("Iterating over the runnable queue == "+this.getName());</strong>
<strong> Runnable task = RejectedTasksDemo.runnable_queue.poll();</strong>
<strong> if(task!=null)</strong>
<strong> {</strong>
<strong> task.run();</strong>

<strong> if(RejectedTasksDemo.runnable_queue.isEmpty())</strong>
<strong> this.exit_flag = false;</strong>
<strong> }</strong>
<strong> }</strong>
<strong> }</strong>

<strong> }</strong>

<strong>}</strong></pre>
</blockquote>
<p><strong>CustomThreadFactory.java</strong></p>
<blockquote>
<pre><strong>package org.demo.java.rejectedhandlers;</strong>

<strong>import java.util.concurrent.ThreadFactory;</strong>

<strong>/**</strong>
<strong> * </strong>
<strong> * @author aayush.bhatnagar</strong>
<strong> * </strong>
<strong> * The custom thread creation factory</strong>
<strong> *</strong>
<strong> */</strong>
<strong>public class CustomThreadFactory implements ThreadFactory {</strong>

<strong> @Override</strong>
<strong> public Thread newThread(Runnable task) </strong>
<strong> {</strong>
<strong> Thread t = new DeferredWorker();</strong>
<strong> t.setName("deferred");</strong>
<strong> return t;</strong>
<strong> }</strong>

<strong>}</strong></pre>
<div><strong><br />
</strong></div>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/whitelassiblog.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/whitelassiblog.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/whitelassiblog.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/whitelassiblog.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/whitelassiblog.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/whitelassiblog.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/whitelassiblog.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/whitelassiblog.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/whitelassiblog.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/whitelassiblog.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/whitelassiblog.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/whitelassiblog.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/whitelassiblog.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/whitelassiblog.wordpress.com/312/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=whitelassiblog.wordpress.com&amp;blog=4873685&amp;post=312&amp;subd=whitelassiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://whitelassiblog.wordpress.com/2011/09/25/java-concurrency-utilities-part-02-rejected-execution-handlers-thread-factories-and-runnable-queues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3793235d75f5c3a867182effca5ec17?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">whitelassiblog</media:title>
		</media:content>
	</item>
		<item>
		<title>Java Concurrency Utilities (Part-01): Callable, Future and FutureTask</title>
		<link>http://whitelassiblog.wordpress.com/2011/09/25/java-concurrency-utilities-part-01-callable-future-and-futuretask/</link>
		<comments>http://whitelassiblog.wordpress.com/2011/09/25/java-concurrency-utilities-part-01-callable-future-and-futuretask/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 15:26:11 +0000</pubDate>
		<dc:creator>whitelassiblog</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[callable]]></category>
		<category><![CDATA[future]]></category>
		<category><![CDATA[futuretask]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[runnable]]></category>
		<category><![CDATA[thread]]></category>
		<category><![CDATA[thread pool]]></category>

		<guid isPermaLink="false">http://whitelassiblog.wordpress.com/?p=308</guid>
		<description><![CDATA[In this post, I will demonstrate through a very simple program the usage of the Callable, Future and FutureTask utilities. These utilities are present in the java.util.concurrent package. However, before we come to the actual code &#8211; it is important to understand the use-cases behind the need for these utilities. The use-case for having a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=whitelassiblog.wordpress.com&amp;blog=4873685&amp;post=308&amp;subd=whitelassiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this post, I will demonstrate through a very simple program the usage of the Callable, Future and FutureTask utilities. These utilities are present in the java.util.concurrent package.</p>
<p>However, before we come to the actual code &#8211; it is important to understand the use-cases behind the need for these utilities.</p>
<p><strong>The use-case for having a Callable interface:</strong></p>
<p>Sometimes, in our applications &#8211; we feel the need for our worker threads to have a return value. Doing so with usual threads is not possible, as the run() method does not have a return type.</p>
<p>In such cases, we can create a class which implements the Callable &#8220;type&#8221; and pass the instance of that class  to the in-built java thread pool.</p>
<p>The class which implements callable, is executed in a thread inside the Executor, and the return value of the &#8220;callable&#8221; is made available once the thread&#8217;s execution completes.</p>
<p><strong>The use-case for Future and FutureTask:</strong></p>
<p>It is often seen, that while designing APIs (being exposed to 3rd party applications), developers may provide API variants which expose a &#8220;synchronous&#8221; behavior as well as an option of &#8220;asynchronous&#8221; behavior, as viewed from the 3rd party application.</p>
<p>The processing for each incoming API call may happen in a worker thread, which in turn exchanges data over the network (or does some file I/O etc), and then a return value needs to be presented (think Callable), which has to be sent back to the API caller.</p>
<p>Hence, for the API caller, it seems that the invocation was synchronous. However, under the hood &#8211; the API spawns a worker thread, which is executed asynchronously by a thread pool and returns a value at some point in the &#8220;future&#8221;, when the processing is done.</p>
<p>In such cases, the concepts around Future and Future Task become important and come in handy for developers.</p>
<p>One of the <span style="text-decoration:underline;"><strong>practical usages of Future utilities</strong></span> can be from a protocol stack perspective &#8211; where the client sends a message through the stack. The stack sends the message over the network in a request submitter thread, receives a response &#8220;in the future&#8221; in a response listener thread and then this response is returned back to the caller thread.</p>
<p>The request submitter thread and the response receiver thread can communicate through an &#8220;Exchanger&#8221; concurrency utility of Java -  (<a href="http://download.oracle.com/javase/6/docs/api/java/util/concurrent/Exchanger.html">http://download.oracle.com/javase/6/docs/api/java/util/concurrent/Exchanger.html</a>). However, this is a story for another time.</p>
<p>The example below is not that complex ! It only introduces these utilities.</p>
<blockquote><p><span style="color:#800000;"><strong>Both these use-cases are illustrated below in the form of code snippets:</strong></span></p></blockquote>
<p>Code Snippet &#8211; Demonstrating Callable, Future and Future Task:</p>
<p><strong>The main class &#8211; where we do all the stuff:</strong></p>
<blockquote>
<pre><span style="color:#800000;">package org.demo.java.future;</span>

<span style="color:#800000;">import java.util.concurrent.ExecutionException;</span>
<span style="color:#800000;">import java.util.concurrent.ExecutorService;</span>
<span style="color:#800000;">import java.util.concurrent.Executors;</span>
<span style="color:#800000;">import java.util.concurrent.Future;</span>
<span style="color:#800000;">import java.util.concurrent.FutureTask;</span>

<span style="color:#800000;">/**</span>
<span style="color:#800000;"> * </span>
<span style="color:#800000;"> * @author aayush.bhatnagar</span>
<span style="color:#800000;"> * </span>
<span style="color:#800000;"> * Demo for Callable, Future and FutureTask.</span>
<span style="color:#800000;"> *</span>
<span style="color:#800000;"> */</span>
<span style="color:#800000;">public class FutureDemo </span>
<span style="color:#800000;">{</span>
<span style="color:#800000;"> // This is our thread pool, which uses Java's internal thread pooling utilities.</span>
<span style="color:#800000;"> public static ExecutorService threadPool = Executors.newFixedThreadPool(3);</span>

<span style="color:#800000;"> public static void main (String[] args) throws InterruptedException, ExecutionException</span>
<span style="color:#800000;"> {</span>
<span style="color:#800000;"> // Demonstrating the Callable Interface usage.</span>
<span style="color:#800000;"> /*</span>
<span style="color:#800000;"> * The SomeTask.java class implements the Callable Interface, and is passed as an </span>
<span style="color:#800000;"> * argument to the thread pool's submit method.</span>
<span style="color:#800000;"> * </span>
<span style="color:#800000;"> * Please note, that the SomeTask class is not a Runnable type, but a Callable type.</span>
<span style="color:#800000;"> * </span>
<span style="color:#800000;"> * Being a callable type means, that SomeTask can return a value once the task is executed by the</span>
<span style="color:#800000;"> * worker thread.</span>
<span style="color:#800000;"> */</span>

<span style="color:#800000;"> // The return value of the Callable, is stored here as a "Future" type.</span>
<span style="color:#800000;"> // In this particular example, we are expecting a String return type.</span>
<span style="color:#800000;"> Future&lt;String&gt; result = threadPool.submit(new SomeTask());</span>
<span style="color:#800000;"> // Getting the result as a Future type.</span>
<span style="color:#800000;"> String res = result.get();</span>

<span style="color:#800000;"> System.out.println("Result --&gt; "+res);</span>

<span style="color:#800000;"> /*</span>
<span style="color:#800000;"> * A FutureTask class implements the Future interface. It provides for some</span>
<span style="color:#800000;"> * utility and control mechanisms on how the "Future" task would behave as follows - </span>
<span style="color:#800000;"> */</span>
<span style="color:#800000;"> // Created a new future task with a Callable argument.</span>
<span style="color:#800000;"> FutureTask&lt;String&gt; task = new FutureTask&lt;String&gt;(new SomeTask());</span>
<span style="color:#800000;"> // Submitting to the thread pool..</span>
<span style="color:#800000;"> threadPool.submit(task);</span>
<span style="color:#800000;"> // Getting the result from the Future type (Future Task in this case).</span>
<span style="color:#800000;"> String res1 = task.get();</span>

<span style="color:#800000;"> System.out.println("Result --&gt; "+res1);</span>

<span style="color:#800000;"> }</span>

<span style="color:#800000;">}</span></pre>
</blockquote>
<p><strong>The SomeTask.java class which implements the Callable interface:</strong></p>
<blockquote>
<pre><span style="color:#800000;">package org.demo.java.future;</span>

<span style="color:#800000;">import java.util.concurrent.Callable;</span>

<span style="color:#800000;">/**</span>
<span style="color:#800000;"> * </span>
<span style="color:#800000;"> * @author aayush.bhatnagar</span>
<span style="color:#800000;"> * </span>
<span style="color:#800000;"> * This class implements the Callable interface and</span>
<span style="color:#800000;"> * provides the implementation to the call ( ) method.</span>
<span style="color:#800000;"> *</span>
<span style="color:#800000;"> */</span>
<span style="color:#800000;">public class SomeTask implements Callable&lt;String&gt;</span>
<span style="color:#800000;">{</span>

<span style="color:#800000;"> @Override</span>
<span style="color:#800000;"> public String call() throws Exception </span>
<span style="color:#800000;"> {</span>
<span style="color:#800000;"> // Here we do some dummy work.</span>
<span style="color:#800000;"> System.out.println("processing....");</span>
<span style="color:#800000;"> try {</span>
<span style="color:#800000;"> Thread.sleep(200L);</span>
<span style="color:#800000;"> } catch (InterruptedException e) {</span>

<span style="color:#800000;"> e.printStackTrace();</span>
<span style="color:#800000;"> }</span>
<span style="color:#800000;"> System.out.println("processing complete..exiting..");</span>

<span style="color:#800000;"> return "processing is complete";</span>
<span style="color:#800000;"> }</span>

<span style="color:#800000;">}</span></pre>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/whitelassiblog.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/whitelassiblog.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/whitelassiblog.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/whitelassiblog.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/whitelassiblog.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/whitelassiblog.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/whitelassiblog.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/whitelassiblog.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/whitelassiblog.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/whitelassiblog.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/whitelassiblog.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/whitelassiblog.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/whitelassiblog.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/whitelassiblog.wordpress.com/308/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=whitelassiblog.wordpress.com&amp;blog=4873685&amp;post=308&amp;subd=whitelassiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://whitelassiblog.wordpress.com/2011/09/25/java-concurrency-utilities-part-01-callable-future-and-futuretask/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3793235d75f5c3a867182effca5ec17?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">whitelassiblog</media:title>
		</media:content>
	</item>
		<item>
		<title>TM Forum&#8217;s Frameworx Introduction</title>
		<link>http://whitelassiblog.wordpress.com/2011/08/14/tm-forums-frameworx-introduction/</link>
		<comments>http://whitelassiblog.wordpress.com/2011/08/14/tm-forums-frameworx-introduction/#comments</comments>
		<pubDate>Sun, 14 Aug 2011 17:57:11 +0000</pubDate>
		<dc:creator>whitelassiblog</dc:creator>
				<category><![CDATA[3gpp]]></category>
		<category><![CDATA[eTOM]]></category>
		<category><![CDATA[frameworx]]></category>
		<category><![CDATA[MTNM]]></category>
		<category><![CDATA[MTOSI]]></category>
		<category><![CDATA[NMS]]></category>
		<category><![CDATA[OAM]]></category>
		<category><![CDATA[SID]]></category>
		<category><![CDATA[TAM]]></category>
		<category><![CDATA[TM Forum]]></category>
		<category><![CDATA[Business Services]]></category>
		<category><![CDATA[OSS/BSS]]></category>

		<guid isPermaLink="false">http://whitelassiblog.wordpress.com/?p=304</guid>
		<description><![CDATA[Introduction: The Tele Management Forum (www.tmforum.org) introduced the concept of an Integrated Business Architecture to epitomize the end-to-end view of the OSS/BSS ecosystem of a Service Provider&#8217;s network. The Integrated Business Architecture is a convergence of the four major frameworks of the TM Forum standards. These four major frameworks put together are collectively known as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=whitelassiblog.wordpress.com&amp;blog=4873685&amp;post=304&amp;subd=whitelassiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;"><span style="color:#0000ff;"><strong>Introduction:</strong></span></p>
<p style="text-align:justify;">The Tele Management Forum (www.tmforum.org) introduced the concept of an Integrated Business Architecture to epitomize the end-to-end view of the OSS/BSS ecosystem of a Service Provider&#8217;s network.</p>
<p style="text-align:justify;">The Integrated Business Architecture is a convergence of the four major frameworks of the TM Forum standards.</p>
<p style="text-align:justify;"><a href="http://whitelassiblog.files.wordpress.com/2011/08/frameworx.jpg"><img class="aligncenter size-full wp-image-305" title="frameworx" src="http://whitelassiblog.files.wordpress.com/2011/08/frameworx.jpg" alt="" width="350" height="389" /></a></p>
<p style="text-align:justify;">These four major frameworks put together are collectively known as the &#8220;<strong><em>frameworx</em></strong>&#8220;;  namely -</p>
<p style="text-align:justify;">1. eTOM (Enhanced Telecom Operations Map) which is the Business Process Framework</p>
<p style="text-align:justify;">2. SID (Shared Information and Data Model) which is the Information Framework</p>
<p style="text-align:justify;">3. TAM (Telecom Application Map) which is the Applications Framework</p>
<p style="text-align:justify;">4. TNA (Technology Neutral Architecture) which is the Integration Framework</p>
<p style="text-align:justify;">
<p style="text-align:justify;"><span style="color:#0000ff;"><strong>Frameworx one by one - </strong></span></p>
<p style="text-align:justify;">The <strong>Business Process Framework (eTOM)</strong> standardizes the business process view of a Service Provider&#8217;s business operations. The business process framework is a logical layout of horizontals and vertical constructs where the horizontals concentrate on a particular domain of business operations, while the verticals are end-to-end views spanning across these horizontals.</p>
<p style="text-align:justify;">At the intersection of these horizontals and verticals, the business process framework defines certain process elements &#8211; which are a reusable set of business activities to be performed. The service provider can stitch these process elements together to realize end-to-end business process flows.</p>
<p style="text-align:justify;">The <strong>Information Framework (SID)</strong> standardizes and defines a set of business entities &#8211; which represent the information (entities and their attributes) which flows across the organization. The Information framework defines an information model, which can be extended and realized to present an implementable data model.</p>
<p style="text-align:justify;">These business entities are created, read, updated and deleted (CRUD) by the process elements defined in the business process framework. The unified modelling language (UML) is used for representing the business entities and for extending them for use.</p>
<p style="text-align:justify;">The<strong> Application Framework (TAM)</strong>, defines a set of applications which are a realization of how the business processes are implemented as part of a software architecture. The TAM applications represent a set of software applications which can be used as a reference for implementation by ISVs and as a common reference map for the procurement of OSS/BSS software and systems. The TAM also presents a non-exhaustive list of capabilities for each application which is a useful tool for gauging compliance.</p>
<p style="text-align:justify;">The TM Forum community is working on defining mappings between TAM applications, SID business entities and eTOM process elements for providing an end-to-end logical view and reference for the service provider and ISVs.</p>
<p style="text-align:justify;">The <strong>Integration Framework</strong> defines a methodology and guideline for enabling systems integration between systems by the use of standardized &#8216;Business Services&#8217;. The role of the integration framework is to promote interoperability between systems and to define a common paradigm for systems integration across the industry using a SOA based integration framework realization &#8211; such as an ESB.</p>
<p style="text-align:justify;">In addition to the ESB capabilities (which are expected), the integration framework defines a capability-dependency model of business service design. Several business services come together to form software components, which are responsible for the flow of information between disparate systems.</p>
<p style="text-align:justify;">The integration framework is supported by the TM Forum Inteface standardization activities which include the following interfaces-</p>
<p style="text-align:justify;">- MTOSI (Multi-Technology Operations Systems Interface)</p>
<p style="text-align:justify;">- MTNM (Multi-Technology Network Management)</p>
<p style="text-align:justify;">- IPDR (Internet Protocol Detail Record)</p>
<p style="text-align:justify;">- OSS/J (OSS using Java)</p>
<p style="text-align:justify;">- ESC (Enterprise Security)</p>
<p style="text-align:justify;">- SPM (Service Problem Management)</p>
<p style="text-align:justify;">Moreover, work is ongoing to harmonize the TM Forum Interfaces with the 3GPP defined Integration Reference Points (IRPs). An old post detailing the IRPs can be found here &#8211; <strong><a href="http://whitelassiblog.wordpress.com/2009/12/08/operations-and-management-oam-fundamentals-for-ims/" target="_blank">OAM Fundamentals for IMS</a></strong></p>
<p style="text-align:justify;"><span style="color:#0000ff;"><strong>Summary:</strong></span></p>
<p style="text-align:justify;">The TM Forum Frameworx provides a complete end-to-end view of business operations for any Service Provider&#8217;s network. It is necessary that for interoperability and smooth operations, ISVs and SPs comply with the TM Forum standards.</p>
<p style="text-align:justify;">Standards compliance is required for Greenfield operations, so that the OSS/BSS implementation is done correctly the first time itself and the SP achieves fast Time to Market.</p>
<p style="text-align:justify;">For Brownfield operations, standards conformance and alignment is required &#8211; so that future enhancements to the OSS/BSS stack can be done smoothly, and the same stack can be re-used for multiple lines of businesses.</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/whitelassiblog.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/whitelassiblog.wordpress.com/304/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/whitelassiblog.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/whitelassiblog.wordpress.com/304/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/whitelassiblog.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/whitelassiblog.wordpress.com/304/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/whitelassiblog.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/whitelassiblog.wordpress.com/304/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/whitelassiblog.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/whitelassiblog.wordpress.com/304/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/whitelassiblog.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/whitelassiblog.wordpress.com/304/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/whitelassiblog.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/whitelassiblog.wordpress.com/304/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=whitelassiblog.wordpress.com&amp;blog=4873685&amp;post=304&amp;subd=whitelassiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://whitelassiblog.wordpress.com/2011/08/14/tm-forums-frameworx-introduction/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3793235d75f5c3a867182effca5ec17?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">whitelassiblog</media:title>
		</media:content>

		<media:content url="http://whitelassiblog.files.wordpress.com/2011/08/frameworx.jpg" medium="image">
			<media:title type="html">frameworx</media:title>
		</media:content>
	</item>
	</channel>
</rss>
