在服务器之间发送类,而不仅仅是类接口?

发布于 2024-08-04 08:44:04 字数 263 浏览 5 评论 0原文

我正在创建一个网格应用程序,它要求我发送将类包装到网格内的参与节点的软件包。

我提出的第一个想法是让主节点联系每个节点(运行 Windows 服务)并发送一个程序集,该程序集包含一个遵循公共接口的类,以及一个包含配置信息的 .config 文件。

有更好的方法吗?除了关于这应该是推动还是拉动的讨论之外,有效地进行软件更新的最佳方法是什么?如果我可以使用类似于客户端节点调用的 WCF 服务的东西,那就太好了,但这当然会将真正的处理留在主节点上,这将有效地对我的集群进行非集群化。

I am creating a grid application which requires me to send software packets that wrap a class out to participating nodes within my grid.

The first idea that I came up with was to have the master nodes contact each node (running a Windows service) and send an assembly containing a class which adheres to a common interface along with a .config file containing, well, configuration information.

Is there a better way to do this? Aside from the discussion on whether this should be a push or a pull, what's the best way to get what is effectively a software update out? It would be great if I could use something similar to a WCF service called by the client nodes, but that would, of course, leave the real processing on the master node, which would effectively uncluster my cluster.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

极致的悲 2024-08-11 08:44:04

您可以发送汇编字节并将它们直接加载到运行时中。它适用于托管代码。我不知道有更好的方法来做到这一点。是的,使用推送模型:)

You can send the assembly bytes and load them directly into the runtime. It work well for managed code. I'm not aware of a better way to do this. And yes, use a push model :)

心意如水 2024-08-11 08:44:04

这似乎是一个有效的方法。这本质上就是大多数 .NET 插件模型的工作方式。

我能想到的唯一其他方法是来回发送脚本文件。您可以制作自己的定制 DSL,但我认为这有点过分了。使用 Iron Ruby 或 Iron Python 之类的东西会更简单,也更强大。另一个想法是发送 PowerShell 脚本。

我从未尝试过此操作,但也可以来回发送 C# 或 VB 文件,然后在需要运行时对其进行编译。然而,我认为这比前两个建议没有什么优势。

This seems like a valid approach. This is essentially how most .NET plugin models work.

The only other approach that I can think of would be sent script files back and forth. You could make your own custom DSL, but I think that that would be overkill. Using something like Iron Ruby or Iron Python would be a lot simpler, as well as a lot more powerful. Another thought would be to send PowerShell scripts.

I have never tried this, but it's also possible to send C# or VB files back and forth and then compile them when they need to be run. However, I see little advantage of this over the previous two suggestions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文