hxamqp: AMQP with haxe!

Posted on December 15, 2008. Filed under: Uncategorized | Tags: , , , , , |

It’s been a while since my last post, but the wait has been worthwhile. I’ve been working on converting Ben Hood’s amqp library for as3 with my converter. It’s been an educational experience on a couple of fronts getting more familiar with the issues of conversion from as3 to haxe, AMQP/RabbitMQ, and flash vs neko io issues.

The resulting library, hxampq, is up on github with a couple examples to experiment with.

While working on this I ran into issues with trying to map a flash lib to neko. Flash only has asychronous IO, while Neko is synchronous IO only. In my examples I create a thread to deal with the socket data and pass messages back and with neko’s Thread and Deque API.

In my tests, I ran into a latency issue with RabbitMQ. I was trying to send an empty message from a swf, to rabbit, then read that message from a neko server, send a message back to rabbit on another q, and have the swf read it. The resulting “roundtrip” time was measured over thousands of samples. I was getting terrible times anywhere from 7 to 60ms. I was running the servers on an Ubuntu VM on my local machine. Doing a direct connection from a swf to neko and sending bytes back and forth showed times of 3ms. It turns out that the issue is Linux TCP/IP related. The Nagle algorithm is buffering these tiny packets. The issue could probably be solved by sending a lot more data at once. So after enabling TCP_NODELAY in RabbitMQ (this should be the default now with 1.5.0 and on the repo), I tried sending data from one swf to another swf over RabbitMQ and got 3ms! But sending data to neko is still slow around 30+ms. Looks like I’ll have to tinker with the neko socket code to enable high performance tcp/ip options.

Read Full Post | Make a Comment ( 1 so far )

Back from FlashCamp 2008

Posted on October 13, 2008. Filed under: Uncategorized | Tags: , , , |

We all had a terrific time at FlashCamp and got to see all the new features of Flash 10 and CS4 in action. Not only that, we walked away with trial copies, and we’ll be getting licenses too! The team I was on, “kitchen sink”, even won a prize for our efforts!

It was a crazy weekend from project conception to presentation, and we had a blast the whole time with our crackpot ideas. You can tell by the look on our faces. We used Flash 10’s IK for animation, dynamic sound, pixel bender shaders for tracking a light source, deco tool for snow, and along the way learned a ton and saw some really cool inspiring demos.

Here’s a shout out to team “kitchen sink” MT, Dennis, Pedro, Kenny, and James, and the Adobe guys Kuy, Tony, Richard, Justin, and Dom for being so cool and making the weekend a success!

Read Full Post | Make a Comment ( None so far )

Flashcamp 2008

Posted on October 7, 2008. Filed under: Uncategorized | Tags: , , |

Woo hoo I just got confirmation from Dom Sagolla about flashcamp. This will be my first time going, and I’m psyched! I can’t wait to tap into Flash 10’s new features (vectors, 3D, new text layout engine). The future of Flash and haXe looks bright.

Read Full Post | Make a Comment ( None so far )

Liked it here?
Why not try sites on the blogroll...