The Developer 2/2013

Page 63

that would look cool, and be fun to work with in a demo. Back in the 90’s I always wanted to create a ray-traced animation of one of those pin-board desktop toys, but with the limited processing power of PCs at the time it would have taken several months to render. After a few hours experimenting with the Kinect SDK and Kenect sensor from my X-Box 360 I was able to capture depth data and save it as a series of image files. Reading these images into a C # application and using the pixel data I was able to create a scene file that describes a pin-board with the pin positions set using the depth data. This scene could then be rendered in PolyRay to produce an image. Rending a single frame took about five minutes, so creating an 80 second animation with 2,000 frames would take almost a week if a single instance was used. With 256 instances it would be possible to complete the animation during a onehour conference session. I talked to a few developers on the Azure team about the feasibility of running such a demo live, I remember asking someone “What would happen if I tried to spin up 256 Worker Role instances at once?” the answer was “I don’t know, but it would be really cool to try!”. I have run the demo a number of times at user group events and larger conferences. I typically start by running 4 instances, and then changing the scalability setting to 256 instances about 10 minutes into the session. It typically takes between 15 and 25 minutes for the extra 252 instances to be provisioned and start processing, and the animation rendering has always completed before the end of the session. There have been a couple of times when it has taken longer to scale out but, so far, the demo has never failed. GRID COMPUTING SCENARIOS Although the animation techniques I am using are dated, the use of cloud platforms for grid computing scenarios is an emerging field. Provisioning and maintaining large scale compute resources on-premise is challenging

and expensive and often out of reach of smaller organizations. The ability to create massive compute resources on-demand and only pay for them when you are using them creates a lot of opportunities that were not available a few years ago. Public cloud platforms have the capacity to allow users to provision tens of thousands of server instances that can analyze and process petabytes of data. These environments can be utilized for a few days, or even a few hours, and then de-provisioned when no longer required. The current pricing for public cloud resources brings this compute power within reach of smaller organizations and research teams.

Alan Smith works as a developer, trainer, mentor and evangelist at Active Solution Stockholm where he specializes in Windows Azure development and training. He is one of the lead contributors to the Azure development community. Feel free to contact him with any questions on cloudcasts.net@gmail.com.

63


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.