Multi-standalone communication

Dave dave at looktowindward.com
Fri Dec 8 07:40:32 EST 2006


On 7 Dec 2006, at 19:21, Richard Miller wrote:

> The computer in question is not set up with networking.
>>
>> If the computer is set up with networking, then you can use UDP  
>> over 127.0.0.1 (sockets).
>>
>> You can also use files, maybe something like this.  The sender, A,  
>> can write a file "tempAToB", wait until there is no "AToB" and  
>> then rename "tempAToB" to "AToB".  The receiver, B, might look for  
>> the new "AToB", read it, and delete it.  For very short messages,  
>> just rename the file and look for changes.  You can also use  
>> multiple files as a queue in alphabetical order.
>
> Dar... I understand the plan here. My concern with this is the  
> constant disk access that would need to take place. The information  
> that needs to be exchanged between these two apps is directly  
> connected to the users experience. So when the user presses a  
> button on App A, they expect to see a rather immediate response.  
> That response will be occurring in App B, but I need it to look  
> like it's all one application. So App B needs to be polling every  
> second or so, as does App A. Is this too much disk access or  
> acceptable?
>
> I've played around a little with read/write - to/from processes,  
> but can't get the hang of it yet. Having had no experience with  
> those functions, it may take a bit of work to get that to go. Same  
> goes for sockets... no experience with that either.
>
> And, of course... I'm really hoping to not spend a lot of hours on  
> this issue.
>
> Rob.. I'll look into Jan's socket communication library. I'm  
> assuming that it is accessible to anyone who signs up with that  
> group. Is the use of that approach fairly straightforward?
>
> Also hoping to hear back from Dave on the ISM module.

I've sent you a demo. The new version of ISM basically has the UDP/ 
TCP link built into a library. There are Listen and Send functions in  
ISM that "route" high level commands to the correct place(s).

Using the current version, depending on how you build your  
standalones you can achieve the same effect without the need for  
inter-application communication. If you use the model (as per the  
demo) of having one standalone "stub" that basically optionally  
contains a splash-screen but is really used just to load the Engine  
and Initialize the rest of the stacks, then you can get the  
impression of having separate applications just by calling up a  
different stack (.rev) file (you would of course need to switch the  
menu bar if you were using one).

However if you want real inter-application communication (maybe  
across a network) then you'll need to the new version which I am  
presently working on.

Hope this Helps
Dave




















More information about the use-livecode mailing list