Solved

Real Time Programming

Posted on 2002-07-01
7
135 Views
Last Modified: 2013-11-13
Hi There,

I what to do a simple prog.

2 clients with DataGrid connecting to the same Access DB, showing the same table.

I want when 1 client update somting in the table, the other client AUTOMATICLY update the view of his datagrid.

How ?
0
Comment
Question by:computech1
7 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 7121831
This is a fairly common request, in order to achieve this you need to do one of two things; either create a pull system whereby all clients poll a specific table on a regular basis (many times a second perhaps) and thereby refresh their data or a push system whereby all clients register with a server that then informs all clients when a change has been made.

Either way it is not something that you can just turn on.
0
 
LVL 1

Expert Comment

by:thanes
ID: 7121942
Polling is seldom practical or efficient.  Another approach to use (if you want to go deeper) is using a message queue like MSMQ (Microsoft Message Queue).  Comes with Win2K server and allows you to basically setup a simple messaging system.  You would have to have your apps communicating through the message queue informing the other instances of your app when they've updated the table(s).  You will want to probably pickup a book that covers MSMQ (or whatever its called these days) with good examples.  Best of luck.

Regards, Thane Schaffer
0
 

Author Comment

by:computech1
ID: 7121990
What about sending simple massage using UDP or TCP/IP ?

TimCottee , can u be more specific ? what do u mean by :
"create a pull system whereby all clients poll a specific table on a regular basis"

U mean all clients will make requery each few sec ?
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 43

Accepted Solution

by:
TimCottee earned 50 total points
ID: 7122022
Essentially yes, though it wasn't really a serious suggestion as this kind of system ends up generating so much network traffic and also uses a lot of CPU time on each machine making it practically impossible to use.

Simple messaging is really what I was suggesting in a way (without being that precise). The whole point is that you have some centralised location where you register the fact that an update has occured, then you use this to inform all clients that a change has occured and they can then decide whether to refresh the data.

Using MSMQ or some other message queuing system is a perfectly good way of doing this, likewise sending a simple message using Winsock to a list of registered clients would work well. However if you use a method like this you would probably also want to include a time-based refresh method as well to allow for the fact that the server application may not be available or that messages may not have reached the clients in an appropriate timeframe. Using MSMQ should handle much of this as it does "guarantee" delivery of the messages by using handshaking etc.

The question for you then becomes how much (time/money) do you have to spend on this task and whether it is appropriate for the situation.
0
 

Author Comment

by:computech1
ID: 7127170
The prob with winsock is that when the list of ppl gets the massage to make update, several access is made to the DB at the same mil sec . the outcome of this : no ALL the clients success to update.

How can I solve it ? Timer dealing the accessing to the DB in a diffrent time for each client ?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7970966
Hi computech1,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept TimCottee's comment(s) as an answer.

computech1, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
ID: 8018542
Per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now