Search code examples
phpazuref#azure-web-rolesazure-worker-roles

Azure PHP web role, F# worker role: developing on different machines


A friend and I would like to create a website to manipulate Facebook data.

The structure is:

  • a PHP web role (contains the web page, user OAuth login, interacts with queues, and interacts with SQL Azure database)
  • an F# worker role (does statistics and quite heavy data extractions)

The process is (assuming a new user):

  • user arrives on the web page and logs onto Facebook via OAuth, the PHP web role then posts a message in a worktodo queue with the login info and token.

  • F# worker role reads the message off the worktodo queue and starts doing data crunching (using the Facebook API) and stats, then it writes the results to a SQL Azure database. Finally it posts a message to the workdone queue stating it has succeeded in doing the data processing for the user.

  • Finally the PHP web role reads the workdone queue and notices the work is done, and displays the algorithm results.

I have two questions:

  • Is there a big flaw in this design?

  • What is the best way to collaborate: one person will write the PHP and another the F#, is there a way to use development storage from two different machines?

Thanks a lot! (Apologies if some find this stuff too basic, I am very much a beginner in all these matters).


Solution

  • I don't see anything wrong with this plan.

    I don't think there's a way to have two machines pointing at the same development storage, but you can just use cloud storage (even when running locally). I do that all of the time; you will pay for bandwidth and storage transactions, but for most apps in testing, this cost is trivial.