<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.radvision.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.radvision.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Code of Contact</title>
	
	<link>http://blog.radvision.com/codeofcontact</link>
	<description>The ins and outs of V²oIP &amp; IMS programming</description>
	<pubDate>Thu, 08 Jan 2009 13:58:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
	<language>en</language>
			<image><url>http://www.radvision.com/radvision/Images//design/radvision.gif</url></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.radvision.com/CodeOfContact" type="application/rss+xml" /><feedburner:emailServiceId>1551593</feedburner:emailServiceId><feedburner:feedburnerHostname>http://www.feedburner.com</feedburner:feedburnerHostname><item>
		<title>No Need to Program Perfection</title>
		<link>http://feeds.radvision.com/~r/CodeOfContact/~3/506214624/</link>
		<comments>http://blog.radvision.com/codeofcontact/2009/01/08/no-need-to-program-perfection/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 13:58:59 +0000</pubDate>
		<dc:creator>Ran Arad</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[algorithms]]></category>

		<category><![CDATA[programming]]></category>

		<category><![CDATA[Statistics]]></category>

		<guid isPermaLink="false">http://blog.radvision.com/codeofcontact/?p=59</guid>
		<description><![CDATA[Being perfect is hard work. Being perfectly efficient is twice as hard, even impossible at times. However, being mostly efficient, well, that just takes some thought and planning.
Types of random algorithms
There are random algorithms that always produce a correct result called Las Vegas Algorithms. There are Monte Carlo algorithms, random algorithms that have a margin [...]<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>
]]></description>
			<content:encoded><![CDATA[<p>Being perfect is hard work. Being perfectly efficient is twice as hard, even impossible at times. However, being mostly efficient, well, that just takes some thought and planning.</p>
<h3>Types of random algorithms</h3>
<p>There are random algorithms that always produce a correct result called <a href="http://en.wikipedia.org/wiki/Las_Vegas_algorithm">Las Vegas Algorithms</a>. There are <a href="http://en.wikipedia.org/wiki/Monte_Carlo_algorithm">Monte Carlo algorithms</a>, random algorithms that have a margin for error that can be made as small as required (one of my lecturers at the university proclaimed that once you reach 2<sup>-300</sup> - usually not very hard, you have a better chance to locate a specific atom in the universe). Both of these use some random way of accessing the problem. I though, would like to discuss statistical algorithms, which are algorithms that do not use random number generators, but instead rely on the input to be sufficiently random. They may not always produce the best result, but in the long run, they produce good enough results, especially since they are far more efficient than the perfect algorithm.</p>
<p>Take sorting a stream of random elements for example. Sorting <a href="http://en.wikipedia.org/wiki/Qsort">efficiently</a> takes a little memory overhead and can be done with logarithmic efficiency. What if we don&#8217;t really need perfect sorting? What if we just require that the smaller elements be separated from the others? That can be done with constant efficiency - just deciding if the element is one of the smaller ones or not. Of course, we need to decide where we draw the line between small and large elements. We could do so statistically, for instance, start with some arbitrary number and for every element processed, add one if it is larger than the limit and subtract four if it is smaller than the limit. After some time, we will be very close to separating the smaller 20% of the numbers. Moreover, the limit will adapt to changes in the input: if we suddenly start getting larger or smaller elements, the limit will shift to its steady state: 20% of the time it will be lowered by four and 80% of the time it will be raised by one, hovering around the same number.</p>
<p>The solution displayed above is not correct all the time, but if the input is random enough, it will give good results most of the time. The trick when using statistical algorithms is to accumulate the good results and try to reiterate the incorrect results. In the best case, an accumulation of good results that can be detected and separated, allowing the algorithm to improve its work. Such is the case of memory fragmentation.</p>
<h3>Efficient Allocation</h3>
<p>One of our protocol stacks here at RADVISION, <a href="http://www.radvision.com/Products/Developer/Protocol/MEGACO/">MEGACO</a>, suffered from a memory fragmentation problem. It uses dynamic memory allocation, and in some of the operating systems, allocating and freeing small memory sizes degrades performance over time. It became necessary to manage the way memory is allocated. We created a memory manager that allocated large memory sections (we called them &#8220;pages&#8221;) and divided each page to smaller allocations (called &#8220;blocks&#8221;). Memory allocations were rounded up to the nearest block size and when pages were filled up, new pages were allocated.</p>
<p>The problem was with freeing memory: we could only free a page when all the blocks in it were freed. At the same time, we needed to allocate memory from the same pages. A perfectly correct algorithm would need to keep a sorted list of the pages by their fullness, and allocate from the fullest page only, or perhaps consider the relative allocation times. These lists should be resorted on each allocation and freeing of a memory block, hindering efficiency. We decided to create an algorithm that would be mostly correct, but much more efficient. We divide the pages into four bins by fullness, and we allocate memory from the bin with fullest pages first. We assume that memory freed could belong to any page, so by allocating memory from the fullest pages, we allow pages that are vacant to free up until they are empty and can be released. The division to bins then helps memory pages that are partially vacant to continue the process until freeing up completely.</p>
<p align="center"><a href="http://www.flickr.com/photos/mousyboywithglasses/399783713/sizes/m/"><img class="alignnone" src="http://farm1.static.flickr.com/129/399783713_f27ddfe821.jpg" alt="" width="500" height="213" /></a></p>
<p>Let&#8217;s study the algorithm: memory load rises, so more memory is allocated. We keep allocating pages and allocating from them. Each new page starts at the freest bin and moves to the fullest. Then we stay around the peak load for a while and memory is freed and allocated constantly. Almost all the pages will remain in the fullest bin. Now the load decreases somewhat so pages start freeing up. As soon as a page drops from the fullest bin to the not-so-full bin, no allocations will be made from it - there are enough pages in the full bin. This is what I called &#8220;separation of good results&#8221; earlier. Pages that dropped to a lower bin should keep moving through the bins as old memory is freed and new memory is allocated only from the full bin. At this stage, there is a significant memory overhead, but this would be the case even if our algorithm used the best predictions, and in the long run, our algorithm will achieve almost the same results.</p>
<h3>Similar Applications</h3>
<ul>
<li> <a href="http://en.wikipedia.org/wiki/Branch_prediction">Branch prediction schemes</a></li>
<li> <a href="http://en.wikipedia.org/wiki/Reinforcement_learning">Reinforcement Learning</a></li>
<li> <a href="http://en.wikipedia.org/wiki/Optimal_control">Optimal Control</a></li>
</ul>
<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.radvision.com/codeofcontact/2008/10/29/the-zen-pointer/" title="The Zen Pointer (October 29, 2008)">The Zen Pointer</a> (0)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/11/05/the-void-pointer-take-2/" title="The Void Pointer (November 5, 2008)">The Void Pointer</a> (0)</li>
</ul>

<div class="feedflare">
<a href="http://feeds.radvision.com/~f/CodeOfContact?a=FDkLOa.P"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=FDkLOa.P" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=qDG5sH.p"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=qDG5sH.p" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=VjXB0B.p"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=VjXB0B.p" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=syOmpo.P"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=syOmpo.P" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=cLYoaH.P"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=cLYoaH.P" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=iBr8in.p"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=iBr8in.p" border="0"></img></a>
</div><img src="http://feeds.radvision.com/~r/CodeOfContact/~4/506214624" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.radvision.com/codeofcontact/2009/01/08/no-need-to-program-perfection/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CodeOfContact&amp;itemurl=http%3A%2F%2Fblog.radvision.com%2Fcodeofcontact%2F2009%2F01%2F08%2Fno-need-to-program-perfection%2F</feedburner:awareness><feedburner:origLink>http://blog.radvision.com/codeofcontact/2009/01/08/no-need-to-program-perfection/</feedburner:origLink></item>
		<item>
		<title>Merry Christmas, Feliz Navidad, Happy Holidays, Happy Hanukkah, Happy Kwanzaa, and Happy New Year!</title>
		<link>http://feeds.radvision.com/~r/CodeOfContact/~3/491407109/</link>
		<comments>http://blog.radvision.com/codeofcontact/2008/12/21/merry-christmas-feliz-navidad-happy-holidays-happy-hanukkah-happy-kwanzaa-and-happy-new-year/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 14:30:33 +0000</pubDate>
		<dc:creator>Ran Arad</dc:creator>
		
		<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://blog.radvision.com/codeofcontact/?p=58</guid>
		<description><![CDATA[The RADVISION Blogging Team would like to wish you, your family, and your friends a happy holiday season, no matter what religious occasion you celebrate if any. We hope that you have a safe season, especially if you will be traveling.

No elves or reindeers were harmed in the making of this blog post&#8230;






Download your free [...]<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>
]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://blog.radvision.com/about/">RADVISION Blogging Team</a> would like to wish you, your family, and your friends a happy holiday season, no matter what religious occasion you celebrate if any. We hope that you have a safe season, especially if you will be traveling.</p>
<p align="center"><img class="alignnone" src="http://blog.radvision.com/images/2008/20081221-Christmas-greetings.jpg" alt="" width="600" height="450" /></p>
<p>No elves or reindeers were harmed in the making of this blog post&#8230;</p>
<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li>No related posts.</li>
	</ul>

<div class="feedflare">
<a href="http://feeds.radvision.com/~f/CodeOfContact?a=XN26O"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=XN26O" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=tB6jo"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=tB6jo" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=WnQRo"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=WnQRo" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=5vJfO"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=5vJfO" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=tPiEO"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=tPiEO" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=6UDEo"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=6UDEo" border="0"></img></a>
</div><img src="http://feeds.radvision.com/~r/CodeOfContact/~4/491407109" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.radvision.com/codeofcontact/2008/12/21/merry-christmas-feliz-navidad-happy-holidays-happy-hanukkah-happy-kwanzaa-and-happy-new-year/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CodeOfContact&amp;itemurl=http%3A%2F%2Fblog.radvision.com%2Fcodeofcontact%2F2008%2F12%2F21%2Fmerry-christmas-feliz-navidad-happy-holidays-happy-hanukkah-happy-kwanzaa-and-happy-new-year%2F</feedburner:awareness><feedburner:origLink>http://blog.radvision.com/codeofcontact/2008/12/21/merry-christmas-feliz-navidad-happy-holidays-happy-hanukkah-happy-kwanzaa-and-happy-new-year/</feedburner:origLink></item>
		<item>
		<title>Jitter Buffer HowTo</title>
		<link>http://feeds.radvision.com/~r/CodeOfContact/~3/485594283/</link>
		<comments>http://blog.radvision.com/codeofcontact/2008/12/15/jitter-buffer-howto/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 14:23:13 +0000</pubDate>
		<dc:creator>Ran Arad</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[adaptive]]></category>

		<category><![CDATA[ajb]]></category>

		<category><![CDATA[buffers]]></category>

		<category><![CDATA[codec]]></category>

		<category><![CDATA[fec]]></category>

		<category><![CDATA[Implementation]]></category>

		<category><![CDATA[Jitter]]></category>

		<category><![CDATA[media quality]]></category>

		<category><![CDATA[packet loss]]></category>

		<category><![CDATA[RTP]]></category>

		<category><![CDATA[Simplicity]]></category>

		<guid isPermaLink="false">http://blog.radvision.com/codeofcontact/?p=57</guid>
		<description><![CDATA[We just implemented an Adaptive Jitter Buffer (AJB) module over our Advanced RTP stack and I wanted to share a few insights that I arrived at during development.
What is Jitter?
A quick statistics reference, over an IP network, packets sent are always received in the same order that they were sent in or with the same [...]<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>
]]></description>
			<content:encoded><![CDATA[<p>We just implemented an Adaptive Jitter Buffer (AJB) module over our <a href="http://www.radvision.com/Products/Developer/Protocol/AdvancedRTP/">Advanced RTP stack</a> and I wanted to share a few insights that I arrived at during development.</p>
<h3>What is Jitter?</h3>
<p>A quick statistics reference, over an IP network, packets sent are always received in the same order that they were sent in or with the same latency. For simplicity sake, we&#8217;ll look at the time between sending and arrival of a packet as a random variable with a <a href="http://en.wikipedia.org/wiki/Normal_distribution">normal distribution</a>. The mean of the distribution correlates to the network delay and the variance correlates to the jitter.</p>
<p>Our mission when we construct the Jitter Buffer is to re-evaluate the Jitter constantly in order to provide minimum delay with minimum unnecessary packet loss - packets that would have arrived if we waited for them.</p>
<p>The easiest way to fix jitter is to simply store data packets as they are received, reorder them if necessary, introduce a delay into the system that will let all (or 99%) of the packets arrive, and then replay them at the required speed. Waiting too long means the result won&#8217;t be as useful for real-time communications. On the other hand, not waiting long enough means we&#8217;re going to lose some packets along the way, which reduces media quality.</p>
<p>As we&#8217;re working with networks, the jitter isn&#8217;t static and changes when others use the same network (think internet). This is why the jitter buffer needs an ‘A&#8217; - it needs to be adaptive.</p>
<p align="center"><a href="http://www.flickr.com/photos/coriolinus/69682847/"><img class="alignnone" src="http://blog.radvision.com/images/2008/20081215-CodeOfContact-Adaptivity.jpg" alt="" width="600" height="244" /></a></p>
<h3>How to be Adaptive?</h3>
<p>I guess that&#8217;s the real question, isn&#8217;t it? You must introduce more delay if you miss packets and must then remove that delay if packets start arriving more rapidly. I won&#8217;t take you through our state machines and algorithms, but I will point out a few corner cases that deserve some thought when implementing an AJB:</p>
<ul>
<li> <strong>Pause/Resume:</strong> the RTP stream may pause (&#8217;mute&#8217; was used or when silence is detected) and later resume. How do you differentiate this from jitter? How do you know not to introduce too much delay when the stream resumes?</li>
<li> <strong>Source switch:</strong> sometimes the source of the media stream changes in the middle, perhaps some relay point starts streaming a &#8220;ringing tone&#8221; video, which is later replaced by the real source video. The new stream&#8217;s timestamps and sequence numbers may be higher or lower than the previous stream&#8217;s timestamps and sequence numbers (or one lower and one higher). How does the AJB detect the source switch? Does it remove all packets of the old source or try to sequence them one after the other? And what if the streams get mixed?</li>
<li> <strong>Too many packets:</strong> what if there are too many packets? Maybe the thread is starved or the codec is hung? Will packets be removed from the front? From the back? Maybe the AJB should recognize some kind of problem and clear the queue?</li>
</ul>
<h3><a href="http://www.flickr.com/photos/wwny/421750035/"><img class="alignright" src="http://blog.radvision.com/images/2008/20081215-CodeOfContact-AJB-Queue.jpg" alt="" width="300" height="225" /></a>AJB Ecology</h3>
<p>The AJB is not alone in the world. On one side of it is the network, on the other side is the codec. From the network it receives a stream of packets, some missing, some reordered. To the codec, it must supply an ordered, a correctly timed stream of packets. There are other elements working with the AJB, like Lip Synchronization mechanisms or even Forward Error Correction (FEC):</p>
<ul>
<li> Lip Sync means the synchronization of the audio source with the video source. Since the AJB is already balancing delays and ordering timestamps, it could easily take care of synchronizing multiple streams. The only thing is - you&#8217;ll need to manage it to do so.</li>
<li> Forward Error Correction algorithms send additional packets to reconstruct lost packets; usually the FEC packet is the XOR of a few RTP packets. However, the reconstruction of an RTP packet is a costly process, locating the needed packets for the reconstruction and running XOR on the buffers to reconstruct the lost packet. The AJB can be a good indicator as to when a reconstruction is needed, when a packet is extracted and the next packet to be extracted is missing. The AJB can also signal the FEC module to try and reconstruct it.</li>
</ul>
<p>The development and integration of an AJB should always consider the environment to which it is added. While expectations like &#8220;no additional delays&#8221; are unrealistic, expectations like missing packet detection and reconstruction, stream synchronization and resilience to unusual or extreme circumstances are not only realistic, but are critical to the addition of an AJB in your system.</p>
<p>If you&#8217;re looking for a jitter buffer implementation, drop us a line or give us a call, we will be having it available shortly for customers.</p>
<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.radvision.com/codeofcontact/2008/09/03/what-type-of-sdk-api-fits-your-development-needs/" title="What Type of SDK API Fits Your Development Needs? (September 3, 2008)">What Type of SDK API Fits Your Development Needs?</a> (0)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/12/03/the-last-universalist-of-voip/" title="The Last Universalist of VoIP (December 3, 2008)">The Last Universalist of VoIP</a> (0)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/03/20/follow-standards-receive-coupon/" title="Follow Standards – Receive Coupon! (details inside) (March 20, 2008)">Follow Standards – Receive Coupon! (details inside)</a> (1)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/06/09/5-must-have-tools-for-voip-developers/" title="5 must-have tools for VoIP Developers (June 9, 2008)">5 must-have tools for VoIP Developers</a> (1)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/07/03/4-gotchas-of-text-based-protocols/" title="4 Gotcha&#8217;s of text-based protocols (July 3, 2008)">4 Gotcha&#8217;s of text-based protocols</a> (3)</li>
</ul>

<div class="feedflare">
<a href="http://feeds.radvision.com/~f/CodeOfContact?a=hXJ0O"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=hXJ0O" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=lZtEo"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=lZtEo" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=XqJco"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=XqJco" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=o0l4O"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=o0l4O" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=Gvm5O"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=Gvm5O" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=gOBJo"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=gOBJo" border="0"></img></a>
</div><img src="http://feeds.radvision.com/~r/CodeOfContact/~4/485594283" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.radvision.com/codeofcontact/2008/12/15/jitter-buffer-howto/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CodeOfContact&amp;itemurl=http%3A%2F%2Fblog.radvision.com%2Fcodeofcontact%2F2008%2F12%2F15%2Fjitter-buffer-howto%2F</feedburner:awareness><feedburner:origLink>http://blog.radvision.com/codeofcontact/2008/12/15/jitter-buffer-howto/</feedburner:origLink></item>
		<item>
		<title>The Last Universalist of VoIP</title>
		<link>http://feeds.radvision.com/~r/CodeOfContact/~3/473641630/</link>
		<comments>http://blog.radvision.com/codeofcontact/2008/12/03/the-last-universalist-of-voip/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 13:56:12 +0000</pubDate>
		<dc:creator>Ran Arad</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[Standardization]]></category>

		<category><![CDATA[complexity]]></category>

		<category><![CDATA[H.323]]></category>

		<category><![CDATA[Implementation]]></category>

		<category><![CDATA[KiSS]]></category>

		<category><![CDATA[Nils Ohlmeier]]></category>

		<category><![CDATA[Protocols]]></category>

		<category><![CDATA[Simplicity]]></category>

		<category><![CDATA[SIP]]></category>

		<category><![CDATA[universalist]]></category>

		<category><![CDATA[VoIP]]></category>

		<category><![CDATA[XMPP]]></category>

		<guid isPermaLink="false">http://blog.radvision.com/codeofcontact/?p=56</guid>
		<description><![CDATA[Henri Poincaré (1854 -1912) is sometimes said to be the last mathematician to know all of Mathematics, or The Last Universalist, as he excelled in all fields of mathematics. It&#8217;s not that we don&#8217;t have bright people today, it&#8217;s just that mathematics today has so many disciplines that it is impossible to know them all [...]<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Henri_Poincar%C3%A9">Henri Poincaré</a> (1854 -1912) is sometimes said to be the last mathematician to know all of Mathematics, or The Last Universalist, as he excelled in all fields of mathematics. It&#8217;s not that we don&#8217;t have bright people today, it&#8217;s just that mathematics today has so many disciplines that it is impossible to know them all in depth and excel in them. The amount of knowledge that is needed to excel in a field is so great that we no longer have renaissance men like da Vinci; instead, we have experts in one field, or even one sub-field. Computer Science, too, has grown too large for any one person to understand all fields of it, and even the sub field of communications is packed full of protocols, methods, layers, interfaces and profiles, so much that soon, no single person could be said to know all of them.</p>
<p>For example, once SIP was said to be a simple communication protocol, far more simple than the colossal H.323. Its success over H.323 is mainly attributed to the steep learning curve for understanding H.323, too steep for mere mortals (I, as a supreme being, can establish H.323 communications telepathically). However, SIP&#8217;s days of simplicity are long gone. <a href="http://www.linkedin.com/in/nilsohlmeier">Nils Ohlmeier</a> kindly provides us with a graph of SIP-related RFC count over time:</p>
<p style="text-align: center"><a href="http://rfc3261.net/"><img class="aligncenter" src="http://blog.radvision.com/images/2008/20081203-CodeOfContact-sig-pages-obs.png" alt="" width="640" height="480" /></a></p>
<p>I see a pattern here. It would seem (albeit unscientifically) that the more popular a protocol is, the more complicated it will become through extensions and additions.</p>
<h3>Simple &amp; Stupid</h3>
<p>You might say if the situation was reversed, and H.323 was the popular protocol, it would have been even more complex than SIP, since SIP started out simple, and H.323 started out complex. I say that H.323 started out by establishing principles and using existing sub-protocols (hence the initial complexity), which made it more mature right from the start, and it would have required less extensions than SIP in the long run. Moreover, since H.323 is more rigidly layered and structured than SIP, such extensions usually require less effort to implement. But I&#8217;m being bitchy. SIP was light and simple, H.323 was colossal and complex. SIP wins, H.323 FAIL. Woe to us all.</p>
<p><a href="http://www.flickr.com/photos/ethanhein/1555066117/"><img class="alignright" src="http://blog.radvision.com/images/2008/20081203-CodeOfContact-katamari.jpg" alt="" width="300" height="225" /></a>You see, SIP was not built to win. SIP was built to be light and simple, and when all these RFCs were created on top of it, it simply broke. SIP is no longer light and simple; SIP is a whole mess of fragments and jagged edges, glued together by hundreds of conventions and know-how. Why am I thinking of &#8220;<a href="http://katamari.namco.com/">Katamari Damacy</a>&#8221; all of a sudden?</p>
<h3>Where Did TCP Go?</h3>
<p>When was the last time you gave TCP a real thought? A thought like &#8220;I wonder if the TCP connection closed gracefully?&#8221; or &#8220;Maybe that last packet didn&#8217;t get ACKed&#8221;. It&#8217;s not that TCP is so simple and trivial; there are extensions for <a href="http://www.faqs.org/rfcs/rfc1323.html">high performance</a>, <a href="http://searchnetworking.techtarget.com/sDefinition/0,,sid7_gci754347,00.html">Nagle algorithm</a>, <a href="http://www.ietf.org/rfc/rfc2581.txt">congestion control</a>, <a href="http://rfc.sunsite.dk/rfc/rfc2001.html">slow start</a>, etc. Perhaps the reason it works well enough to be mostly invisible is in the layered structure of it: it will provide nearly the same service to the layers above it and looks nearly the same as the layers below it. It&#8217;s not that there is no differentiation between implementations; our &#8220;Common Core&#8221; team would have had a much easier time if it didn&#8217;t, but it is interoperable enough that there is no real problem communicating between implementations of it.</p>
<p>The problem may be that SIP was not layered enough. H.323 also was probably not layered enough. By &#8220;layered enough&#8221;, I mean layered enough to disappear from sight, to allow anything constructed on top of it to use it blindly. When a protocol comes along that would allow building an application on top of it without any knowledge of it, I&#8217;ll know we have something.</p>
<h3>The New Kid</h3>
<p>The Extensible Messaging and Presence Protocol (<a href="http://xmpp.org/about/">XMPP</a>) is <a href="http://blog.radvision.com/voipsurvivor/2008/11/27/is-there-a-new-successor-to-sip/">coming</a>, and it has <a href="http://www.process-one.net/en/imtrends/article/google_launches_free_video_chat_to_enhance_its_instant_messaging_service/">money</a>. It was built as a framework to be extended as a stepping-stone to reach for voice and video communications, file transfer, streaming, location and whatnot. It was not built to be invisible. Any extension must know the layer below it, any application built must understand how everything works inside. This may change: a service framework built on top of it may make it invisible, or in may crumble under the weight of its extensions to become like SIP. Time will tell.</p>
<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.radvision.com/codeofcontact/2008/08/06/why-is-voip-so-hard-on-firewalls-and-nat/" title="Why is VoIP so hard on firewalls and NATs? (August 6, 2008)">Why is VoIP so hard on firewalls and NATs?</a> (1)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/02/11/why-text-based-protocols-hurt-your-design/" title="Why text-based protocols hurt your design (February 11, 2008)">Why text-based protocols hurt your design</a> (4)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/04/30/empty-security-and-vitamit-cookies/" title="Empty Security &amp; Vitamin Cookies (April 30, 2008)">Empty Security &amp; Vitamin Cookies</a> (0)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/08/13/5-ways-to-solve-nat-traversal-for-voip-protocols/" title="5 Ways to Solve NAT Traversal for VoIP Protocols (August 13, 2008)">5 Ways to Solve NAT Traversal for VoIP Protocols</a> (0)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/07/16/the-binary-of-text-protocols/" title="The binary of text protocols (July 16, 2008)">The binary of text protocols</a> (2)</li>
</ul>

<div class="feedflare">
<a href="http://feeds.radvision.com/~f/CodeOfContact?a=hwEMO"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=hwEMO" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=L4CDo"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=L4CDo" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=rKc2o"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=rKc2o" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=p1RQO"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=p1RQO" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=ty3QO"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=ty3QO" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=CyExo"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=CyExo" border="0"></img></a>
</div><img src="http://feeds.radvision.com/~r/CodeOfContact/~4/473641630" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.radvision.com/codeofcontact/2008/12/03/the-last-universalist-of-voip/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CodeOfContact&amp;itemurl=http%3A%2F%2Fblog.radvision.com%2Fcodeofcontact%2F2008%2F12%2F03%2Fthe-last-universalist-of-voip%2F</feedburner:awareness><feedburner:origLink>http://blog.radvision.com/codeofcontact/2008/12/03/the-last-universalist-of-voip/</feedburner:origLink></item>
		<item>
		<title>Determining a Timeout on That Network Event of Yours? Take Your Time</title>
		<link>http://feeds.radvision.com/~r/CodeOfContact/~3/466179989/</link>
		<comments>http://blog.radvision.com/codeofcontact/2008/11/26/determining-a-timeout-on-that-network-event-of-yours-take-your-time/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 13:20:06 +0000</pubDate>
		<dc:creator>Ran Arad</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[8 second rule]]></category>

		<category><![CDATA[authentication]]></category>

		<category><![CDATA[billing]]></category>

		<category><![CDATA[developer]]></category>

		<category><![CDATA[Mrs. Contact]]></category>

		<category><![CDATA[safety]]></category>

		<category><![CDATA[security]]></category>

		<category><![CDATA[standards]]></category>

		<category><![CDATA[timeout]]></category>

		<guid isPermaLink="false">http://blog.radvision.com/codeofcontact/?p=55</guid>
		<description><![CDATA[Last week, Mrs. Code of Contact decided to upgrade our internet connection. She talked to the ISP representative, who informed her of a special deal: she is entitled to a server-side service, either an anti-virus or anti-spam for the mail service, or something called &#8220;Safe net&#8221;. &#8220;Safe net&#8221; scans sites for malicious scripts and prevents [...]<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/snapeverything/2295332595/"><img class="alignright" src="http://blog.radvision.com/images/2008/20081126-CodeOfContact-Safe-net.jpg" alt="" width="200" height="300" /></a>Last week, <a href="http://blog.radvision.com/codeofcontact/tag/mrs-contact/">Mrs. Code of Contact</a> decided to upgrade our internet connection. She talked to the ISP representative, who informed her of a special deal: she is entitled to a server-side service, either an anti-virus or anti-spam for the mail service, or something called &#8220;Safe net&#8221;. &#8220;Safe net&#8221; scans sites for malicious scripts and prevents access to sites that may harm the user&#8217;s computer. Since Mrs. Contact knows we have anti-virus and anti-spam, she selected the &#8220;safe-net&#8221; service. To make a long story short, I cancelled it after a week. If it was just the slower access to any webpage, I might have kept it. However, too many services stopped working due to network delays. For instance:</p>
<ul>
<li> The antivirus software (AVG antivirus) refused to update its virus database. After trying to connect for about one second, it would declare that I do not have an internet connection. Sometimes it would corrupt its own databases in the process.</li>
<li> My iGoogle homepage would start to load, and then the browser would claim that the server reset the connection. At first I thought it was some applet or another, but each applet worked fine separately, only when the whole page was loaded did it reset the connection.</li>
</ul>
<p>This brings me to the issue of timeout in communication products.</p>
<h3>How long should you wait?</h3>
<p>Many standards define message timeout. ITU-T&#8217;s H.225 standard (part of H.323) recommends 3 to 5 seconds of RAS timeout, with 1 or 2 retries, depending on the message. RAS also implements the Request in Progress (RIP) mechanism to notify the sender that his request was received and will take longer to process. MEGACO also has a similar mechanism. When using TCP, the transport control should be the one notifying of failed communications or dropped connections. Why do implementers decide on low timeout values?</p>
<p>Most of the time, the argument used for lower timeouts is the theoretical user: the user cannot be expected to wait. They quote the <a href="http://en.wikipedia.org/wiki/Network_performance">8-second rule</a>, saying that if there&#8217;s nothing on the screen for 8 seconds, the user gives up. One wonders how people get through starting up their computer before giving up and going to watch TV (check it out: <a href="http://ostatic.com/175929-blog/linux-based-instant-on-trend-spreads-out">instant-on</a>). Jokes aside, there is a limit to user patience. Shorter timeouts produce a &#8216;peppier&#8217; response, feeding the user&#8217;s need for instant gratifications: Is it working? Did it fail? Should I reboot? Should I try something else? My antivirus&#8217; update program was so anxious to give me results that it didn&#8217;t realize better results might arrive had it waited a few more seconds - and I really wouldn&#8217;t have minded.</p>
<p>What I&#8217;m saying is that even in today&#8217;s fast internet, client developers should set generous timeouts. You never know if security measures, billing systems or cellular networks may impose latencies on connections. The question should not be how long the user will have to wait. The user can decide that for himself by canceling the process. The question should be, what is the alternative. If, like my antivirus, all it can do after the timeout is report the failure, the client should wait longer, or even as long as the user allows it. My media player, for instance, notifies me that it is connecting and counts the seconds until giving up (the timeout is configurable). The user may be expecting to see something within 8 seconds, but it&#8217;s not necessarily the final result, sometimes a progress bar is enough.</p>
<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.radvision.com/codeofcontact/2008/04/23/four-sons-of-voip-security/" title="Four Sons of VoIP security (April 23, 2008)">Four Sons of VoIP security</a> (0)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/09/10/your-product-manager-configuration-and-you/" title="Your Product Manager&#8217;s Configuration and You (September 10, 2008)">Your Product Manager&#8217;s Configuration and You</a> (15)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/08/06/why-is-voip-so-hard-on-firewalls-and-nat/" title="Why is VoIP so hard on firewalls and NATs? (August 6, 2008)">Why is VoIP so hard on firewalls and NATs?</a> (1)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/11/19/system-security-through-system-breakdown/" title="System Security Through System Breakdown (November 19, 2008)">System Security Through System Breakdown</a> (0)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/06/02/standards-pul%e2%80%93lease/" title="Standards? Pul–lease! (June 2, 2008)">Standards? Pul–lease!</a> (1)</li>
</ul>

<div class="feedflare">
<a href="http://feeds.radvision.com/~f/CodeOfContact?a=0bs4N"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=0bs4N" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=QXVnn"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=QXVnn" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=ptPpn"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=ptPpn" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=HQI2N"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=HQI2N" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=siKvN"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=siKvN" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=UApEn"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=UApEn" border="0"></img></a>
</div><img src="http://feeds.radvision.com/~r/CodeOfContact/~4/466179989" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.radvision.com/codeofcontact/2008/11/26/determining-a-timeout-on-that-network-event-of-yours-take-your-time/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CodeOfContact&amp;itemurl=http%3A%2F%2Fblog.radvision.com%2Fcodeofcontact%2F2008%2F11%2F26%2Fdetermining-a-timeout-on-that-network-event-of-yours-take-your-time%2F</feedburner:awareness><feedburner:origLink>http://blog.radvision.com/codeofcontact/2008/11/26/determining-a-timeout-on-that-network-event-of-yours-take-your-time/</feedburner:origLink></item>
		<item>
		<title>System Security Through System Breakdown</title>
		<link>http://feeds.radvision.com/~r/CodeOfContact/~3/458375286/</link>
		<comments>http://blog.radvision.com/codeofcontact/2008/11/19/system-security-through-system-breakdown/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 13:10:46 +0000</pubDate>
		<dc:creator>Ran Arad</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[Standardization]]></category>

		<category><![CDATA[cloud computing]]></category>

		<category><![CDATA[dancing bunnies]]></category>

		<category><![CDATA[dancing pigs]]></category>

		<category><![CDATA[identity theft]]></category>

		<category><![CDATA[log]]></category>

		<category><![CDATA[netpc]]></category>

		<category><![CDATA[network computer]]></category>

		<category><![CDATA[personal data]]></category>

		<category><![CDATA[Protocols]]></category>

		<category><![CDATA[resources]]></category>

		<category><![CDATA[security]]></category>

		<category><![CDATA[security risks]]></category>

		<category><![CDATA[Trojan horse]]></category>

		<category><![CDATA[trojans]]></category>

		<category><![CDATA[war]]></category>

		<guid isPermaLink="false">http://blog.radvision.com/codeofcontact/?p=53</guid>
		<description><![CDATA[The last post discussed the &#8220;dancing bunnies&#8221; problem and offered a resolution by triggering an instinctive &#8220;danger&#8221; response from the user. While considering the problem, I started thinking: would this problem always exist? Is it a definitive feature of user-system interface, or is it a problem relating to the core of being &#8220;human&#8221;?
We, the people [...]<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>
]]></description>
			<content:encoded><![CDATA[<p>The last post <a href="http://blog.radvision.com/codeofcontact/2008/11/12/secure-system-secure-user/">discussed the &#8220;dancing bunnies&#8221; problem</a> and offered a resolution by triggering an instinctive &#8220;danger&#8221; response from the user. While considering the problem, I started thinking: would this problem always exist? Is it a definitive feature of user-system interface, or is it a problem relating to the core of being &#8220;human&#8221;?</p>
<h3>We, the people of Troy</h3>
<p>The city of Troy was a secure system. They had strong walls, alert guards, and were well trained, until this appeared:</p>
<p style="text-align: center"><img class="alignnone" src="http://blog.radvision.com/images/2008/20081119-CodeOfContact-trojan.png" alt="" width="539" height="251" /></p>
<p>The Trojans clicked &#8220;Run&#8221; without even reading <a href="http://www.stanford.edu/%7Eplomio/history.html#anchor204279">Laocoon and Cassandra&#8217;s warning</a>, and to this day, Trojan horses, bunnies and <a href="http://icanhascheezburger.com/">lolcats</a> are wheeled through the walls. Maybe we should stop it. Stop building walls, that is.</p>
<h3>We, the people of the Web</h3>
<p>They promised me a <a href="http://en.wikipedia.org/wiki/Network_computer">network computer</a>. They really did. A dumb terminal that I&#8217;ll touch with my thumb and it will immediately access all my services from the web. Let&#8217;s assume they will make good on that promise. Now, will it be more, or less secure? Obviously, it won&#8217;t be as secure as a personal computer that is not connected to the web. Let&#8217;s assume that every computer is connected to the web and assume that they are very well protected, except for security risks caused by the users themselves. That&#8217;s a very lenient assumption, so let&#8217;s be kind to the net terminal as well. We&#8217;ll assume that data, kept remotely, is secure from attacks and can only be accessed by its rightful owner. We will also assume that all services currently enabled on the net terminal are non-malicious. That last assumption is not enough because we have to assume also that every service enabled is also safe from attacks, meaning that it is impossible to hack into the service itself or fake the service&#8217;s certificates.</p>
<p>Now we are offered a new service called Trojan Horse. It&#8217;s a cool service that shows a horse on wheels rolling on the task bar, ejecting dancing bunnies every now and then. How will this look like on the net terminal? Maybe something like this:</p>
<p style="text-align: center"><img class="alignnone" src="http://blog.radvision.com/images/2008/20081119-CodeOfContact-add-trojan.png" alt="" width="410" height="394" /></p>
<p>You may notice that I have a lot of control here. I could allow some application to use the screen (for a limited time), deny it the speakers if I&#8217;m at work or ask to run it anonymously. This will create a negotiation between the running program and the user, perhaps notifying it that the application cannot run without access to personal settings. Now that I do not have one central wall blocking access to my computer, I have little walls blocking access to each resource type. I can use these little walls to control programs even after they have been installed, for instance, if I am notified that the software is about to release Greek soldiers and take over my system (which I have not yet granted it permissions to do), I could deny it.</p>
<h3>Better living through more protocols</h3>
<p>The real beauty of this is that all the technology for cloud computing and authorized access to resources exists today, only not at the right place. Billing systems do it all the time: authenticating users, consuming resources, tracking usage. The <a href="http://www.radvision.com/Products/Developer/Protocol/IMSDiameter/">Diameter protocol</a>, for instance, can be used just as well when protecting system resources. Applications can authenticate themselves, consult local policy servers, request and consume resources. They can be tracked and permissions to abusive programs can be revoked.</p>
<p>Does this solve the &#8220;dancing bunnies&#8221; problem? Not immediately, but it does allow the system to monitor and locate abusive programs and then alert the user, so on the long run, they will be found and removed. This can also be done in current systems, but since it is not broken down into components that communicate with each other, it will require many resources just to keep track of everything - which might be worse than drunken Trojans. When it comes to controlling which programs are allowed what access to your resources and personal data, a network computer is safer than a desktop computer. If we consider that sometime in the future we&#8217;ll carry our personal data on a mobile device and use such terminals just to access remote information or use cloud computing services, our personal data is likely to be much better managed than it is now.</p>
<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.radvision.com/codeofcontact/2008/08/06/why-is-voip-so-hard-on-firewalls-and-nat/" title="Why is VoIP so hard on firewalls and NATs? (August 6, 2008)">Why is VoIP so hard on firewalls and NATs?</a> (1)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/11/12/secure-system-secure-user/" title="Secure System, Secure User (November 12, 2008)">Secure System, Secure User</a> (0)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/04/14/logs-plus-scripts-equals-ownage/" title="Logs + Scripts = Ownage (April 14, 2008)">Logs + Scripts = Ownage</a> (0)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/04/23/four-sons-of-voip-security/" title="Four Sons of VoIP security (April 23, 2008)">Four Sons of VoIP security</a> (0)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/04/30/empty-security-and-vitamit-cookies/" title="Empty Security &amp; Vitamin Cookies (April 30, 2008)">Empty Security &amp; Vitamin Cookies</a> (0)</li>
</ul>

<div class="feedflare">
<a href="http://feeds.radvision.com/~f/CodeOfContact?a=eP5wN"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=eP5wN" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=oQXin"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=oQXin" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=bsYun"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=bsYun" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=RttiN"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=RttiN" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=1jlmN"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=1jlmN" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=Z3cIn"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=Z3cIn" border="0"></img></a>
</div><img src="http://feeds.radvision.com/~r/CodeOfContact/~4/458375286" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.radvision.com/codeofcontact/2008/11/19/system-security-through-system-breakdown/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CodeOfContact&amp;itemurl=http%3A%2F%2Fblog.radvision.com%2Fcodeofcontact%2F2008%2F11%2F19%2Fsystem-security-through-system-breakdown%2F</feedburner:awareness><feedburner:origLink>http://blog.radvision.com/codeofcontact/2008/11/19/system-security-through-system-breakdown/</feedburner:origLink></item>
		<item>
		<title>Secure System, Secure User</title>
		<link>http://feeds.radvision.com/~r/CodeOfContact/~3/450790018/</link>
		<comments>http://blog.radvision.com/codeofcontact/2008/11/12/secure-system-secure-user/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 14:56:42 +0000</pubDate>
		<dc:creator>Ran Arad</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[behavior]]></category>

		<category><![CDATA[dancing bunnies]]></category>

		<category><![CDATA[Firewall]]></category>

		<category><![CDATA[Protocols]]></category>

		<category><![CDATA[script]]></category>

		<category><![CDATA[security]]></category>

		<category><![CDATA[spyware]]></category>

		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://blog.radvision.com/codeofcontact/?p=51</guid>
		<description><![CDATA[Jeff Atwood of Coding Horror wrote some months back on the fake user interface, and its ability to trick innocent users into running malicious software. It was on my to-do list for a while, but now I noticed a link to another post from three years ago, discussing the &#8220;dancing bunnies&#8221; problem (aka the &#8220;dancing [...]<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.radvision.com/codeofcontact/tag/behavior/"><img class="alignleft" src="http://blog.radvision.com/images/series/standardized-human-behavior.jpg" alt="" width="202" height="200" /></a>Jeff Atwood of <a href="http://www.codinghorror.com/blog/">Coding Horror</a> wrote some months back on the <a href="http://www.codinghorror.com/blog/archives/001164.html">fake user interface</a>, and its ability to trick innocent users into running malicious software. It was on my to-do list for a while, but now I noticed a link to another post from three years ago, discussing the &#8220;<a href="http://www.codinghorror.com/blog/archives/000347.html">dancing bunnies</a>&#8221; problem (aka the &#8220;<a href="http://en.wikipedia.org/wiki/Dancing_pigs">dancing pigs</a>&#8221; problem), as formulated by <a href="http://blogs.msdn.com/larryosterman/archive/2005/07/12/438284.aspx">Larry Osterman</a>:</p>
<blockquote><p>It&#8217;s a description of what happens when a user receives an email message that says &#8220;click here to see the dancing bunnies&#8221;.</p></blockquote>
<p>The user wants to see the dancing bunnies, so they click there. It doesn&#8217;t matter how much you try to dissuade them, if they want to see the dancing bunnies, then by gum, they&#8217;re going to see the dancing bunnies. It doesn&#8217;t matter how many technical hurdles you put in their way, if they stop the user from seeing the dancing bunny, then they&#8217;re going to go and see the dancing bunny.</p>
<h3>Dance, Bunny! Dance!</h3>
<p>The original discussion back then was as to the need for antivirus. Today we regularly use antivirus, adware removal, spyware detection, anti-phishing, spam filters, firewalls, server-side protection, permission management, homepage kidnapping prevention, internet zones and site certificates, and people still want to see the dancing bunnies! Only problem is, their PCs are so slow due to all the security software that they can&#8217;t get it running.</p>
<p>Now, what if we were just walking down the street and someone said &#8220;Hey, bud, want to see some dancing bunnies?&#8221;</p>
<p style="text-align: center"><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/Vk3cylfln2k&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Vk3cylfln2k&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>You&#8217;d probably run like hell, won&#8217;t you? Look INSIDE the box? What are you, crazy or something? Every alarm system in your head will go off if someone just came towards you looking like that. The problem is, we don&#8217;t see emails and web pages as shady little guys with gray trench coats and hats going &#8220;Hey, bud&#8221;. We&#8217;re too used to TV and books, and TV and books can&#8217;t hurt you, can they?</p>
<h3>Whom Can You Trust?</h3>
<p>When I access my work mail from the web, I get a security warning about an expired certificate. That&#8217;s OK; our IT goes &#8220;that&#8217;s <em>our</em> warning&#8221;. Just confirm it anyway. Internet Explorer warns me every time, while Firefox lets me set a permanent exception, so I&#8217;m using Firefox for mail access even though it looks a little strange. My OS warns me about running any file that&#8217;s not local, and the first time I run a file I downloaded.</p>
<p style="text-align: center"><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/VuqZ8AqmLPY&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/VuqZ8AqmLPY&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>It really does beat the point, does it? On one side, there are all these friendly interfaces and authoritative messages, on the other side, tired warnings and checkboxes that say, &#8220;Always allow&#8221;. Besides, we really do want to see the dancing bunnies.</p>
<p>I don&#8217;t even believe in the &#8220;virtual sandbox OS&#8221; suggested by Jeff. How about this:</p>
<p align="center"><img class="alignnone" src="http://blog.radvision.com/images/2008/20081112-CodeOfContact-warning_message.png" alt="" width="539" height="251" /></p>
<p>You&#8217;d confirm it in a second, because you trust the friendly sites, because you are used to the nice emails from friends sending you dancing bunnies. More dancing bunnies please.</p>
<h3>Websites are Strangers in Dark Alleys</h3>
<p>Until this realization is hammered deep into the user&#8217;s mind, no security can be good enough. We must tap into the same inner protocols that intuitively make us realize danger is about. None of these friendly notifications will do. Here is my suggestion for a warning screen:</p>
<p align="center"><img class="alignnone" src="http://blog.radvision.com/images/2008/20081112-CodeOfContact-real_warning_message.png" alt="" width="539" height="502" /></p>
<p>The picture will change randomly, of course. If you click on that without considering physical harm, well, bud, you have worse problems than viruses.</p>
<p>Maybe I&#8217;m being naïve. What do you think?</p>
<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.radvision.com/codeofcontact/2008/08/06/why-is-voip-so-hard-on-firewalls-and-nat/" title="Why is VoIP so hard on firewalls and NATs? (August 6, 2008)">Why is VoIP so hard on firewalls and NATs?</a> (1)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/11/19/system-security-through-system-breakdown/" title="System Security Through System Breakdown (November 19, 2008)">System Security Through System Breakdown</a> (0)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/08/13/5-ways-to-solve-nat-traversal-for-voip-protocols/" title="5 Ways to Solve NAT Traversal for VoIP Protocols (August 13, 2008)">5 Ways to Solve NAT Traversal for VoIP Protocols</a> (0)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/05/14/the-human-puppet/" title="The human puppet (May 14, 2008)">The human puppet</a> (0)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/03/24/standardized-human-behaviour-baby-boom/" title="Standardized Human Behaviour: Baby boom (March 24, 2008)">Standardized Human Behaviour: Baby boom</a> (1)</li>
</ul>

<div class="feedflare">
<a href="http://feeds.radvision.com/~f/CodeOfContact?a=D0ZGN"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=D0ZGN" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=FH9Rn"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=FH9Rn" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=ujFMn"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=ujFMn" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=goZ6N"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=goZ6N" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=qjwZN"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=qjwZN" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=Eq8Yn"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=Eq8Yn" border="0"></img></a>
</div><img src="http://feeds.radvision.com/~r/CodeOfContact/~4/450790018" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.radvision.com/codeofcontact/2008/11/12/secure-system-secure-user/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CodeOfContact&amp;itemurl=http%3A%2F%2Fblog.radvision.com%2Fcodeofcontact%2F2008%2F11%2F12%2Fsecure-system-secure-user%2F</feedburner:awareness><feedburner:origLink>http://blog.radvision.com/codeofcontact/2008/11/12/secure-system-secure-user/</feedburner:origLink></item>
		<item>
		<title>Let Me Slip Into Something More Comfortable</title>
		<link>http://feeds.radvision.com/~r/CodeOfContact/~3/448732731/</link>
		<comments>http://blog.radvision.com/codeofcontact/2008/11/10/let-me-slip-into-something-more-comfortable/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 19:20:57 +0000</pubDate>
		<dc:creator>Ran Arad</dc:creator>
		
		<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://blog.radvision.com/codeofcontact/?p=50</guid>
		<description><![CDATA[How&#8217;s this?
What?
You don&#8217;t see any difference?
Maybe it&#8217;s your RSS feed. Come closer. Look around.
Still nothing?
We changed! A new theme! New widgets! New homepage! New &#8220;about&#8221; pages (and easier contact forms)!
We even moved to a new host and a new platform (and solved the annoying email notification for comments thing).
Nothing, huh? Sometimes I don&#8217;t know why [...]<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>
]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" src="http://blog.radvision.com/images/2008/20081110-CodeOfContact-more-comfortable.jpg" alt="" width="300" height="167" />How&#8217;s this?</p>
<p>What?</p>
<p>You don&#8217;t see any difference?</p>
<p>Maybe it&#8217;s your RSS feed. Come closer. Look around.</p>
<p>Still nothing?</p>
<p>We changed! A new theme! New widgets! New homepage! New &#8220;about&#8221; pages (and easier contact forms)!</p>
<p>We even moved to a new host and a new platform (and solved the annoying email notification for comments thing).</p>
<p>Nothing, huh? Sometimes I don&#8217;t know why we bother. Well, actually, Tsahi did most of the bother, but we provided moral support. Let me know if there are spots he missed or anything that needs fixing so then we can rub his nose in it. You can also say how nice the new design is, but don&#8217;t overdo it, he&#8217;s ego&#8217;s big enough as it is and we&#8217;d appreciate it if it didn&#8217;t grow any further.</p>
<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li>No related posts.</li>
	</ul>

<div class="feedflare">
<a href="http://feeds.radvision.com/~f/CodeOfContact?a=2AAnN"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=2AAnN" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=NHmfn"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=NHmfn" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=D1L7n"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=D1L7n" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=cRAAN"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=cRAAN" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=hc2rN"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=hc2rN" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=6HbKn"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=6HbKn" border="0"></img></a>
</div><img src="http://feeds.radvision.com/~r/CodeOfContact/~4/448732731" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.radvision.com/codeofcontact/2008/11/10/let-me-slip-into-something-more-comfortable/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CodeOfContact&amp;itemurl=http%3A%2F%2Fblog.radvision.com%2Fcodeofcontact%2F2008%2F11%2F10%2Flet-me-slip-into-something-more-comfortable%2F</feedburner:awareness><feedburner:origLink>http://blog.radvision.com/codeofcontact/2008/11/10/let-me-slip-into-something-more-comfortable/</feedburner:origLink></item>
		<item>
		<title>The Void Pointer</title>
		<link>http://feeds.radvision.com/~r/CodeOfContact/~3/443271107/</link>
		<comments>http://blog.radvision.com/codeofcontact/2008/11/05/the-void-pointer-take-2/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 14:16:26 +0000</pubDate>
		<dc:creator>Ran Arad</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[containers]]></category>

		<category><![CDATA[Flexibility]]></category>

		<category><![CDATA[Memory]]></category>

		<category><![CDATA[pointer]]></category>

		<category><![CDATA[programming]]></category>

		<category><![CDATA[stack]]></category>

		<category><![CDATA[Void]]></category>

		<category><![CDATA[Zen]]></category>

		<guid isPermaLink="false">http://blog.radvision.com/codeofcontact/2008/11/05/the-void-pointer-take-2/</guid>
		<description><![CDATA[My last post was a bit poetic. The intention was to list the advantages of the void pointer, and to mention a few pitfalls associated with the usage of void pointers. In this post I will explain the same points, only in non-Zen-master-language. Using void pointers is perceived as half laziness and half foolishness, and [...]<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>
]]></description>
			<content:encoded><![CDATA[<p>My <a href="http://blog.radvision.com/2008/10/29/the-zen-pointer/">last post</a> was a bit poetic. The intention was to list the advantages of the void pointer, and to mention a few pitfalls associated with the usage of void pointers. In this post I will explain the same points, only in non-Zen-master-language. Using void pointers is perceived as half laziness and half foolishness, and the &#8220;serious&#8221; programmers will have none of it: they use templates, container classes and/or interfaces when appropriate. Some programmers prefer the other extreme: loose typing where every pointer is like a void pointer, and the end result is constant type checking. These latter types may also find the methods in this post interesting, although they are probably already using them.</p>
<p>The void pointer is like a general usage pointer, removing the need for container classes and templates, which are commonly used when creating generic data structures such as a list, hash, vector, stack, queue, etc. This same flexibility gives the void pointer its bad rep. Some prefer not to point at objects at all but to copy them instead, and some prefer a system where a reference counter is maintained between all containers. Both are redundant if void pointers are used with care, although a reference counter can be used with void pointers as well. I personally prefer cross pointing: <a href="http://www.flickr.com/photos/smason/14237911/"><img src="http://blog.radvision.com/images/2008/20081029-CodeOfContact-Void-pointer.jpg" alt="Void pointer" align="right" width="300" height="225" /></a>the object should be able to reach any location where it is pointed to. If a hash or a list points at an object, the object should point back to the hash or the list. This makes removing the references when the object is deleted a little easier.</p>
<h3>Care and Handling of a Void Pointer</h3>
<p>I&#8217;m not saying that using the void pointer is easy. In many ways, it requires more care and planning than using templates. I am saying that it is more efficient, less memory consuming and a more flexible way of programming - when used correctly. When misused, void pointers can be cast incorrectly, accessed after the object being pointed to was deleted (any pointer can, but void pointers are move vulnerable since they do not know the object), or just cause confusion and waste time.</p>
<p><strong>Dont&#8217;s:</strong></p>
<ul>
<li> Don&#8217;t overuse void pointers. Sometimes templates are good, and sometimes the use is just too specific to try and make it general-purpose.</li>
<li> Don&#8217;t use them to pass instead of object handles. Object handles carry valuable information about the type of object passed.</li>
<li> Don&#8217;t use them for obfuscation. There are better ways, which are less confusing (see handles, above)</li>
<li> Don&#8217;t pass them between modules without knowing their meaning; this will always lead to confusion, especially when something is changed in either of the modules.</li>
<li> Never use NULL as a valid value: NULL means &#8220;no-value&#8221;, if you really have to pass zero as a value, reconsider the use of void pointers.</li>
</ul>
<p><strong>Do&#8217;s:</strong></p>
<ul>
<li> A pointer (not just a void pointer) should start out pointing at NULL, and be returned to pointing to NULL once the object is removed.</li>
<li> Use one instance of a void pointer to point at a single type of object. For instance, if you have a void-pointer-list object, use it for one type of object, create another instance of it for another type and document each instance well. This may seem risky, but the footprint overhead for using templates makes it worthwhile.</li>
<li> When passing void pointers for usage (i.e. not for storage or as user context), always provide an enumeration serving as a guide to the contents of the void pointer. The receiver will recast the void pointer according to the guide. This will save a lot of trouble should future changes require passing something else.</li>
</ul>
<h3>The Best Advice</h3>
<p>Keep your eyes open! The void pointer will require the programmer to know what he&#8217;s doing, pay attention to valid and invalid pointers and to where everything is. Before deleting any object that&#8217;s pointed to, the object must go over all the places pointing to it and remove them. Whenever using a void pointer to point at anything, go over the checklist:</p>
<ol>
<li>Does the object point back?</li>
<li>Does the object know when it is pointed to and when it is not?</li>
<li>Does the object remove the pointer to it when it is deleted?</li>
</ol>
<p>If the answer to any of these is &#8220;no&#8221;, you&#8217;ll end up pointing at a deleted object, which is crushing. One thing&#8217;s for sure: it will keep you alert.</p>
<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.radvision.com/codeofcontact/2008/10/29/the-zen-pointer/" title="The Zen Pointer (October 29, 2008)">The Zen Pointer</a> (0)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2009/01/08/no-need-to-program-perfection/" title="No Need to Program Perfection (January 8, 2009)">No Need to Program Perfection</a> (1)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/03/10/multi-thread-me/" title="Multi Thread Me (March 10, 2008)">Multi Thread Me</a> (1)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/01/08/memory-efficiency-the-tertium-quid/" title="Memory efficiency, the Tertium Quid (January 8, 2008)">Memory efficiency, the Tertium Quid</a> (0)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/02/26/4-most-important-qualities-in-protocol-programmers/" title="I’m hunting: 4 most important qualities I look for in protocol programmers (February 26, 2008)">I’m hunting: 4 most important qualities I look for in protocol programmers</a> (0)</li>
</ul>

<div class="feedflare">
<a href="http://feeds.radvision.com/~f/CodeOfContact?a=EMK2N"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=EMK2N" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=6KC8n"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=6KC8n" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=qo27n"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=qo27n" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=1sjuN"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=1sjuN" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=0xdEN"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=0xdEN" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=UXdsn"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=UXdsn" border="0"></img></a>
</div><img src="http://feeds.radvision.com/~r/CodeOfContact/~4/443271107" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.radvision.com/codeofcontact/2008/11/05/the-void-pointer-take-2/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CodeOfContact&amp;itemurl=http%3A%2F%2Fblog.radvision.com%2Fcodeofcontact%2F2008%2F11%2F05%2Fthe-void-pointer-take-2%2F</feedburner:awareness><feedburner:origLink>http://blog.radvision.com/codeofcontact/2008/11/05/the-void-pointer-take-2/</feedburner:origLink></item>
		<item>
		<title>The Zen Pointer</title>
		<link>http://feeds.radvision.com/~r/CodeOfContact/~3/435855433/</link>
		<comments>http://blog.radvision.com/codeofcontact/2008/10/29/the-zen-pointer/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 13:41:53 +0000</pubDate>
		<dc:creator>Ran Arad</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[Efficiency]]></category>

		<category><![CDATA[Memory]]></category>

		<category><![CDATA[NULL]]></category>

		<category><![CDATA[pointer]]></category>

		<category><![CDATA[programming]]></category>

		<category><![CDATA[Void]]></category>

		<category><![CDATA[Zen]]></category>

		<guid isPermaLink="false">http://blog.radvision.com/codeofcontact/2008/10/29/the-zen-pointer/</guid>
		<description><![CDATA[I am the Zen pointer. I point at the Void. I make no separation between the NULL and the object. I am the ultimate container, containing everything and nothing. I see no difference between one type and another, between an object and an integer. I point at the world, yet I know I am part [...]<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>
]]></description>
			<content:encoded><![CDATA[<p>I am the Zen pointer. I point at the Void. I make no separation between the NULL and the object. I am the ultimate container, containing everything and nothing. I see no difference between one type and another, between an object and an integer. I point at the world, yet I know I am part of the world, as I may be pointed to by another Void pointer. I may become all, and all may become me. I am the Void pointer. Hear me roar.</p>
<p>I am the Void pointer. Some may fear me. It is their own Void that they fear, their own lack of knowledge. The ones with insight wield me with confidence. The ones who are lacking dangle me and throw me as they spread errors and exceptions all around them. Seek out the true path of the Void pointer; do not hide behind false containers and interfaces, do not raise walls of templates to ward me. I am the Void pointer. Meet me eye to eye.</p>
<h3>The True Path</h3>
<p>The Tao of the Void pointer is not an easy one. It is full of doubt and uncertainty. Yet the ones with the insight reap its rewards. Eat from the fruit that is plentiful along its road: the fruit of memory, the fruit of agility and the fruit of efficiency. Remember, you who seek the Path of the Void: you are the one who walks. Do not be led by the path or it will lead you to uncharted realms. Always start out pointing at the NULL. Always end up pointing at the NULL. <a href="http://www.flickr.com/photos/smason/14237911/"><img src="http://blog.radvision.com/images/2008/20081029-CodeOfContact-Void-pointer.jpg" alt="Void pointer" align="right" width="300" height="225" /></a>While on the path, always try to point out the same objects: point at a tree to remember the tree, do not point then at a flower lest you think the flower a tree. If you made a chain of Void pointers, use one instance of it for the flowers and another instance of it for the trees. The chain is the same, and its footprint is one, yet I can bind in it any type of object, just be sure to bind one type at a time. I am the Void pointer. Heed my warnings.</p>
<p>You may need a guide when you walk The Path of Void. The Void is a cloak, a veil; it may hide anything in its folds. Such a cloak is very powerful: When a passage is made for an object, it will fit only it and none other, but when a passage is made for a Void pointer, anything can pass through it, covered in the cloak of the Void. When it reaches the other side, it must be called by its name to unravel the shadows of Void. The wise make two paths, one for the Void and one for its guide, so the Void can be called it by its name and the veil removed to reveal the true object behind it. The many are united by the Void, yet still they have many names. I am the Void pointer. Forget my name.</p>
<h3>The Master of the Void</h3>
<p>The master of the Void must keep his eyes open: the Void knows nothing and sees nothing; all things are one to him. It knows not when memory becomes figment. The master must know all the Void pointers pointing at his memories, and he must cast them away before the memory is forgotten. If he will not, false memories will be dredged up from the Void, crashing down on his head. The master of the Void fears not the Void, for it is his friend and ally. I am the Void pointer. I am your friend.</p>
<p><hr />
<table border="0" width="100%" cellpadding="0">
<tr>
<td>
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf"><img src="http://blog.radvision.com/images/eBook/eBook_feed_64x64.jpg" ></a></td>
<td width="100%">
<a href="http://blog.radvision.com/images/eBook/Video-Conferencing-eBook.pdf">Download your free eBook guide on Video Conferencing, the Enterprise and You</a>.<p>Post from: <a href="http://blog.radvision.com/codeofcontact">Code of Contact</a></p>
</td>
</tr>
</table>
<hr /></p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.radvision.com/codeofcontact/2008/11/05/the-void-pointer-take-2/" title="The Void Pointer (November 5, 2008)">The Void Pointer</a> (0)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/03/10/multi-thread-me/" title="Multi Thread Me (March 10, 2008)">Multi Thread Me</a> (1)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/01/08/memory-efficiency-the-tertium-quid/" title="Memory efficiency, the Tertium Quid (January 8, 2008)">Memory efficiency, the Tertium Quid</a> (0)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2009/01/08/no-need-to-program-perfection/" title="No Need to Program Perfection (January 8, 2009)">No Need to Program Perfection</a> (1)</li>
	<li><a href="http://blog.radvision.com/codeofcontact/2008/07/03/4-gotchas-of-text-based-protocols/" title="4 Gotcha&#8217;s of text-based protocols (July 3, 2008)">4 Gotcha&#8217;s of text-based protocols</a> (3)</li>
</ul>

<div class="feedflare">
<a href="http://feeds.radvision.com/~f/CodeOfContact?a=0Q0cM"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=0Q0cM" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=0uBam"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=0uBam" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=HKmIm"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=HKmIm" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=3z6OM"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=3z6OM" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=mG5uM"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=mG5uM" border="0"></img></a> <a href="http://feeds.radvision.com/~f/CodeOfContact?a=Mjgbm"><img src="http://feeds.radvision.com/~f/CodeOfContact?i=Mjgbm" border="0"></img></a>
</div><img src="http://feeds.radvision.com/~r/CodeOfContact/~4/435855433" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.radvision.com/codeofcontact/2008/10/29/the-zen-pointer/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CodeOfContact&amp;itemurl=http%3A%2F%2Fblog.radvision.com%2Fcodeofcontact%2F2008%2F10%2F29%2Fthe-zen-pointer%2F</feedburner:awareness><feedburner:origLink>http://blog.radvision.com/codeofcontact/2008/10/29/the-zen-pointer/</feedburner:origLink></item>
	<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetFeedData?uri=CodeOfContact</feedburner:awareness></channel>
</rss><!-- Dynamic Page Served (once) in 0.954 seconds --><!-- Cached page served by WP-Super-Cache --><!-- Compression = gzip -->
