473,654 Members | 3,272 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Design question about real time polling.

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
Jul 21 '05 #1
10 1940
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 misunderstandin g, 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/
vborieventhandl ers.asp

HTH.

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

Jul 21 '05 #2
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.mic rosoft.com> wrote in message
news:CB******** ******@TK2MSFTN GXA03.phx.gbl.. .
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 misunderstandin g, 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/
vborieventhandl ers.asp

HTH.

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

Jul 21 '05 #3
Yes I think there is a bit of a misunderstandin g. 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:
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 misunderstandin g, 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/
vborieventhandl ers.asp

HTH.

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

Jul 21 '05 #4
If I go socket based (TCP) I'm just trying to figure out how this would work.
A user enters data into the sql server db and that data needs to be
propogated to users who require those messages. So if I have a socket
listening for new messages and once I get a call saying new messages are in
then I could fire off a ado.net call to grab the new data. But the piece I'm
missing is what is the socket listening to figure out when new data has been
entered into a certain sql table?

Thanks for the help.

"Stelrad Doulton" wrote:
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.mic rosoft.com> wrote in message
news:CB******** ******@TK2MSFTN GXA03.phx.gbl.. .
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 misunderstandin g, 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/
vborieventhandl ers.asp

HTH.

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


Jul 21 '05 #5
Hi,

I think there are several approaches here.

1. We can use the combination of my solution and Stelrad's solution to
achieve this.

Every user enters data to the database through a server. It can be a web
service or something else. We just make sure that no new entry is missing
with this. When data is inserted to the database, an event is fired. In the
event handler, we use socket based communication to tell the client app
that new data has been entered.

2. We can use SQL Server notification service. The notification service
will inform you when the data in a certain rowset is changed. Then we also
use TCP or UDP to do the communication.

HTH.

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

Jul 21 '05 #6
I have a few more questions.

1) I have heard chatter in other newsgroups that SQL Server notification was
not a good solution when dealing with more than a few users and this app
would be utilized by at least by 40 users at the beginning. Now they didn't
go in depth on why, so let me know what yours thoughts are.

Also on this same subject if I decided to go down this road. What I think I
hear you saying is this sql server notification service would communicate
with a socket on the clients correct?

2) I just want to make sure I have the first idea down. When a certain user
triggers an event that would cause a notification. I would have an
eventhandler communicate via that users socket to all the other client
sockets that would need notification (that means it could be 1 user or 40
users). Once all the users received that notification from the publisher
they would make an ado.net call to the db to get the most recent data
entered. Do I have this correct?

Thank you for all your help.

"Kevin Yu [MSFT]" wrote:
Hi,

I think there are several approaches here.

1. We can use the combination of my solution and Stelrad's solution to
achieve this.

Every user enters data to the database through a server. It can be a web
service or something else. We just make sure that no new entry is missing
with this. When data is inserted to the database, an event is fired. In the
event handler, we use socket based communication to tell the client app
that new data has been entered.

2. We can use SQL Server notification service. The notification service
will inform you when the data in a certain rowset is changed. Then we also
use TCP or UDP to do the communication.

HTH.

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

Jul 21 '05 #7
You are far from the first person to build this.
What you are building is called a "Message Bus" and it is a common pattern
in trading systems, portals, and other forms of EAI systems (Enterprise
Application Integration). There are many commercial applications (some of
them are expensive) that will provide message bus capabilities.

