Hey everyone,

I know there exists an article/whitepaper from Adobe outlining the new AS3
VM2(?), but I can't find it. Anyone know where that is? I think it would be
helpful for this gentleman's situation.

Thanks,

-Scott

On 2/22/07, ravi kumar gummadi <[EMAIL PROTECTED]> wrote:


Hi,

I am basically a Java guy, recently into Flex. It may be due to the sudden
paradigm shift from serial programming ( incl Threads) to Event Based
Programming, that I find many features totally new and surprising.

I read in a article that Flash/Flex is based on AMPED (Asymmetric-Multi
Process Event Driven) Architecture. In this kind of architecture , We have a
single thread dispatching the events and the control gets transferred
between the Events and the main thread. ( These are my vague conclusions
from what I have read and understood, Correct me if I am wrong! )

So if the event dispatched doesn't have a IO/Network operation, the
control reaches back to the EventDispatcher only after the eventhandler
method is totally complete. But if our eventhandling mechanism has a huge
data crunching operation , doesn't that freeze the client?

1.
Lets say I have 2 things to be done, Doing a animation and some huge data
operation simultaneously!
In Java, what we usually do is spawn a new thread for doing the animation
(or) doing the data operation! This takes care of the scenario.

Now in Flex, We dispatch events, Lets say, OperateDataEvent and
AnimateEvent, both of them have some handlers (ODEHandler, AEHandler
respectively). Now when we do something like this,
dispatchEvent(new OperateDataEvent()) and dispatchEvent(new
AnimateEvent())
How does the control flow??
Does this fully complete the DataOperationEvent first and then return to
animateEvent ! Since its a single thread model, I guess it should be done
so! But then it doesnt sound logical for any matured programming languge to
cripple an application from doing another task and make it wait.

2.
Second thing is, How does the Timer/setInterval actually function in the
Flex architecture, Is it a separate 'thread' ( Oops!this Java hangover is
not gonna leave me ! ) Is it advisable to have big operations inside the
timerHandler which may result in periodic glitches in the application.

3
Can anyone give a good resource of the AVM structure and design and how it
differs from JVM!

Thanks in advance

Cheers,
Ravi Kumar G
PartyGaming Plc.
www.partygaming.com


"What is right is right, even if no one is doing it. What is wrong is
wrong, even if everyone is doing it."

------------------------------
Never miss an email again!
Yahoo! 
Toolbar<http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/>alerts
 you the instant new Mail arrives.Check it out.




--

: : ) Scott

Reply via email to