.NET Remoting 使用最佳实践,(部分翻译)

1.          Use only server-activated objects configured as SingleCall
           只使用服务器端激活的SingleCall对象        

2.          Use the HttpChannel with the BinaryFormatter. Host your components in IIS if you need scalability, authentication and authorization features.
            使用HTTP管道下的二进制传输,使用IIS宿主,如果你需要可扩展性(可扩展到群集),认证和授权。

3.          Use IIS' ability to deactivate HTTP KeepAlives for maximum scalability.
     
4.          Use Windows Network Load Balancing in a cluster of servers during development if you want to achieve scalability. Make sure to deactivate any client affinity and make sure that you deactivate http keepalives during development!
         使用windows网络负载均衡来获取可扩展新,确认无客户端耦合...

5.         Do not use client-activated objects and don't pass any MarshalByRefObject over a remoting boundary if you plan on running on a cluster. You will easily trap this if you use the .NET Framework version 1.1 which will throw a SecurityException or a SerializationException in this case. (Yes, you could change this setting -but you shouldn't!)
          不使用客户端激活对象,如果想把系统用于群集,那么不用MarshalByRefObject参数。在.NET 1.1中,你会得到异常.

6.          Do not use events, callbacks and client-side sponsors.
         不使用事件,回调,不用客户端发起的租期管理。

7.          Do not use static fields to hold state for operational data which is subject to being changed by your users. Instead, always put this kind of state information in your database. If you keep volatile state in memory, you will run into problems if you try to scale your application out to a cluster of servers. Cache information only if it's not going to change (like a list of states or cities) - else you will run into cachesynchronization nightmares on your cluster.
         不使用static字段来保存可能被用户修改的状态数据。应该把这些数据放在数据库中。如果内存中有不稳定的状态值,那么你在扩展到聚集的时候会碰到麻烦,只应该缓存不会被改变的数据(比如城市列表),否则在聚集服务的时候,你会碰到缓存同步的问题。

8.          Do not use Remoting for anything else apart from .NET to .NET communications. Use ASP.NET Web Services and the Web Services Enhancements (WSE) for anything related to SOAP, Service Oriented Architectures and platform independence.
         除了.NET和.NET间访问,不使用Remoting, 使用WSE.

9.         Do not try to fit distributed transactions, security, and such into custom channel sinks. Instead, use Enterprise Services if applicable in your environment. .NET Remoting isn't a middleware, it is just a transport protocol - if you need services, use a service-oriented framework. And yes, you can use .NET Remoting to access Enterprise Services’ components as well!
         不要尝试使用Channel sink来管理分布式连接,权限等,使用Enterprise Services来替代。


 

转载于:https://www.cnblogs.com/billqian/archive/2006/08/30/490343.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值