Ted Patrick - Demos & MAX @ Adobe Systems


Note: This is the personal blog of Ted Patrick. The opinions and statements voiced here are my own.



JabberD 2.0 Server Error within <flash:stream> Protocol

DIGG IT!     1 Comments Published Thursday, January 08, 2004 at 10:52 AM .

There is an error in the 2.0+ jabberd server release for support for protocol (Flash support). The error will disconnect the flash client unexpectedly during high message loading or low bandwidth conditions. This error may extend to certain other XMLSocket servers also. \0

XMLSocket object within the Flash Player is a light API for accessing a raw socket on the client machine. When you send data to mysocket.send('send this'), the data is pushed into the socket and is delimited with a null byte. During heavy use or low bandwidth conditions, Flash buffers the messages pushed through the socket if the socket is sending a message. Depending on the server-side socket implementation, the server may receive a block of messages or each individual message. Within Jabberd, if the server receives a block of messages under adverse network conditions, the server will fail to parse out the null delimiter thus crashing the XML parser leading to a disconnected Flash client. The problem is made worse in that JabberD log files display a null byte as space character in ASCII so they are very easy to miss.

What you will see happen from the client is that Jabber will pass an invalid XML error message then close the connection by sending a
closing tag. In most cases, I thought I had made a protocol error, but that was not the case as the same XML packets would work sometimes and fail other times. This error is also frequently seen with short messages like <presence/>.

You send this:
mysocket.send('<presense/>')
mysocket.send('<iq/>')

The server sees this:
<presense/>\0<iq/>

\0 if not removed will cause the server to disconnect the Flash client.

Not fun. :(

I have send emails to the JabberD team and the error has been confirmed. When I find out about a patch I will post the info. This is most likely the main reason we have seen so few successful Flash Jabber projects. Hopefully this will change things as JabberD simply rocks as a server!

Cheers,

Ted ;)

1 Responses to “JabberD 2.0 Server Error within <flash:stream> Protocol”

  1. # Blogger Diego

    I have the same problem with the Openfire Server. Do you think that it's a problem with the server?

    Cheers,
    Diego.  

Post a Comment

Where to find me:

Ted on Twitter - @AdobeTed
Ted on Adobe Groups
Ted on LinkedIn
Ted on Facebook
Ted at Adobe


Latest

Lists

Links

Jobs

Flex Jobs
city, state, zip

Archives