Multi-standalone communication

Jesse Sng jsng at wayoflife.org
Sat Dec 9 05:47:03 EST 2006


Hi Jim,

>In my case, Applescript would be far too slow, since my messaging can be as
>many as 6-10 packets per second between the data service provider, 4 Rev
>apps local, and 6 Rev apps remote (and  3 of the remote apps are running on
>Windows)
>Two of the apps are running on the other side of the Atlantic on a Mac Mini
>Solo.

I wasn't talking about AppleScript, but AppleEvents. These are far 
simpler and much faster to send/receive and decode than AS.

6 to 10 per second is probably not a problem for AppleEvents given 
that back in the 90s, AppleEvents were used to process CGIs on 
webservers running on Mac OS 8 and 9. AE wasn't quite a fast back 
then and it has improved quite a bit on OS X.

Basically, it would be used as a simple messaging mechanism that 
could incorporate the packaging of parameterized data. The OS would 
automatically queue the messages so that you can process it in 
sequence.

The key advantage is that is is simpler to manage than packet 
sending/receiving while still retaining much of the speed advantage.

Do a search on the online document for AppleEvent and also Send. 
There's a built in handler for receiving AppleEvents and also a way 
to extract data from an AE object. You can use the send command as 
follows (quoting the online doc):

send "get field 3" to program "Corporate Zone:Other Mac:Revolution"
send thisMessage to application "FileMaker" without reply
send field ID 9 to program someProgram with "GURLGURL"

If you notice the 1st example, it actually sends it across the 
network to a specific app on a specific machine.


Jesse


More information about the use-livecode mailing list