-
March 10th, 2003, 09:56 AM
#1
Multiuser Network Enabled App
Hello,
I am trying to create a network enabled application. That would mean that it will have a database server and one or more instances of my app running on different machines. The problem is that each machine need to have a way to notify the other machine that some event happened. In short: how can one machine broadcast some information to the other machines.
Thanks in advance.
-
March 10th, 2003, 10:33 AM
#2
Two ways I can think of right off hand.
1. Use your database. Create a table just for messages.
2. Probably more along the lines of what you are looking for, use the winsock control. Look in the help file under Winsock Control, then using the Winsock Cotrol for a few examples. Or you can search here or PlanetSourceCode for "CHAT"
Hope this helps.
Roger
-
March 10th, 2003, 11:32 AM
#3
What I need to send is events. I.e when some action happens in one of comuter, all other must receive notification along with other infomration about the event. A table for messages may do the job but there will be unnecessary database server overload. Also there are other problems like: When event occur, how each station knows that it will not process it more than once, how long the message stays in the table etc.
About the Winsock control: As I understand the recipient and the sender should be known, Is it possible that the sender broadcast the message so that more than one station receive the message?
-
March 11th, 2003, 02:35 AM
#4
About the winsock and a common datasource you could enable the broadcasting..
1. Use a UDP winsock.
2. Use the a common log table.
Every application should just log his ip address into the log table. .. Then the program could just retrieve the coverage (recordset) from this table, then send each record with a message (notify) by just switching the UDP socket's remotehost property with the ip address...Broadcasting!!
Busy
-
March 11th, 2003, 02:40 AM
#5
Thanks to both Chay Luna and Roger for their ideas.
I think that UDP protocol and the ip address logging into table will do the job.
Regards
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|