Monday, February 8, 2010

Visual Studio 2010 side-by-side with Visual Studio 2008

Well, BETA2 of Visual Studio 2010 was announced with GO LIVE license, upgrade capability to RTM and side-by-side working with existing VS2008 installations.

Well, maybe if you are using Visual Studio to compile and run your “Hello World” Console or Web Application you will have no issues running side-by-side.

However, if you really want to explore all the new technologies, while still keeping “old” projects running, you simply can’t use both Visual Studios side-by-side. And here is one particular case in which you simply have to choose whether to stay on VS2008 or go for VS2010 and migrate your projects to 2010, because they will not be supported on VS2008. The special case is called:

WCF RIA Services

RIA Services is designed to make our Silverlight life easier, but instead it brings only troubles (when using side-by-side). And why? Because WCF RIA Services works either with VS 2010 and SL4 OR VS2008 SP1 and SL3. There is no side-by-side! If you have existing project(s) on VS 2008 SP1 with WCF RIA Services, you simply can’t go and explore VS2010 SL4 and WCF RIA Services within VS 2010.

Although you might want to say it is limitation for WCF RIA – yes, it is. But I can use both VS2010 and VS2008SP1 for Windows Azure projects. And for me – side-by-side, means “side-by-side” without any “but”.

So for me so far – no side-by-side.

Sunday, February 7, 2010

MySQL hosted on Windows Azure

People are often asking whether MySQL is supported on Windows Azure. The simple answer is YES, you can run a MySQL on Windows Azure! Great!

But is it worth? I would say NO! And here are my thoughts on that.

First, take a sneak peak at the presentation of Mohit Srivastava and Tushar Shanbhag from PDC’09: Developing PHP and MySQL Applications with Windows Azure. Or download the slides and take a quick look of “OK, you can run MySQL on Windows Azure”. After one hour of amazing talk we will be almost convinced that we definitely can run MySQL on Windows Azure.

BUT…

I would question the value of bringing a MySQL to Azure!

What is Windows Azure? Here are just a couple of quotes from Introducing the Windows Azure platform and Introducing Windows Azure white papers:

Windows Azure is designed to support applications that scale out, running multiple copies of the same code across many commodity servers.

The intrinsic support for scale-out applications and scale-out data that Windows Azure provides can handle much larger loads than more conventional Web technologies.

The answer grows out of the primary Windows Azure goal of supporting massively scalable applications. Traditional relational databases can scale up, handling more and more users by running the DBMS on ever-larger machines. But to support truly large numbers of simultaneous users, storage needs to scale out, not up.

In resume – the goal of Windows Azure is to be highly scalable, highly reliable, highly available, elastic, etc. cloud system. And these white papers describe how is that scalability and reliability achieved.

Now, a quick sneak peak over the SLA (Service Level Agreement) that will assure our business for system up-time and availability. What we are most interested of using MySQL on Windows Azure is the Windows Azure Compute SLA. And the abstract of it sais:

For compute, we guarantee that when you deploy two or more role instances in different fault and upgrade domains your Internet facing roles will have external connectivity at least 99.95% of the time.

Additionally, we will monitor all of your individual role instances and guarantee that 99.9% of the time we will detect within two minutes when a role instance’s process is not running and initiate corrective action.

What does that mean to you, when are running MySQL? Rewind back to the Developing PHP and MySQL Applications with Windows Azure. What did they do? They have deployed a single instanced Worker Role that runs MySQL! Now I do have a couple of questions for you, if you are still going to host your MySQL in windows Azure:

  • 1. Will you have SLA for your MySQL deployment (which is the purpose of using Windows Azure)?
    • NO! And no, because your MySQL will be running on a single instanced role. You simply can’t run MySQL on multiple instances! Well you can, but you can’t really work with it.
  • 2. Will your MySQL be easily scalable (which is the purpose of using Windows Azure)?
    • NO! Because scaling out in Windows Azure is achieved by just increasing the number of instances that are running within your role. And if you want to “scale-out” a MySQL in Windows Azure, you will have to deploy entirely new worker role with single instance.

For me, there is just no worth of bothering with running MySQL on Windows Azure. You are going to loose all the strengths of Windows Azure and will utilize it just as virtual server hosting. Just give up on MySQL if you want to go with Windows Azure and refactor your PHP code to use SQL Azure!

And by the way … there will be almost the same issue with running PHP. However, this is easier to handle. Couple of important things you need to know in order to avoid hours of debugging a php code that is not debuggable – use a DataBase to store your sessions! If you want to scale out on Azure, do not ever use default sessions with PHP – move them to database. And let this database be SQL Azure. Well, moving sessions to database is the easier. You could also move the session to Windows Azure Tables.

If you want to write files on a “hard drive” – use Windows Azure Drive or go directly to Windows Azure Blob.