RubyAMF Serialized Object Referencing
RubyAMF is alive and kicking…
I got possessed tonight. Freakin Karl from “Charles” (web-debugging utility) gave me his amf3 serialization code. And I was able to figure out the missing link to get object referencing working. I’ve been struggling with this for months. I’ve probably spent 50 hours of my life on this problem. I’ve looked at all the available serializing code (almost all written in JAVA), and I couldn’t figure out how to adapt it to the ultra DRY implementation we had in RubyAMF…until Karl gave me a present. It’s almost like I saw the Matrix. I now understood how ArrayCollection’s are considered externizable and thus behave like objects and arrays. My previous incorrect solutions were very close but without the guidance I got from ‘Karl from “Charles”‘ (gosh I love saying that), this would have just been another flash-in-the-pan night.
Features And Benefits:
- The ability to re-reference arrays, hashes, and dates in the byte stream, saving RubyAMF from having to regenerate those objects and cutting down on the transfer size.
- Transfer size for books on Mixbook have been cut down by about 20%. This is most likely because a lot of styling information is being referenced now…
I think, Dan Shultz, our Lead Flex Developer, will be happy now. He could ask for all the duplicate objects he wants as far as Im concerned. =)


Leave a Reply