<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: The Subtle Dangers Of Distributed Objects</title>
	<atom:link href="http://jens.mooseyard.com/2009/07/the-subtle-dangers-of-distributed-objects/feed/" rel="self" type="application/rss+xml" />
	<link>http://jens.mooseyard.com/2009/07/the-subtle-dangers-of-distributed-objects/</link>
	<description>Little boxes made of words, by Jens Alfke</description>
	<lastBuildDate>Sun, 02 May 2010 05:43:47 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Steven Degutis</title>
		<link>http://jens.mooseyard.com/2009/07/the-subtle-dangers-of-distributed-objects/comment-page-1/#comment-3465</link>
		<dc:creator>Steven Degutis</dc:creator>
		<pubDate>Wed, 03 Mar 2010 18:24:04 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2009/07/the-subtle-dangers-of-distributed-objects/#comment-3465</guid>
		<description>Jens, I agree very much so. In fact, once 10.6 came out and gave us blocks, I wrote a very thin wrapper on top of AsyncSocket that attempts to achieve much of the same &quot;transparency&quot; as DO when communicating over a network (it&#039;s effectively overkill for local IPC) without pretending it&#039;s something that it&#039;s really not. The class is called SDConnection and is modeled very similarly after NSConnection, with a few exceptions and a lot more transparency (it&#039;s based right on top of AsyncSocket). You can get the source code at http://files.degutis.org/ and there&#039;s more explanation of the pros and cons of using my API, at this tumblog post: http://sdegutis.tumblr.com/post/313809023/asynchronous-objc-method-returning-over-a-network</description>
		<content:encoded><![CDATA[<p>Jens, I agree very much so. In fact, once 10.6 came out and gave us blocks, I wrote a very thin wrapper on top of AsyncSocket that attempts to achieve much of the same &#8220;transparency&#8221; as DO when communicating over a network (it&#8217;s effectively overkill for local IPC) without pretending it&#8217;s something that it&#8217;s really not. The class is called SDConnection and is modeled very similarly after NSConnection, with a few exceptions and a lot more transparency (it&#8217;s based right on top of AsyncSocket). You can get the source code at <a href="http://files.degutis.org/" rel="nofollow">http://files.degutis.org/</a> and there&#8217;s more explanation of the pros and cons of using my API, at this tumblog post: <a href="http://sdegutis.tumblr.com/post/313809023/asynchronous-objc-method-returning-over-a-network" rel="nofollow">http://sdegutis.tumblr.com/post/313809023/asynchronous-objc-method-returning-over-a-network</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://jens.mooseyard.com/2009/07/the-subtle-dangers-of-distributed-objects/comment-page-1/#comment-3073</link>
		<dc:creator>David</dc:creator>
		<pubDate>Tue, 07 Jul 2009 19:13:33 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2009/07/the-subtle-dangers-of-distributed-objects/#comment-3073</guid>
		<description>Hi

I agree with first sentence of the last comment that this is a recurring theme with many similar false mantras.  I am not sure I quite agree that they are doomed.

Instead, I think that in most environments that there isn&#039;t the necessary sophistication to make it work correctly.  This has to do with many factors, but there is a dearth of developers/software architects with the requisite background, knowledge, and experience.

Any form of remoting is far more complex than most people realize.  The &quot;marketing&quot; of it always glosses over the complexity for the &quot;hyped&quot; benefits.  There are other approaches and architectural styles that can accomplish remoting but again these get more complex.

This has been a very fun topic to discuss.

David</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>I agree with first sentence of the last comment that this is a recurring theme with many similar false mantras.  I am not sure I quite agree that they are doomed.</p>
<p>Instead, I think that in most environments that there isn&#8217;t the necessary sophistication to make it work correctly.  This has to do with many factors, but there is a dearth of developers/software architects with the requisite background, knowledge, and experience.</p>
<p>Any form of remoting is far more complex than most people realize.  The &#8220;marketing&#8221; of it always glosses over the complexity for the &#8220;hyped&#8221; benefits.  There are other approaches and architectural styles that can accomplish remoting but again these get more complex.</p>
<p>This has been a very fun topic to discuss.</p>
<p>David</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Davies</title>
		<link>http://jens.mooseyard.com/2009/07/the-subtle-dangers-of-distributed-objects/comment-page-1/#comment-3072</link>
		<dc:creator>Aaron Davies</dc:creator>
		<pubDate>Tue, 07 Jul 2009 15:33:40 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2009/07/the-subtle-dangers-of-distributed-objects/#comment-3072</guid>
		<description>I saw something awhile back about &quot;myths of networking&quot; or something like that, about why RPC/RMI/Rwhatever is complicated (&quot;latency is zero&quot;, &quot;all clients are friendly&quot;, etc.); this seems to be another instance of the same basic problem. Attempts to make remote calls look like local ones are probably always doomed.</description>
		<content:encoded><![CDATA[<p>I saw something awhile back about &#8220;myths of networking&#8221; or something like that, about why RPC/RMI/Rwhatever is complicated (&#8220;latency is zero&#8221;, &#8220;all clients are friendly&#8221;, etc.); this seems to be another instance of the same basic problem. Attempts to make remote calls look like local ones are probably always doomed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://jens.mooseyard.com/2009/07/the-subtle-dangers-of-distributed-objects/comment-page-1/#comment-3071</link>
		<dc:creator>David</dc:creator>
		<pubDate>Tue, 07 Jul 2009 13:06:12 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2009/07/the-subtle-dangers-of-distributed-objects/#comment-3071</guid>
		<description>Hi

Most distributed technologies work by reference.  It doesn&#039;t make sense to have the local application take over the object life cycle which would be the case with by copy.  Typically the distributed environment takes over the responsibility for life cycle management so that local applications are &quot;finding&quot; or looking up the DO.

If you get a DO by copy then the local application is responsible for destroying or freeing the object up explicitly.  All in all this generally adds network traffic and/or increasing distributed memory usage - some application always messes up the life cycle management - not a criticism but a reality.

This is typical for most (if not all) other distributed technologies.  From the perspective of the local application it should not matter as long as the distributed environment ensures consistency for each distributed call - meaning that the reference used by instance A does not interfere with the reference used by instance B.  This consistency and separation has been guaranteed by the distributed environment that I have worked with.  Again, from the local perspective it shouldn&#039;t matter whether the distributed environment shares the same object with different local instances as long as there is consistency from each call to each instance.  I know this sounds complicated but this is not unusual with distributed object pools which are also fairly common.  Good luck.

David</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>Most distributed technologies work by reference.  It doesn&#8217;t make sense to have the local application take over the object life cycle which would be the case with by copy.  Typically the distributed environment takes over the responsibility for life cycle management so that local applications are &#8220;finding&#8221; or looking up the DO.</p>
<p>If you get a DO by copy then the local application is responsible for destroying or freeing the object up explicitly.  All in all this generally adds network traffic and/or increasing distributed memory usage - some application always messes up the life cycle management - not a criticism but a reality.</p>
<p>This is typical for most (if not all) other distributed technologies.  From the perspective of the local application it should not matter as long as the distributed environment ensures consistency for each distributed call - meaning that the reference used by instance A does not interfere with the reference used by instance B.  This consistency and separation has been guaranteed by the distributed environment that I have worked with.  Again, from the local perspective it shouldn&#8217;t matter whether the distributed environment shares the same object with different local instances as long as there is consistency from each call to each instance.  I know this sounds complicated but this is not unusual with distributed object pools which are also fairly common.  Good luck.</p>
<p>David</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jean-Daniel</title>
		<link>http://jens.mooseyard.com/2009/07/the-subtle-dangers-of-distributed-objects/comment-page-1/#comment-3070</link>
		<dc:creator>Jean-Daniel</dc:creator>
		<pubDate>Tue, 07 Jul 2009 07:53:57 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2009/07/the-subtle-dangers-of-distributed-objects/#comment-3070</guid>
		<description>The NSObject doc is clear about it:

&quot;NSObject’s implementation returns an NSDistantObject object for the object returned by replacementObjectForCoder:, enabling all objects to be distributed by proxy as the default.

Subclasses that want to be passed by copy instead of by reference must override this method and return self.&quot;

Implementing NSCoding is not enough to tell DO that your object can be send bycopy as DO uses a coder that does not support keyed coding.

And I didn&#039;t manage to figure the exact behavior for &#039;deep copy&#039;. I have a case where [encoder isCopy] returns YES for my top level object and NO for second level objects. I check with GDB that it was the same NSCoder instance.</description>
		<content:encoded><![CDATA[<p>The NSObject doc is clear about it:</p>
<p>&#8220;NSObject’s implementation returns an NSDistantObject object for the object returned by replacementObjectForCoder:, enabling all objects to be distributed by proxy as the default.</p>
<p>Subclasses that want to be passed by copy instead of by reference must override this method and return self.&#8221;</p>
<p>Implementing NSCoding is not enough to tell DO that your object can be send bycopy as DO uses a coder that does not support keyed coding.</p>
<p>And I didn&#8217;t manage to figure the exact behavior for &#8216;deep copy&#8217;. I have a case where [encoder isCopy] returns YES for my top level object and NO for second level objects. I check with GDB that it was the same NSCoder instance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jens Alfke</title>
		<link>http://jens.mooseyard.com/2009/07/the-subtle-dangers-of-distributed-objects/comment-page-1/#comment-3069</link>
		<dc:creator>Jens Alfke</dc:creator>
		<pubDate>Mon, 06 Jul 2009 21:02:48 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2009/07/the-subtle-dangers-of-distributed-objects/#comment-3069</guid>
		<description>Jean-Daniel: I don&#039;t think that&#039;s quite true. If an object implements NSCoding, it can be sent bycopy. (Because DO has to archive the object to send a copy over the wire.)

I remember the problem with NSURL, though! We definitely ran into that in the iChatAgent. It took us a while to discover that all URLs were being sent as proxies, resulting in tons of unnecessary IPCs. We had to change all of those parameters to NSStrings.</description>
		<content:encoded><![CDATA[<p>Jean-Daniel: I don&#8217;t think that&#8217;s quite true. If an object implements NSCoding, it can be sent bycopy. (Because DO has to archive the object to send a copy over the wire.)</p>
<p>I remember the problem with NSURL, though! We definitely ran into that in the iChatAgent. It took us a while to discover that all URLs were being sent as proxies, resulting in tons of unnecessary IPCs. We had to change all of those parameters to NSStrings.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jean-Daniel</title>
		<link>http://jens.mooseyard.com/2009/07/the-subtle-dangers-of-distributed-objects/comment-page-1/#comment-3068</link>
		<dc:creator>Jean-Daniel</dc:creator>
		<pubDate>Mon, 06 Jul 2009 20:41:03 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2009/07/the-subtle-dangers-of-distributed-objects/#comment-3068</guid>
		<description>You forget to mention byref/bycopy issues. I discover recently than by default, whatever you ask for (byref or bycopy), DO will send references unless your send object override -replacementObjectForPortCoder: to return self.

The problem is that you don&#039;t have any way to know which class override it, and which class do not. For instance, NSURL does not support &#039;bycopy&#039; and is send &#039;byref&#039;. But I think all the property list classes support bycopy.</description>
		<content:encoded><![CDATA[<p>You forget to mention byref/bycopy issues. I discover recently than by default, whatever you ask for (byref or bycopy), DO will send references unless your send object override -replacementObjectForPortCoder: to return self.</p>
<p>The problem is that you don&#8217;t have any way to know which class override it, and which class do not. For instance, NSURL does not support &#8216;bycopy&#8217; and is send &#8216;byref&#8217;. But I think all the property list classes support bycopy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jens Alfke</title>
		<link>http://jens.mooseyard.com/2009/07/the-subtle-dangers-of-distributed-objects/comment-page-1/#comment-3067</link>
		<dc:creator>Jens Alfke</dc:creator>
		<pubDate>Mon, 06 Jul 2009 15:19:43 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2009/07/the-subtle-dangers-of-distributed-objects/#comment-3067</guid>
		<description>David — I agree totally. The same issue even comes up in the SOAP-vs-REST debate. There&#039;s a kind of idealistic belief that if you&#039;re clever enough you can just abstract away the network and make distributed coding as simple as local coding. Real life is messier.</description>
		<content:encoded><![CDATA[<p>David — I agree totally. The same issue even comes up in the SOAP-vs-REST debate. There&#8217;s a kind of idealistic belief that if you&#8217;re clever enough you can just abstract away the network and make distributed coding as simple as local coding. Real life is messier.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://jens.mooseyard.com/2009/07/the-subtle-dangers-of-distributed-objects/comment-page-1/#comment-3066</link>
		<dc:creator>David</dc:creator>
		<pubDate>Mon, 06 Jul 2009 13:24:41 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2009/07/the-subtle-dangers-of-distributed-objects/#comment-3066</guid>
		<description>Actually Distributed Objects regardless of language and technology has been difficult whether it be CORBA, Java EJB, etc.  I think the core of the problem is that most developers treat this interaction as if it was a standard in-process synchronous request-response.  However, the complexity of the interaction has gone up substantially.  For instance, as one commenter pointed out what happens with timeouts.  Should the interaction really be synchronous?  Also, what is the distributed object is deployed horizontally - is state interaction required and if so how does state get updated across the horizontal deployment?  What about interactions between the local and distributed object - if all objects are local often the interaction is very verbose and talkative.  Do you still want to do this over the network to a DO?

I think there is a very important place in development for DOs.  However, I think most deployments don&#039;t consider the range of issues.  Additionally, it is true the coding DOs can be far more complex even with &quot;code&quot; generating IDE help.</description>
		<content:encoded><![CDATA[<p>Actually Distributed Objects regardless of language and technology has been difficult whether it be CORBA, Java EJB, etc.  I think the core of the problem is that most developers treat this interaction as if it was a standard in-process synchronous request-response.  However, the complexity of the interaction has gone up substantially.  For instance, as one commenter pointed out what happens with timeouts.  Should the interaction really be synchronous?  Also, what is the distributed object is deployed horizontally - is state interaction required and if so how does state get updated across the horizontal deployment?  What about interactions between the local and distributed object - if all objects are local often the interaction is very verbose and talkative.  Do you still want to do this over the network to a DO?</p>
<p>I think there is a very important place in development for DOs.  However, I think most deployments don&#8217;t consider the range of issues.  Additionally, it is true the coding DOs can be far more complex even with &#8220;code&#8221; generating IDE help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: popurls.com // popular today</title>
		<link>http://jens.mooseyard.com/2009/07/the-subtle-dangers-of-distributed-objects/comment-page-1/#comment-3065</link>
		<dc:creator>popurls.com // popular today</dc:creator>
		<pubDate>Mon, 06 Jul 2009 08:40:10 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2009/07/the-subtle-dangers-of-distributed-objects/#comment-3065</guid>
		<description>&lt;strong&gt;popurls.com // popular today...&lt;/strong&gt;

story has entered the popular today section on popurls.com...</description>
		<content:encoded><![CDATA[<p><strong>popurls.com // popular today&#8230;</strong></p>
<p>story has entered the popular today section on popurls.com&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
