一般来说,如何实现实时监控系统?

发布于 2024-09-28 23:46:21 字数 240 浏览 0 评论 0原文

假设我有一个显示结果的 ASP.NET,或者一个 Silverlight 客户端。我想显示我的服务器或嵌入式设备的当前状态。 (假设设备读取温度和湿度统计数据)

我应该如何将状态信息从我的设备发送到前端?我应该轮询设备并将结果保存到 SQL、Azure 表等吗? (由于其他原因,Azure 是一种适合该项目的技术。这就是我提到它的原因)

或者我应该创建一个直接轮询设备并返回当前状态的 WCF 服务。

什么更有意义?

Suppose I have either an ASP.NET displaying my results, or a Silverlight client. And I'd like to show the current status of my server, or embedded device. (pretend the device reads temperature and humidity stats)

How should I send the status information from my device to the front end? Should I poll the device and save the results to SQL, Azure Table, or the like? (Azure is a technology that fits with this project for other reasons. That's why I mention it)

Or should I create a WCF service that polls the device directly and returns the current status.

What makes more sense?

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

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

发布评论

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

评论(2

孤寂小茶 2024-10-05 23:46:22

您还可以在 silverlight 应用程序中使用“推送”绑定。基本上,您不需要手动轮询服务器,服务器会在认为有必要让客户端知道任何更改时向您发送推送通知。

You can also using a "push" binding within your silverlight app. Basically instead of you manually polling the server, the server will send you a push notification anytime it deems it necessary to let the client know of any change.

却一份温柔 2024-10-05 23:46:21

在 ASP.NET 或 Silverlight 中,您必须从客户端(网页或 Silverlight 应用程序)轮询到后端才能获取当前状态。在 ASP.NET 中,我会考虑通过使用 Javascipt 对服务进行 AJAX 轮询来完成此操作(查看使用 Jquery 或类似的方法来简化此操作)。

在 silverlight 中,您需要配置某种服务来返回结果并使用在单独线程上运行的 Timer 控件进行轮询。

In either ASP.NET or Silverlight you are going to have to poll from the client (web page or Silverlight app) to the backend to get the current status. In ASP.NET I'd look into doing this via an AJAX poll to a service using Javascipt (look at using Jquery or something similar to make this easier).

In silverlight you will need to have some sort of service configured to return the results and poll it using the Timer control running on a seperate thread.

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