Callbacks from C into Squeak

Klaus D. Witzel klaus.witzel at cobss.com
Mon Dec 18 17:42:35 UTC 2006


Hi Dan,

on Mon, 18 Dec 2006 11:11:46 +0100, you wrote:
> David T. Lewis wrote:
>>  Daniel,
>>  To follow up on my comment above, I put together a test that has Squeak
>> forking another Squeak image, then sending 'hello' back and forth a  
>> million
>> times between the two images, each of which is running in a separate OS
>> process. The one million transactions run in about 150 seconds on my  
>> 166MHz
>> Pentium. I guess that on faster hardware it would do better.
>>  So somewhat to my surprise, it does seem reasonable to consider using  
>> simple
>> communications through a pipe for the kind of work you are describing,  
>> and
>> expect performance in the "minutes not hours" range.
>>  Here is the test that I ran:
...
>>   Dave
>
> Hi Dave
>
> That makes it an overhead 0.15ms per callback, which is acceptable. I  
> will need to pass back an forth a packed array of floating point numbers  
> with a few hundred elements in it (representing the state of the system  
> and its calculated derivative). How could that be achieved without  
> denting that 0.15ms overhead too much?

I've worked with mainframe computers of these people (beware: gif patent  
holders)

- http://www.google.com/search?q=WebTx+ipc+shared+memory

for quite some time. We had a supplemental Unix box integrated into the  
mainframe (other users choose to integrate MS boxen) for various purposes.  
The interface was very versatile and the fastest transport was shared  
memory (of course, for very high volume bank transactions ...). IIRC this  
interface establishes connection using pipes and then just tells "new data  
arrived" (like with your call/callback), after updating shared memory.

Perhaps such a shared memory approach is of use for you, perhaps in  
concert with Dave's pipe solution (but I don't know of any Squeak support  
for shared memory).

/Klaus

> Cheers
>
> Daniel
>
>




More information about the Squeak-dev mailing list