PhluffyFotos on Windows Azure

In keeping with the Windows Azure Evangelism Team’s mission of providing samples that demonstrate how to use various aspects of the Windows Azure platform, I’d like to introduce you to the PhluffyFotos application. The idea behind PhluffyFotos is to offer an image-sharing application that allows users to upload, tag, and share images on line. The MyPictures application sample introduced you to the idea of storing images in Windows Azure Blob Storage via Web API, but PhluffyFotos takes the idea of an image-sharing application a few steps further architecturally. Take a look at this sample if you want to see how various Windows Azure components – Web Sites, Cloud Services, and Windows Azure Storage – to see how to add background processing to your web application, all hosted in the cloud.

Architecture

The PhluffyFotos application runs as a Windows Azure Web Site used to let visitors upload images. Those images and their metadata are sent over to Windows Azure for processing. The Cloud Service picks up information stored in Windows Azure Storage Queues, and processes that information so it can be stored in Windows Azure Table Storage. The image content itself, like was done in MyPictures, is stored in binary blobs using Windows Azure Blob Storage. The web site allows for multiple user profiles, which are stored in a Windows Azure SQL Database and accessed using the Universal Profile Providers, which are available via NuGet. Everything image-centric is actually stored in Windows Azure Storage, once it has been processed via the Cloud Service.

Links and Video

As with all the other Windows Azure Evangelism Team samples and demonstrations, the source code for PhluffyFotos is stored in its very own GitHub.com repository. If you notice any issues with the code, please feel free to use repository’s Issues feature to let me know what you find. Likewise, if you feel you have a change that’d improve the sample, feel free to make your own fork in which you can change the code, and submit a pull request. The sample is available on the MSDN samples site, too, so you can use that link to submit questions and to download a zip file containing the code for the sample. I’ve also published a Channel9 video that demonstrates how you can get the sample running, step-by-step.

I and the rest of the Windows Azure Evangelism Team hope you enjoy this example of what's possible with Windows Azure! Happy Coding!

7 Comments

  • brady gaster said

    Yes, you can run it locally. Just download it, change the configuration like the video points out, and run the solution and it should work just fine.

  • Julio said

    Hi Brady. This is Julio from Spain. I'm a Computer Science student at Madrid University. I've installed and deployed your nice app in W azure, and everything works fine, album creation, pictures uploading (I can see them by the pictures URL), but when I try to see the album content (the pictures) get an "PROCESSING PICTURE ... Please try again in a few seconds. for every picture uploaded previously.

    Any help? Thanks in advance.

  • admin said

    Julio - have you checked to see if the worker role is running and processing the pictures as they're uploaded?

  • Julio said

    Thanks, Brady.
    Pictures are processed. I can see them thru the url that points to the blob storage in Azure. ( http://jrphluffyalmacen.blob.core.windows.net/julio/IMG_3197.JPG ). All pictures have been created in the blob, but can't see them in the web page. It always appear the "processing picture" message.

    How can I check if the worker role is running when executing in Azure when uploading pictures?

    Should I try and execute the app in local first? I don`t know what to do . This app is my practical exercise for Cloud Computing subject at University and I can't make it work
    Thanks again

  • admin said

    Have you changed the configuration and followed the setup steps to the letter from the sample? If so, feel free to hit me up via email. my email is my first name and first initial of my last name at Microsoft dot com. Shoot me an email if that doesn't get you working. Worst case we could Skype about it and maybe figure out what's wrong.

  • Gustav said

    Hi Brady,
    i've tried the sample code to run locally and getting a
    System.NullReferenceException was unhandled by user code
    for "account"
    at
    PhotoAlbumDataContext(Microsoft.WindowsAzure.CloudStorageAccount account)
    : base(account.TableEndpoint.ToString(), account.Credentials)

    The Video shows only the cofiguration steps for Azure.
    What is to do for local usage with the Azure Emulator?

    Best regards
    Gustav

Add a Comment

Windows Azure Training

Looking for information on Windows Azure? I work with a great team of guys who put together the Windows Azure Training Kit. If you're doing anything with Windows Azure and you have questions, chances are pretty good you'll find what you're after here. 

My SignalR Samples

After having given a few SignalR presentations I decided to start compiling all the code in a centralized repository. Check out my SignalR Samples repository on GitHub.com

Channel 9

One of the coolest parts of my job is being able to host a Channel 9 TV show. Web Camps TV is the show I co-host with Cory Fowler. Check out our episodes on Channel 9, where we talk to Microsoft community members and engineers.