AIR

AS3: Creating static XML with ColdFusion and AIR

01/02/2010 in RIA View Comments

stockAIR
To build off of a couple posts earlier, the following is an example of how to access the Yahoo stock information and create a static XML with AIR file that Flash can access. I went this route after seeing the server hit that we took when 3k+ users logged in at the same time and tried to access the stock ticker. The stock ticker was hitting the Yahoo service every few seconds and was significantly slowing things down. What I decided to do was to still use the CF service to access the stocks, but instead hit it with an AIR app that then takes that information and creates a static XML file for the Flash stock ticker to access. This also solved the “after hours” stock information as the Flash file would always be hitting the static XML, which wouldn’t change after 5:00 PM. So, to define the process, Yahoo delivers stock information, the AIR application is triggered by the server via a scheduled task, AIR accesses the ColdFusion file that hits Yahoo for the stock information, then AIR takes that information and creates a static XML file. This basically took the hit to Yahoo to once every 5 minutes by ONE application, rather than once every few seconds by any number of web hits…typically at least 1k…

Read more