After some more thought, then I just consider this an instance of the  
observer visitor. Maybe with some threads if you want some stuff done  
i parallel.

--
Janus


Den 07/12/2007 kl. 13.31 skrev Martin Geisler:

> Janus Dam Nielsen <[EMAIL PROTECTED]> writes:
>
> Hi Janus, thanks for the reply.
>
>> I will take a look at it when I get home tonight. My initial though,
>> without having read your post, is that: Yes you can do it in Java but
>> it won't be pretty.
>>
>> --
>> Janus
>
> Right, that's the conclussion I arrived at too. Without function
> pointers, callbacks are no fun. Python also has the advantage of
> anonymous functions (lambda expressions).
>
> I discussed it with Mikkel, and he commented that the comparison was
> biased since you wouldn't even start like that in Java to begin with.
>
> One would probably represent the expression tree explicitly and  
> evaluate
> it starting with the leaf nodes.
>
> If all nodes are associated with a program counter (as in VIFF), then
> that could be used as a key to lookup the right node to evaluate when
> data arrives from the network. If a add-node has both inputs ready,  
> then
> it is removed and its parent then has one less input to wait for.  
> Yeah,
> that could definitely be programmed... :-)
>
> Using a thread to receive listed for input, and another thread to work
> on reducing the tree, then this should work nicely. Perhaps a third
> thread to send out messages produced by the tree reducer...
>
> Tomas, I guess this design is similar to the one you though of when we
> discussed alternatives for the SIMAP runtime?
>
> -- 
> Martin Geisler

_______________________________________________
viff-devel mailing list (http://viff.dk/)
[email protected]
http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk

Reply via email to