near-real-time communication between an app in NY and an app in LA

Josh Mellicker josh at dvcreators.net
Thu May 18 15:24:13 EDT 2006


I type a number in a field on a card in LA

A person in NY sees that number appear magically within seconds in  
the corresponding field on their card

How do it know?*

I am compiling a list of ways for two apps to "sync up" by sending  
simple packets of info to each other, through a central server:

1. socket communication a la Revchat
2. both apps updating and periodically checking a text file on the  
server accessible through http
3. both apps updating and periodically checking the value of a record  
in a MySQL database on the server

The packets need to be stored in a MySQL database anyway, so I am  
leaning towards MySQL for simplicity, but running the same query  
every 3 seconds to see if a value has changed seems to be putting  
undue wear and tear on the MySQL server.

is checking a remote text file faster than running a MySQL query? It  
seems like it would be.



= = =  OT  = = =

*The phrase "How do it know?" comes from the joke about the Thermos:

"Sir, this Thermos keeps hot drinks hot, and cold drinks cold.

"How do it know?"

---

I used this once when purchasing a motion-activated outdoor security  
light at a Home Depot:

The box said:

"Welcomes Guests, Frightens Intruders"

I pestered the salesperson: "How do it know?"



More information about the use-livecode mailing list