﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>博客园-Artech-随笔分类-B. .NET Remoting</title><link>http://www.cnblogs.com/artech/category/76622.html</link><description>Develop every application as an art using the most suitable technologies!</description><language>zh-cn</language><lastBuildDate>Sat, 11 Oct 2008 06:39:23 GMT</lastBuildDate><pubDate>Sat, 11 Oct 2008 06:39:23 GMT</pubDate><ttl>60</ttl><item><title>[原创]我所理解的Remoting(3):创建CAO Service Factory使接口和实现相互分离</title><link>http://www.cnblogs.com/artech/archive/2007/04/02/697358.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Mon, 02 Apr 2007 11:04:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/04/02/697358.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/697358.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/04/02/697358.html#Feedback</comments><slash:comments>10</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/697358.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/697358.html</trackback:ping><description><![CDATA[摘要: 在一个分布式环境中，一个Application要跨AppDomain调用一个驻留在另一个AppDomain的的方法，他不需要获得这个真正的远程对象（而实事上它也不可能获得在另一个AppDomain中创建的对象），它只需要获得该对象的一个引用（说得具体点，它只需要获得该对象的ObjRef），并根据这个引用创建相应的Proxy来进行远程调用。或者说，我们只要通过某种方法把Server端创建的对象通过Marshaling传递到Client端，Client就可以进行远程调用了。
那么如何为一个远程调用从另一个AppDomain中获取一个远程对象的引用并创建Proxy呢？而这个获取的方式本身也是一个远程调用。我们的做法是：通过一个基于SAO的远程调用获取一个远程对象的引用并同时创建Proxy。而这个Proxy对应的远程对象就像当于一个CAO．&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/04/02/697358.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/697358.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]我所理解的Remoting (2) ：远程对象的生命周期管理-Part II</title><link>http://www.cnblogs.com/artech/archive/2007/03/31/694668.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Fri, 30 Mar 2007 17:52:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/03/31/694668.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/694668.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/03/31/694668.html#Feedback</comments><slash:comments>10</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/694668.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/694668.html</trackback:ping><description><![CDATA[摘要: 在上一篇文章中(<a href="http://www.cnblogs.com/artech/archive/2007/03/22/684154.html">[原创]我所理解的Remoting（2）：远程对象生命周期的管理—Part I </a>)，我简要的讲述了CLR的垃圾回收机制和Remoting 基于Lease的对象生命周期的管理。在这篇文章中，我们将以此为基础，继续我们的话题。在文章的开始，我将以我的理解详细地讲述Lease和Sponsorship。然后我通过一个Sample，为大家演示如何以不同的方法延长远程对象的生命周期。&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/03/31/694668.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/694668.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]我所理解的Remoting（2）：远程对象生命周期的管理—Part I</title><link>http://www.cnblogs.com/artech/archive/2007/03/22/684154.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Thu, 22 Mar 2007 07:56:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/03/22/684154.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/684154.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/03/22/684154.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/684154.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/684154.html</trackback:ping><description><![CDATA[摘要: 在.NET中提到对象的生命周期，我们会不由自主地想到CLR的垃圾回收。在运行一个.NET程序过程中，我们通过某种方式，比如通过new操作符，通过反序列化，通过反射机制，创建一个对象，CLR在为这个对象在托管堆中开辟一块内存空间。随着程序的运行，创建的对象越来越多，托管堆中的可用的内存越来越少，必须有一种机制来判断被分配在托管堆中的对象那些已经不被使用，以及进行对这些对象占用的内存进行回收。这种机制被称为CLR自动内存管理，也就是我们常说的垃圾回收。为了说清楚远程对象的生命周期管理，我们 得首先了解本地对象的生命周期。&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/03/22/684154.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/684154.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]我所理解的Remoting（1）：Marshaling &amp; Activation - Part II</title><link>http://www.cnblogs.com/artech/archive/2007/03/16/677579.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Fri, 16 Mar 2007 09:42:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/03/16/677579.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/677579.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/03/16/677579.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/677579.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/677579.html</trackback:ping><description><![CDATA[摘要: 在上面一片文章（我说理解的Remoting（1）：Marshaling 和 Activation），我花了大量的文字来来描述了Remote Object如何通过Marshaling的过程从Server端所在的Application Domain经过相关的转换（Transformation）传递到Client所在的Application Domain供Client调用； 以及Client的调用请求如何在Activate处于Server端Application Domain的Remote Object。可能看过我Blog的人都知道，我几乎在每篇文章中都会有一个Sample，我不太相信流于文字的理论，我喜欢用事实说话。所以下面我们将用Sample来证明。这个Sample中将沿用简单的Calculator的应用。Source Code可以从这里下载（Artech.MyRemoting.zip）&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/03/16/677579.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/677579.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]我所理解的Remoting（1）：Marshaling &amp; Activation - Part I</title><link>http://www.cnblogs.com/artech/archive/2007/03/14/674930.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Wed, 14 Mar 2007 10:27:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/03/14/674930.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/674930.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/03/14/674930.html#Feedback</comments><slash:comments>15</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/674930.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/674930.html</trackback:ping><description><![CDATA[摘要: 对于一个对象，当他创建的时候被绑定到（Be Bound）到某一个Context上——这个Context可能是一个内部网络，一台主机，一个进程，一个托管的Application Domain。当另一个Context要调用这个对象，有时候必须 对这个对象作出一些不要的转变（Transformation），这个转变的过程被称为Marshaling。我们一般由两种方式的Marshaling——By Reference 和By Value。前者向是把对象的一个引用传递出去，而后者则是从新创建一个和对象一样的Copy向外传递。对于任何一个分布式应用来说，Client和Service都分别出于各自的Context之中，Client 以某种方式调用Server(可能是基于Message, 也可能基于RPC)Server)，这个调用请求通过一个已经注册到Server端注册的Channel传递到Server端，Server从这个调用请求中提取所需的Metadata信息，创建相应的对象——对Client来说这个对象是一个远程对象（Remote Object）而Activation就是如何创建Remote O&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/03/14/674930.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/674930.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创].NET Remoting: 如何通过Remoting实现双向通信（Bidirectional Communication）</title><link>http://www.cnblogs.com/artech/archive/2007/03/01/660595.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Thu, 01 Mar 2007 11:19:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/03/01/660595.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/660595.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/03/01/660595.html#Feedback</comments><slash:comments>34</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/660595.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/660595.html</trackback:ping><description><![CDATA[摘要: Remoting是NET平台下比较成熟高效的分布式技术，我们习惯采用传统的远程调用的方式使用Remoting。在客户端所在的Application Domain，我们通过Proxy（Transparent Proxy）远程地跨Application Domain调用一个方法。当来自Client端的调用请求通过Proxy到达Server端所在的Application Domain后，Remoting Infrastructure在Server 端激活（Activate）相应的远程对象（一个继承子System.MarshalByRefObject类对象）——这里仅仅以服务端激活对象（Server Activated Object——SAO），然后再Server端执行相应的操作后把Result传递给Proxy，并最终到达Client。这是一种典型的Request/Response的调用方式。

我之所以一直比较推崇在.NET平台下使用Remoting而非XML Web Service是因为我觉得.NET Remoting是一种比较成熟的分布式技术。它自身提供了XML Web &nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/03/01/660595.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/660595.html?type=1" width = "1" height = "1" />]]></description></item></channel></rss>