On Tue, Jun 24, 2014 at 2:54 PM, Mike Copeland <m...@ggisoft.com> wrote:

> Simplified scenario...
> 2 Windows computers using a VFP9 SP2 application, served by 1 MySQL
> (MariaDB) server on Linux box
>
> What is the best way for computer #1 to "do something" and have computer
> #2 detect that change?
> (for example, save a new record on the server for a processed shipment)
>
> What my feeble mind has thought of so far...
> -- #2 uses a timer to query the server for changes (lotsa traffic!
> especially with dozens of workstations)
>

"DOES NOT SCALE" is the fashionable criticism these days. In your situation
of 2 computers, this is fine. For dozens, not so much of a problem: a dozen
pre-compiled queries every five seconds is trivial bandwidth and process.
Now, if you're scaling to tens of thousands, or millions, you need to
reconsider your strategy.



> -- #1 'signals' #2 somehow using Windows API (never done anything like
> this)
>

Bad idea on so many levels. You've gone from a client-server app to a
peer-to-peer app. And does Computer #1 signal ALL the computers that are
somehow registered as being attached when this is multi-user. Things get
out of hand, geometrically.



> -- a better way I'm oblivious to (no surprise!)
>
> Is there a better way?
>

Refine your scenario. If this is just "the shipping computer needs to know
if there's more work to do, once an order is posted," then, yes, querying a
queue of work to be done ("SELECT NEXT 1 * from ORDERS WHERE tTimeStamp >
ltLastChecked") is the simplest. It can scale to multiple computers doing
the query with a simple flag for each to call dibs when they lock an order
to process.

If this is a more complex process, simplified for asking the question,
well, you're just going to get simple answers :) There are all sorts of
techniques for workflow processing, message queueing and process
orchestration.


>
> Mike Copeland
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CACW6n4vFZMF=DqSwEXtG1YvbgM+qjLzn=971dv+xjeehfeq...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to