Question

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).

Was it helpful?

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.

OTHER TIPS

If you wanted to follow a bit more experimental path, you could also try looking at Phalanger. This is a project that compiles PHP code to .NET, so it may be possible to run it directly on Azure and nicely collaborate with F# (Phalanger has a few language extensions that allow you to call any .NET objects and some API for calling Phalanger objects from C#).

I was involved in the project some time ago, but it is now beign developed by other people (and as you can see from the check-ins, it is quite active again and they would surely be interested in collaborating to resolve possible Azure issues). If you were interested, let me know - I can give you some contacts, so that you can discuss the Phalanger status on Azure with them.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top