关于实时轮询的设计问题。 [英] Design question about real time polling.

查看:59
本文介绍了关于实时轮询的设计问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正处于设计分析的初始阶段,我正试图提出

,其中包含一些关于如何处理用户需要的功能的建议

新申请。我们正在使用VB.NET /窗口表单


要求的功能:

用户将输入一些将触发通知事件的数据。

例如,我是研究分析师,为

股票输入卖出建议。一旦执行了该操作,就应该向

投资组合经理和交易员发送通知。投资组合经理和交易员将有一个主屏幕,在右下角他们将有一个网格,

将显示来自研究分析师的实时通知,

交易员和其他投资组合经理。这些实时通知将触发用户执行其他任务。
此外,这些通知需要存储在sql db中,因为如果他们关闭系统,他们需要能够将这些通知重新启动。
br />
我的问题是我如何实时轮询新通知和

不会影响用户表现或有任何其他主要缺点

对环境的影响。我正在考虑使用计时器控件和

对队列表进行asynch调用以保存通知,但是

我不知道这是否是最好的方法。


感谢您的任何建议

We are in the initial stages of design analysis and I''m trying to come up
with some ideas on how to handle the feature our users are requiring from the
new application. We are using VB.NET/window forms

Feature Requested:
A user will be entering some data that will trigger an a notification event.
For example I am a research analyst entering a sell recommendation for a
stock. Once that action is preformed a notification should be sent the
portfolio manager and the traders. The portfolio managers and traders will
have a main screen and in the right hand corner they will have a grid that
will show the notification coming in real time from the research analysts,
traders and other portfolio managers. These real time notifications will
trigger the user to perform other tasks. Also these notifications need to be
stored in a sql db because if they shutdown the system they need to be able
to bring those notifications back up.

My question is how do I poll for new notifications on a real time basis and
have it not impact the users performance or have any other major downside
impacts on the environment. I was thinking of using a timer control and
making asynch calls to the queue table that will hold the notifications, but
I don''t know if that is the best approach.

Thank You for any suggestions

推荐答案




首先,我想确认一下我对你的问题的理解。从

您的描述中,我了解您需要在

用户输入一些数据时触发事件。如果有任何误解,请随时告诉我

告诉我。


在这种情况下,我认为您可以尝试在C#类中使用事件。当

用户尝试更改类中的字段时,您可以触发事件。在

事件处理程序中,我们检查值。如果它符合某些条件,我们

可以发送电子邮件或做任何其他的事情。


以下是有关活动的更多信息:

http ://msdn.microsoft.com/library/de...us/vbcon/html/

vborieventhandlers.asp


HTH。


Kevin Yu

=======

此帖子已提供按现状没有保证,并且不授予

权利。

Hi,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to trigger an event when a
user enter some data. If there is any misunderstanding, please feel free to
let me know.

In this scenario, I think you can try to use events in a C# class. When a
user is trying to change a field in a class, you can trigger an event. In
the event handler, we check the value. If it meets certain conditions, we
can send emails or do something else as you want.

Here is more information on events:

http://msdn.microsoft.com/library/de...us/vbcon/html/
vborieventhandlers.asp

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."


另一个需要考虑的解决方案是基于套接字(TCP或UDP) 。在这种情况下,

通知应发送到中央服务器,它将被输入数据库,然后广播给所有感兴趣的各方。

不要被网络编程推迟,如果你没有在它之前完成它的经验。


" Kevin Yu [ MSFT] QUOT; <,V - **** @ online.microsoft.com>在消息中写道

新闻:CB ************** @ TK2MSFTNGXA03.phx.gbl ...
Another solution to consider is socket based (TCP or UDP). In this scenario
the notification should be sent to a central server whhere it will be
entered into the database and then broadcast to all interested parties.
Don''t be put off by network programming if you haven''t done it before its
great experience.

"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:CB**************@TK2MSFTNGXA03.phx.gbl...

首先,我想确认一下我对你的问题的理解。从
您的描述中,我了解您需要在
用户输入某些数据时触发事件。如果有任何误解,请随意

告诉我。

在这种情况下,我认为您可以尝试在C#类中使用事件。当
用户尝试更改类中的字段时,您可以触发事件。在事件处理程序中,我们检查值。如果它符合某些条件,我们可以发送电子邮件或者根据需要做其他事情。

以下是有关活动的更多信息:

http://msdn.microsoft.com /library/de...us/vbcon/html/
vborieventhandlers.asp

HTH。

Kevin Yu
== =====
此帖子已提供按原样没有保证,也没有授予
权利。
Hi,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to trigger an event when a
user enter some data. If there is any misunderstanding, please feel free
to
let me know.

In this scenario, I think you can try to use events in a C# class. When a
user is trying to change a field in a class, you can trigger an event. In
the event handler, we check the value. If it meets certain conditions, we
can send emails or do something else as you want.

Here is more information on events:

http://msdn.microsoft.com/library/de...us/vbcon/html/
vborieventhandlers.asp

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."



是的我觉得有一点误会。我知道如何在用户输入数据时触发

事件。我的问题是,一旦该事件被触发,并且数据被保存到数据库中。
。其他客户如何获得通知

实时有消息他们需要拿起并填入

数据网格。


Kevin Yu [MSFT]"写道:
Yes I think there is a bit of a misunderstanding. I know how to trigger the
event when a user enters data. My issue is once that event is triggered and
the data gets saved to the db. How do other clients get the notification
real time that there is messages they need to pick up and populate into a
datagrid.

"Kevin Yu [MSFT]" wrote:


首先,我想确认一下我对你的问题的理解。从
您的描述中,我了解您需要在
用户输入某些数据时触发事件。如果有任何误解,请随时告诉我。

在这种情况下,我认为您可以尝试在C#类中使用事件。当
用户尝试更改类中的字段时,您可以触发事件。在事件处理程序中,我们检查值。如果它符合某些条件,我们可以发送电子邮件或者根据需要做其他事情。

以下是有关活动的更多信息:

http://msdn.microsoft.com /library/de...us/vbcon/html/
vborieventhandlers.asp

HTH。

Kevin Yu
== =====
此帖子已提供按原样没有保证,也没有赋予
权利。
Hi,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to trigger an event when a
user enter some data. If there is any misunderstanding, please feel free to
let me know.

In this scenario, I think you can try to use events in a C# class. When a
user is trying to change a field in a class, you can trigger an event. In
the event handler, we check the value. If it meets certain conditions, we
can send emails or do something else as you want.

Here is more information on events:

http://msdn.microsoft.com/library/de...us/vbcon/html/
vborieventhandlers.asp

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."



这篇关于关于实时轮询的设计问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