It is so common, in fact, that Microsoft is including a message bus
technology in Longhorn called "Indigo".
(There is training on how to use Indigo for messaging bus applications
already available... these guys are good:
http://www.wintellect.com/training/c...ourses=2&id=37 )

Technically, the way that this is often done, for situations where folks
roll their own, is to create a message dispatcher object that runs under
Enterprise Services or an ASP.Net web service (either one. The architecture
is the same... the communication mechanism is different).

In a way, the Enterprise Services method is slightly more elegant. Using
Remoting, you can set up an Observer pattern that allows each of the clients
to subscribe to an event on the hosted Dispatcher component. When the
clients generate an event, they send it to the Dispatcher for distribution.

An excellent book to pick up would be "Advanced .Net Remoting" by Ingo
Rammer. His examples will make this design clear. This is probably the
best and simplest design for a roll-your-own situation, where you can easily
replace it with Indigo when that becomes available and if you would like
something more "iron-clad".

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"MasterBlas ter" <Ma***********@ newsgroup.nospa m> wrote in message
news:C1******** *************** ***********@mic rosoft.com...
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

Jul 21 '05 #8
Thank you for the information. I will get Ingo's book on remoting and go down
that route.

"Nick Malik [Microsoft]" wrote:
You are far from the first person to build this.
What you are building is called a "Message Bus" and it is a common pattern
in trading systems, portals, and other forms of EAI systems (Enterprise
Application Integration). There are many commercial applications (some of
them are expensive) that will provide message bus capabilities.

It is so common, in fact, that Microsoft is including a message bus
technology in Longhorn called "Indigo".
(There is training on how to use Indigo for messaging bus applications
already available... these guys are good:
http://www.wintellect.com/training/c...ourses=2&id=37 )

Technically, the way that this is often done, for situations where folks
roll their own, is to create a message dispatcher object that runs under
Enterprise Services or an ASP.Net web service (either one. The architecture
is the same... the communication mechanism is different).

In a way, the Enterprise Services method is slightly more elegant. Using
Remoting, you can set up an Observer pattern that allows each of the clients
to subscribe to an event on the hosted Dispatcher component. When the
clients generate an event, they send it to the Dispatcher for distribution.

An excellent book to pick up would be "Advanced .Net Remoting" by Ingo
Rammer. His examples will make this design clear. This is probably the
best and simplest design for a roll-your-own situation, where you can easily
replace it with Indigo when that becomes available and if you would like
something more "iron-clad".

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"MasterBlas ter" <Ma***********@ newsgroup.nospa m> wrote in message
news:C1******** *************** ***********@mic rosoft.com...
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


Jul 21 '05 #9
Have a look at the Spread toolkit, http://www.spread.org/

Best regards,
Jens

--
http://ManagedXLL.net/ | http://stochastix.de/
Replace MSDN with my first name when replying to my email address!
"MasterBlas ter" <Ma***********@ newsgroup.nospa m> wrote in message
news:C1******** *************** ***********@mic rosoft.com...
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

Jul 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

36
6367
by: Andrea Griffini | last post by:
I did it. I proposed python as the main language for our next CAD/CAM software because I think that it has all the potential needed for it. I'm not sure yet if the decision will get through, but something I'll need in this case is some experience-based set of rules about how to use python in this context. For example... is defining readonly attributes in classes worth the hassle ? Does duck-typing scale well in complex
10
2109
by: BlueDolphin | last post by:
I'm not sure if this is a question or more of a rant... but I'm looking for some input on this from other developers out there. How often has the following happened to you and how have you dealt with it. I am consulting on a new project. Originally I was going to get data dumped to me from an external system, and import the needed data once a week into a normalized design that I had created. I knew what my fields were going to be,...
10
290
by: MasterBlaster | last post by:
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...
0
2502
by: YellowFin Announcements | last post by:
Introduction Usability and relevance have been identified as the major factors preventing mass adoption of Business Intelligence applications. What we have today are traditional BI tools that don't work nearly as well as they should, even for analysts and power users. The reason they haven't reached the masses is because most of the tools are so difficult to use and reveal so little
2
1123
by: mak | last post by:
Hi, I am in the process of designing a simple Windows client application, that polls an asp.net web page using HTTP GET on an IIS 6.0 web server for a small piece of information (about 30 characters) approx every 15 minutes. I would appreciate any advice you can offer in terms of the most efficient way of polling the web server for this data. Currently the Windows client uses HTTP GET to collect the output of the web page, but I am...
18
2253
by: Jon Slaughter | last post by:
"Instead of just waiting for its time slice to expire, a thread can block each time it initiates a time-consuming activity in another thread until the activity finishes. This is better than spinning in a polling loop waiting for completion because it allows other threads to run sooner than they would if the system had to rely solely on expiration of a time slice to turn its attention to some other thread." I don't get the "a thread...
2
1494
by: Joey | last post by:
I have written an app in C#/asp.net 2.0 that is a system built to handle a large number of scenarios. Part of that system involves allowing users to download large files. As part of my original design strategy, I chose to locate these downloads in a directory separate from the website file structure. The two primary purposes for this were: (1) it is more secure because users cannot link directly to the files and (2) it is modular,...
3
4122
by: Chris Mullins [MVP - C#] | last post by:
I'm sitting on the fence on this one, and wanted to get some other people's input. If you're a big B2B person, I would love to hear your feedback... I've got a SOA system. It's based on a combination of WCF Services and ASP.Net Pages. The consumers of this service are companies all over North America. Essentially, we've got some long running operations that a vendor can kick off. These opertaions can take anwhere from 5 minutes to 2...
12
2171
by: bullockbefriending bard | last post by:
I am a complete ignoramus and newbie when it comes to designing and coding networked clients (or servers for that matter). I have a copy of Goerzen (Foundations of Python Network Programming) and once pointed in the best direction should be able to follow my nose and get things sorted... but I am not quite sure which is the best path to take and would be grateful for advice from networking gurus. I am writing a program to display horse...
0
8379
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8294
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8709
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8596
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7309
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1924
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1597
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.