Talking between programs over a network

I have a program which allows an operator to see customer information when the customer calls in using caller ID information. This information comes from a third party control.

The problem I am having is that I need the program to alert other computers on the network that a person called up and what the caller ID information is.

I thought about setting a timer on each copy of the program on each computer which will check the database backend for the information at set times, but this seems sloppy and would create too much network traffic.

What I was hoping for was to add some code to my current program that would set a bit and for the other computers on the network to pick this bit up and respond.

If you need additional clarification, please let me know.

Thanks!
dijon316Asked:
Who is Participating?
 
sunnysideandyCommented:
I agree with tunmire - use the WinSock's method .SendData on the "server" connected to the backend database and each client app would implement the _DataArrival event on the WinSock.  Look at the excellent and easy example on MSDN:

http://msdn.microsoft.com/library/devprods/vs6/vbasic/vbcon98/vbconusingwinsockcontrol.htm
0
 
Todd SturgeonIT ManagerCommented:
dijon316,

Instead having each machine poll a central db, you could  push a little file to the machine(s) that you want to be notified.  

The file--a little .txt file would
suffice--would contain the caller ID, date/time stamp, TAPI information, or whatever other info you required.

The client program could then monitor a local directory for an incoming file, and respond appropriately.

Also, a client machine could send back a little file acknowledging receipt and/or action taken.  

Having the apps communicate with little files can be better than relying on polling, and can give you great control.

Just a suggestion.

tsturgeon
0
 
tunmireCommented:
What about setting up winsock on each of your applications to listen to a preset port. Then from the recieving app broadcast a short binary that would signal the other computers. This could be done using UDP and the winsock.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
superchookCommented:
tunmire's is the more elegant of the two methods proposed, but if putting Winsock to work is a bit fiddly for you (it's not too hard though), look at NetDDE.  This is a superset of DDE, and your prog would then be compliant with many apps - not just your own custom solutions.

Excel, Access, Word and many others can all hook into your NetDDE items to access and act on their contents (- simultaneously !).

There are several DDE samples on the MSDN site, but NetDDE is a little harder to find.  It's worth the effort.




0
 
Droby10Commented:
or you could create a dcom middleware component (static across the "application" domain) that performs agent notification.
0
 
dijon316Author Commented:
Even though tunmire came up with the original solution, I decided to go with sunnysideandy mainly for supplying a link so that I could follow the sample program on my own.

I was able to create the sample of a chat program over the network without a problem. It was very easy. By following the sample, I am sure that I could modify it for my purpose without a problem.

Thanks sunnysideandy and tunmire and to all the rest who supplied comments!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.