ewertonbermejo / merapi

Automatically exported from code.google.com/p/merapi
0 stars 0 forks source link

Flex Bridge does not handle multiple messages in a single event correctly #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

  Send two messages from Java to Flex one right after the other.

  Eventually you get more than one message showing up in 
  handleReceiveSocketData(event : ProgressEvent).  

  Sometimes it is totalBytes+message+totalBytes+message or sometimes it is 
  totalBytes+message+totalBytes.

  The Bridge and AMF3Reader classes do not handle this correctly.

What is the expected output? What do you see instead?

  I expect to see both messages show up in the registered handlers.

  Instead either the second message is "lost" or it gets off-sync and
  just errors on each socket event and subsequent messages are "lost".

What version of the product are you using? On what operating system?

  0.1.8 beta Windows XP

Please provide any additional information below.

What type of application are you building?

Original issue reported on code.google.com by christin...@bose.com on 24 Aug 2009 at 2:24

GoogleCodeExporter commented 8 years ago
Please let me know when this issue will be fixed ? Any workaround to solve this 
issue ?

Original comment by ajay...@gmail.com on 10 Nov 2009 at 1:27

GoogleCodeExporter commented 8 years ago
This bug is reproducible. For example, make a request from flex to java, java
iterates through an array of string from "a" to "z" and send 26 messages back to
flex. It will fail with "array out of bound" and "end of file" errors. Although 
"end
of file" error doesn't seem to kill process where as "array out of bound" stops 
it
completely.

Adding a slight timing delay helps to resolve most of these issue, e.g.
Thread.sleep(100). This is certainly only good for development environment.

I hope there will be a fix to this issue soon since it is quite serious.

Original comment by kentxu.2...@gmail.com on 18 Nov 2009 at 2:53

GoogleCodeExporter commented 8 years ago
I was unable to sucesfully deliver large amount of messages from Java backEnd 
to Flex
Air frontEnd using downloaded beta version (0.1.8) from google.code.
However when I checked out latest repository version of merapi's code (for 
debugging
purposes) and build Both ends of application against the code, messages started 
to
appear on the FLEX side without any problems (event if being sent from a 
while(true)
loop started in a new Java thread).

Don't now whether development version is very stable (and doesn't produce any
additional bugs), but It's the only version applicable in my case (massive 
backend ->
frontend messages flow). Try it -)

Original comment by strange3...@gmail.com on 17 Feb 2010 at 9:27

GoogleCodeExporter commented 8 years ago
I'm no expert programmer, and just getting to know merapi, but I think that if 
you 
can't send a message before the last was recieved you should try a confirmation 
mechanism.
I'll try to explain the best I can. In Java make a queu handled by a thread, as 
the 
queu as content it tries to send, but it doesn't send the second element until 
flex 
sends a message acknoledging the reception of the message.

I hope I helped!

Original comment by dmoura....@gmail.com on 24 May 2010 at 11:46