PDA

View Full Version : XMLSocket frequency / talking to java


bitless
06-22-2001, 05:43 PM
simple question, but have not been able to find the answer - what is the frequency of the xml socket in flash 5? is it determined only by the framerate (iow by how often we can trigger an event) or is there some other (fixed/variable?) parameter at work

this ties into my other question about java - since the math engine in java is so much more powerful than that used by the flash player, would it be possible, at least in theory, to offload something like 10000 computations to an applet, and retrieve that information as it is needed

i am trying to develop some cellular automata-like things, but finding that flash gets very very choppy and processor hungry when asked to do any hefty parallel processing...

thanks for any help/pointers/ideas... also, if you're still fresh on those calculus classes, maybe you can lend a hand with my other query:
http://www.actionscripts.org/forums/showthread.php3?threadid=3408
(how to differentiate in actionscript)

thanks!

//

VAYKENT
07-03-2001, 12:18 AM
So.... XML processing in Flash is NOT SYNCRONOUS.... I'm sorry that's bolded, but... uhh... that's all there is to it. You can not control when the process will be done. It will get done when it gets done. Yes Flash is very 'gimpy' when asked to do alot... no I'm not talking about the program.. I'm talking about the motion. To gimp along == limp along. So there ya go...

If you could develop a different app for processing of documents, and then just passing what you need to Flash that might be best.

bitless
07-03-2001, 12:42 AM
yeah, this gimping along problem is what i kept running up against when trying to do mouse-pos-based transforms on 128 objects at once...

this is why i came along to thinking that if it were possible to get either realtime or chunked inter-process communication going between the flash player and another app that was hopefully better at math (a java applet seems like the perfect candidate) it would make it possible to do thousands of transforms per frame in flash and have all the heavy lifting happen in java (which is an incredibly more powerful math processor than the flah player)

now the problems with this are the following, and i'm curious as to whether there is some theoratical or tested way to overcome them:

problem1:
if the math processing is chunked (i.e. java passes flash a volume of data that is to be used for the next 30(example) frames) it is not possible to use this method for interactive events, because there would be too much of a lag between when the data is passed to the applet and when it comes back...

problem2:
if realtime (each frame) processing is attempted, we are back at trying to figure out how fast the xmlsocket is at formating, passing, and retrieving data from an app running on the same machine...

any thoughts?

//

VAYKENT
07-03-2001, 04:39 PM
I'd just try it.... make sure the XML strings you send are as small as possible.... but the same machine communicating with itself can't be too slow... Plus you could compensate within the Flash player. I'm not too thrilled for success - I don't think it'll be worth it.... but I've never heard of anybody trying.

Think of it this way... you're strapping a race car engine onto a go-cart.... not that Flash is a go-cart, but in some things it is slow. :)