[squeak-dev] Re: n-core Smalltalk at work [Re: Hydra now can do mitosis]

Klaus D. Witzel klaus.witzel at cobss.com
Sun Feb 22 18:08:31 UTC 2009


On Sun, 22 Feb 2009 18:18:20 +0100, Philippe Marschall wrote:

> 2009/2/22 Klaus D. Witzel :
...
>>> Well I have this web framework thingy where each http connection runs
>>> in it's own process. Request processing is quite fast, sometimes below
>>> a millisecond. There is potentially a lot sharing going on between
>>> those connections for configuration, sessions, continuations and
>>> stuff.
>>
>> Yeah we thought about that, after exchanging some Qs+As with Lukas  
>> (and/or
>> you?) during last Camp Smalltalk, for the general case for Hydra.
>>
>> Several things are competing for attention/resolution/prototypical work:
>>
>> 1) some [accepted] Socket (and its OS dependent bits) can "belong" only  
>> to
>> one native thread (= independent .image) in Hydra. Is this compatible  
>> with
>> your web framework's requirements.
>>
>> 2) it must be possible for one native thread to accept a Socket, for  
>> another
>> one to read/write it and get rid of it (and of its OS dependent bits).  
>> This
>> is not a problem for us at the Smalltalk language/heap level but, until  
>> now
>> I did't find an OS guy who said "this works, with guarantee, on these  
>> XYZ
>> platforms".
>
> That and 1) do not necessarily need to happen. You could imagine one
> image/native thread doing all the socket IO and handing the actual
> work to other images/native threads.

Yup. And the price tag is a) transfer "task description" to worker thread  
and b) transfer "result string" back in full or in part(s). And when using  
Hydra channels for transfer, add c) c-alloc of strings-to-be-transported.

>> 3) when your web framework+app depends on a database "whatsoever", how  
>> is
>> this to be shared (if sharing is really needed) between multiple native
>> threads.
>
> Yepp, if you interpret database in a more general sense (a bunch of
> objects).

... which includes framework/app config update/change. Right.

> There is also the question of how coordination happens
> between multiple images especially on this shared data.

Right. Looks like a topic for the next Camp Smalltalk, with hands-on.

> Cheers
> Philippe
>
>



-- 
"If at first, the idea is not absurd, then there is no hope for it".  
Albert Einstein




More information about the Squeak-dev mailing list