472,799 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,799 software developers and data experts.

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 1881
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."

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.microsoft.com> wrote in message
news:CB**************@TK2MSFTNGXA03.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 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."

Jul 21 '05 #3
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:
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."

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.microsoft.com> wrote in message
news:CB**************@TK2MSFTNGXA03.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 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."


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.
--
"MasterBlaster" <Ma***********@newsgroup.nospam> wrote in message
news:C1**********************************@microsof t.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.
--
"MasterBlaster" <Ma***********@newsgroup.nospam> wrote in message
news:C1**********************************@microsof t.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!
"MasterBlaster" <Ma***********@newsgroup.nospam> wrote in message
news:C1**********************************@microsof t.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
Hi,

1. Notification Services makes it possible to build and deploy a
notification application quickly, and to scale the application to support
millions of users. I don't think 40 users is a big deal for notification
service if you have a good architecture for your software. You can also try
to ask in the following newsgroup.

microsoft.public.sqlserver.notificationsvcs

2. Yes, you have this correct.

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

Jul 21 '05 #11

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

Similar topics

36
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...
10
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...
10
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...
0
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...
2
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...
18
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...
2
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...
3
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...
12
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.