惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
D
DataBreaches.Net
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
Check Point Blog
腾讯CDC
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
IT之家
IT之家
月光博客
月光博客
U
Unit 42
K
Kaspersky official blog
T
Threatpost
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
GbyAI
GbyAI
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
云风的 BLOG
云风的 BLOG
酷 壳 – CoolShell
酷 壳 – CoolShell
I
InfoQ
Engineering at Meta
Engineering at Meta
Recorded Future
Recorded Future
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security @ Cisco Blogs
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
Security Archives - TechRepublic
Security Archives - TechRepublic
Webroot Blog
Webroot Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Schneier on Security
S
Secure Thoughts
The Register - Security
The Register - Security
B
Blog RSS Feed
The Last Watchdog
The Last Watchdog
P
Palo Alto Networks Blog
爱范儿
爱范儿
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
L
LINUX DO - 热门话题
C
Cisco Blogs
Spread Privacy
Spread Privacy
F
Full Disclosure
博客园 - 聂微东
T
The Blog of Author Tim Ferriss

博客园 - 祥子哥哥

纪念一下我的20年的博客园。 [转]OPC.Client for DA and UA 使用C#开发库UcAsp.OPC.Client使用案例 Lucene.Net Kmeans++算是DONet实现 tinymce上传文件插件。 C#中图片处理中定义显示区域[或者可以称为蒙板效果] C#生成的图片如何设置DPI Jpg保存图片确认质量 Flex在子控件操作父窗口函数 Flex 不同 application 之间传参数(转) - 祥子哥哥 刚刚写的一个加密算法 如何在DropDownList第一項加入新項目 2003服务器中出现"请求的资源在使用中"错误的解决方法 如何在.Net中访问MySQL数据库 MS SQL日志清理代码 Server Application Error Javascript检测Flash插件是否安装及版本号 最近ASP.NET WAP开发的一些情况! 数据库备份
推荐一个.Net的轻型RPC服务UcAsp.RPC
祥子哥哥 · 2017-08-16 · via 博客园 - 祥子哥哥

1.UcAsp.RPC是基于..NET Framework 4.6一个RPC框架;

2.代码侵入性非常低,几乎不需要改动代码!

3.该框架的设计思路是已经写好单机版的程序怎么才能快速的实现分布式RPC部署;

Nuget 安装

Install-Package UcAsp.RPC 

 服务器端配置

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <sectionGroup name="service">
      <section name="server" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null" />
    </sectionGroup>
  </configSections>
  <service>
    <server>
      <add key="port" value="9966" />  <!--服務器端口--->
      <add key="username" value="admin" />
      <add key="password" value="admin" />
    </server>
    <assmebly>
      <add key="Face" value="Face.dll" /><!--需要被外部應用的類庫--->
    </assmebly>
  </service>
</configuration>

服務器端设置

ApplicationContext context = new ApplicationContext();
context.Start(AppDomain.CurrentDomain.BaseDirectory+ "Application.config", AppDomain.CurrentDomain.BaseDirectory);

客戶端配置

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <sectionGroup name="client">
      <section name="server" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null" />
    </sectionGroup>
  </configSections>
  <client>
    <server>
      <add key="ip" value="127.0.0.1:9966" /> <!---服務器地址--->
      <add key="mode" value="tcp" />
      <add key="pool" value="10" />
      <add key="username" value="admin" />
      <add key="password" value="admin" />
    </server>
    <relation>
      <add key="ISCS.WMS2.Model" value="ISCS.WMS2.Model.dll" /><!--関聯類庫-->
    </relation>
  </client>

</configuration>

客户端设置

客戶端創建對象

static ApplicationContext context= new ApplicationContext();
context.Start(AppDomain.CurrentDomain.BaseDirectory + "Application.config", AppDomain.CurrentDomain.BaseDirectory);

實例一個對象

IFace.ITest clazz = context.GetProxyObject<IFace.ITest>();
int o = (int)i;
string x = clazz.R(ref o);