Category Archives: microsoft

Microsoft’s Azure outage: a troubling account of what went wrong

Microsoft’s Jason Zander has published an account of what went wrong yesterday, causing failure of many Azure services for a number of hours. The incident is described as running from 0.51 AM to 11.45 AM on November 19th though the actual length of the outage varied; an Azure application which I developed was offline for 3.5 hours.

Customers are not happy. From the comments:

So much for traffic manager for our VM’s running SQL server in a high availability SQL cluster $6k per month if every data center goes down. We were off for 3 hrs during the worst time of day for us; invoicing and loading for 10,000 deliveries. CEO is wanting to pull us out of the cloud.

So what went wrong? It was a bug in an update to the Storage Service, which impacts other services such as VMs and web sites since they have a dependency on the Storage Service. The update was already in production but only for Azure Tables; this seems to have given the team the confidence to deploy the update generally but a bug in the Blob service caused it to loop and stop responding.

Here is the most troubling line in Zander’s report:

Unfortunately the issue was wide spread, since the update was made across most regions in a short period of time due to operational error, instead of following the standard protocol of applying production changes in incremental batches.

In other words, this was not just a programming error, it was an operational error that meant the usual safeguards whereby a service in one datacenter takes over when another fails did not work.

Then there is the issue of communication. This is critical since while customers understand that sometimes things go wrong, they feel happier if they know what is going on. It is partly human nature, and partly a matter of knowing what mitigating action you need to take.

In this case Azure’s Service Health Dashboard failed:

There was an Azure infrastructure issue that impacted our ability to provide timely updates via the Service Health Dashboard. As a mitigation, we leveraged Twitter and other social media forums.

This is an issue I see often; online status dashboards are great for telling you all is well, but when something goes wrong they are the first thing to fall over, or else fail to report the problem. In consequence users all pick up the phone simultaneously and cannot get through. Twitter is no substitute; frankly if my business were paying thousands every month to Microsoft for Azure services I would find it laughable to be referred to Twitter in the event of a major service interruption.

Zander also says that customers were unable to create support cases. Hmm, it does seem to me that Microsoft should isolate its support services from its production services in some way so that both do not fail at once.

Still, of the above it is the operational error that is of most concern.

What are the wider implications? There are two takes on this. One is to say that since Azure is not reliable try another public cloud, probably Amazon Web Services. My sense is that the number and severity of AWS outages has reduced over the years. Inherently though, it is always possible that human error or a hardware failure can have a cascading effect; there is no guarantee that AWS will not have its own equally severe outage in future.

The other take is to give up on the cloud, or at least build in a plan B in the event of failure. Hybrid cloud has its merits in this respect.

My view in general though is that cloud reliability will get better and that its benefits exceed the risk – though when I heard last week, at Amazon Re:Invent, of large companies moving their entire datacenter infrastructure to AWS I did think to myself, “that’s brave”.

Finally, for the most critical services it does make sense to spread them across multiple public clouds (if you cannot fallback to on-premises). It should not be necessary, but it is.

Microsoft promises to fix OneDrive sync in Windows 10, with one engine for Business and Consumer

Microsoft’s Jason Moore has responded to feedback on the change to OneDrive sync in the latest Windows 10 preview. The change removed the “placeholder” feature, where OneDrive files and metadata all show up in Windows Explorer, but do not actually download until requested. It was not a popular move among Windows power users, as reported here.

It turns out there is more going on here than merely tweaking a feature. In his response, Moore states:

We stepped back to take a fresh look at OneDrive in Windows. The changes we made are significant. We didn’t just “turn off” placeholders – we’re making fundamental improvements to how Sync works, focusing on reliability in all scenarios, bringing together OneDrive and OneDrive for Business in one sync engine, and making sure we have a model that can scale to unlimited storage. In Windows 10, that means we’ll use selective sync instead of placeholders. But we’re adding additional capabilities, so the experience you get in Windows 10 build 9879 is just the beginning. For instance, you’ll be able to search all of your files on OneDrive – even those that aren’t sync’ed to your PC – and access those files directly from the search results. And we’ll solve for the scenario of having a large photo collection in the cloud but limited disk space on your PC.

This is good news since it goes to the heart of a more serious issue: the poor implementation of OneDrive sync in Windows, especially in the “Business” edition which has a sync engine based on Office Groove. The consumer OneDrive sync is not perfect either, with a tendency to create duplicate files if you use more than one PC. There is also some kind of bug which means you can edit a file, save it, email it as an attachment, and find that you actually emailed an old version (this has happened to me when submitting articles to editors; no fun).

I have written more on OneDrive issues and confusions here. The poor sync experience with OneDrive for Business is perhaps the weakest point in Office 365 currently; a significant problem.

Now we will get a single sync engine across both versions of OneDrive. If it is also a better sync engine than either of the current ones, Microsoft’s cloud customers will be delighted.

Moore adds: “Longer term, we’ll continue to improve the experience of OneDrive in Windows File Explorer, including bringing back key features of placeholders.”

Questions remain of course. Will Microsoft unify the server technology as well as the sync engines? Will the new sync engine come to Windows 7 and 8 as well as 10? Will the company fix the mobile apps as well? Will OneDrive ever approach the fast, seamless sync achieved by Dropbox?

Watch this space.

Microsoft kills best Windows OneDrive feature in new Windows 10 preview

In Windows 8.1, Microsoft integrated its OneDrive cloud storage with the Windows file system, so you see your OneDrive files in Windows Explorer.

There was a twist though: in Explorer you see all your OneDrive files, but they are not actually downloaded to your PC unless you specifically configure a file or folder for “offline” use, or open a file in which case it downloads on demand.

The strength of this feature is that you have seamless access to what might be multiple Gigabytes of cloud files, without actually trying (and failing) to sync them to your nice, fast, but relatively small SSD, such as on a Surface tablet.

In the latest preview of Windows 10, Microsoft has killed the feature, supposedly on the basis that users did not understand it, says Gabe Aul:

In Windows 8.1, we use placeholders on your PC to represent files you have stored in OneDrive. People had to learn the difference between what files were “available online” (placeholders) versus what was “available offline” and physically on your PC. We heard a lot of feedback around this behavior. For example, people would expect that any files they see in File Explorer would be available offline by default. Then they would hop onto a flight (or go someplace without connectivity) and try to access a file they thought was on their PC and it wasn’t available because it was just a placeholder. It didn’t feel like sync was as reliable as it needed to be. For Windows 10, having OneDrive provide fast and reliable sync of your files is important. Starting with this build, OneDrive will use selective sync. This means you choose what you want synced to your PC and it will be. What you see is really there and you don’t need to worry about downloading it. You can choose to have all of your OneDrive files synced to your PC, or just the ones you select.

Many users did understand the feature though, and for them it is a disaster. No longer can you see all your OneDrive files in Windows Explorer, or search your cloud storage using the tools built into Windows.

This is just a preview though, and Microsoft may restore the feature, or add an advanced option for users who want it, if it gets feedback – as it is already doing?

The questions though: is there really time to revert the change, and is Aul telling the full story about why it was removed?

Microsoft takes its .NET runtime open source and cross-platform, announces new C++ compilers for iOS and Android: unpacking today’s news

Microsoft announced today that the .NET runtime will be open source and cross-platform for Linux and Mac. There are a several announcements and it is potentially confusing, so here is a quick summary.

The .NET runtime, also known as the CLR (Common Language Runtime) is the virtual machine that runs Microsoft’s C#, F# and Visual Basic .NET languages, performing just –in-time compilation to native code and providing interop between the application code and the operating system APIs. It is distinct from the .NET Framework, which is the library of mostly C# code that underlies application platforms like ASP.NET, Windows Presentation Foundation (WPF), Windows Forms, Windows Communication Foundation and more.

There is is already a cross-platform version of .NET, an open source project called Mono founded by Miguel de Icaza in 2001, not long after the first preview release of C# in 2000. Mono runs on Linux, Mac and Windows. In addition, de Icaza is co-founder of Xamarin, which uses Mono together with its own technology to compile C# for iOS, Android and Mac OS X.

Further, some of .NET is already open source. At Microsoft’s Build conference earlier this year, Anders Hejlsberg made the Roslyn project, the compiler for the next generation of the .NET Runtime, open source under the Apache 2.0 license. I spoke to Hejlsberg about the announcement and wrote it up on the Register here. Note the key point:

Since Roslyn is the compiler for the forthcoming C# 6.0, does that mean C# itself is now an open source language? “Yes, absolutely,” says Hejlsberg.

What then is today’s news? Blow by blow, here are what seems to me the main pieces:

  • The CLR itself will be open source. This is the C++ code from which the CLR is compiled.
  • Microsoft will provide a full open source server stack for Mac and Linux including the CLR. This will not include the frameworks for client applications; no Windows Forms or WPF. Rather, it is the “.NET Core Runtime” and “.NET Core Framework”. However Microsoft is working with the Mono team which does support client applications so there could be some interesting permutations (bear in mind that Mono also has its own runtime). However Microsoft is focused on the server stack.
  • Microsoft will release C++ frameworks and compilers for iOS and Android, using the open source Clang (C and C++ compiler front-end) and LVVM (code generation back end), but with Visual Studio as the IDE. If you are targeting iOS you will need a Mac with a build agent, or you can use a cloud build service (see below). The Android compiler is available now in preview, the iOS compiler is coming soon. “You can edit and debug a single set of C++ source code, and build it for iOS, Android and Windows,” says Microsoft’s Soma Somasegar, corporate VP of the developer division.
  • Microsoft has a new Android emulator for Windows based on Hyper-V. This will assist with Android development using Cordova (the HTML and JavaScript approach also used by PhoneGap) as well as the new C++ option.

    image

  • The next Visual Studio will be called Visual Studio 2015 and is now available in preview; download it here.
  • There will be a thing called Connected Services to make it easier to code against Office 365, Salesforce and Azure
  • A new edition of Visual Studio 2013, called the Community Edition, is now available for free, download it here. The big difference between this and the current Express editions is first that the Community Edition supports multiple target types, whereas you needed a different Express edition for Web applications, Windows Store and Phone apps, and Windows desktop apps.  Second, the Community Edition is extensible so that third parties can create plug-ins; today Xamarin was among the first to announce support. There may be some license restrictions; I am clarifying and will update later.
  • New Cloud Deployment Projects for Azure enable the cloud infrastructure associated with a project to be captured as code.
  • Release Management is being added to Visual Studio Online, Microsoft’s cloud-hosted Team Foundation Server.
  • Enhancements to the Visual Studio Online build service will support builds for iOS and OS X
  • Visual Studio 2013 Update 4 is complete. This is not a big update but adds fixes for TFS and Visual C++ as well as some new features in TFS and in GPU performance diagnostics.

The process by which these new .NET projects will interact with the open source community will be handled by the .NET Foundation.

What is Microsoft up to?

Today’s announcements are extensive, but with two overall themes.

The first is about open sourcing .NET,  a process that was already under way, and the second is about cross-platform.

It is the cross-platform announcements that are more notable, though they go hand in hand with the open source process, partly because of Microsoft’s increasingly close relationship with Mono and Xamarin. Note that Microsoft is doing its own C++ compilers for iOS and Android, but leaving the mobile C# and .NET space open for Xamarin.

By adding native code iOS and Android mobile into Visual Studio, Microsoft is signalling real commitment to these platforms. You could interpret this as an admission that Windows Phone and Windows tablets will never reach parity with their rivals, but it is more a consequence of the company’s focus on cloud, and in particular Office 365 and Azure. The company is prioritising the promotion of its cloud services by providing strong tooling for all major client platforms.

The provision of new Microsoft server-side .NET runtimes for Mac and Linux is a surprise to me. The Mac is not much used as a server but very widely used for development. Linux is an increasingly important operating system within the Azure cloud platform.

A side effect of all this is that the .NET Framework may finally fulfil its cross-platform promise, something Microsoft suppressed for years by only supporting it on Windows. That is good news for those who like programming in C#.

The .NET Framework is changing substantially in its next version. This is partly because of the Roslyn compiler, which is itself written in C# and opens up new possibilities for rich refactoring and code transformation; and partly because of .NET Core and major changes in the forthcoming version of ASP.NET.

Is Microsoft concerned that by supporting Linux it might reduce the usage of Windows Server? “In Azure, Windows and Linux are a core part of our platform,” Somesegar told me. “Helping developers by providing a good set of tools and letting them decide what server they run on, we feel is all goodness. If you want a complete open source platform, we have the tools for them.”

How big are these announcements? “I would say huge,”  Somasegar told me, “What is shows is that we are not being constrained by any one platform. We are doing more open source, more cross-platform, delivering Visual Studio free to a broader set of people. It’s all about having a great developer offering irrespective of what platform they are targeting or what kind of app they are building.”

That’s Microsoft’s perspective then. In the end, whether you interpret these moves as a sign of strength or weakness for Microsoft, developers will gain from these enhancements to Visual Studio and the .NET platform.

An Azure Web Site is a VM which supports multiple applications

This will be unnecessary for Azure experts, but I have seen some misunderstanding on this point, hence this post.

A “web site” is a unit of service on the Azure cloud platform which represents a web application hosted on IIS, Microsoft’s web server (but see below). You write a standard ASP.NET application and deploy it. Azure takes care of configuring the host VM, the server operating system, and IIS.

Using a web site is preferable to creating your own VM and installing IIS on it, for several reasons. One is that you do not have to worry about patching and maintaining the operating system. Another is that web sites can be scaled, manually or automatically, with an option for scheduling so that you can scale down the site for periods of low demand.

image

The main reason for using a VM rather than a web site is if the app has dependencies that fall outside what a web site can handle.

Another thing to know about Azure web sites is that they have four “plan modes,” but only two are worth considering for production. The Free and Shared modes host your application on a shared VM, and quotas are applied. If Azure decides your site is out of quota, it will stop responding. Fine for a prototype, but not something you want customers or users to see. This feature is not shown clearly on the table of features but it is in note 2:

Shared Instance: Free and Shared (Preview) tiers include 60 minutes and 240 minutes of CPU capacity per day, respectively. The Shared (Preview) Website rates are applied per website instance.

The Basic tier on the other hand is decent. It is a dedicated VM, and you can scale it (manually) to 3 instances. It costs around 25% less than a Standard tier site.

Why go Standard? You get 50B storage thrown in (a Basic tier site has 10GB), auto-backup, auto-scale up to 10 instances, and a fixed IP address for SSL. If you have to buy a fixed IP address for a single instance Basic tier site, the price goes above a Standard tier site, except for a Large instance.

Currently a Basic tier web site costs from £35.64 to £141.92 per month, and a Standard tier from £47.10 to £189.65, depending on the size of the VM.

It is a significant cost, but what may not be obvious is that you can deploy multiple applications to a single web site, which makes my statement above, “A ‘web site’ is a unit of service on the Azure cloud platform which represents a web application hosted on IIS”, not quite correct.

When you create a new web site, if you have one already, you can choose a “web hosting plan”. Here is an example:

image

In this case, there are two pre-existing web site VMs, one in East Asia and one in Europe. If you choose one of these two, the new web site will be added to that VM. If you choose “Create new web hosting plan”, you will create a new dedicated instance (or free, or Shared). Adding to an existing VM means no extra cost.

If you are a developer, it may well be better to run a single Basic VM for prototyping, and add multiple sites, rather than risking a free or shared instance which might be out of quota when you demonstrate it to your customer.

What is the limit to the number of web sites you can add? There is none, other than the overloading the VM and getting unresponsive applications.

Postscript: the Web Site service is interesting as an example which blurs the boundaries between IaaS (Infrastructure as a service) and PaaS (Platform as a service). It is more PaaS than IaaS, in that you do not have to worry about maintaining the OS, but more IaaS than PaaS, in that you are still having to think about individual VMs. It would be more purist if Microsoft abstracted away the VMs and simply guaranteed a certain level of service, or scaled up automatically and billed for what you use. On the other hand, the Web Site concept puts a lot of control in the hands of the developer/admin and help them to make best use of the resources, while still removing most of the maintenance burden. I think it is a good compromise.

Microsoft Band: do you want to track your health? and with a Microsoft device?

Data on human health has immense value. At an individual level, use of that data has the potential to enhance well-being and productivity, to extend life, and in some cases to avert disaster – such as prompting early investigation into a heart condition. In aggregate, more data on human health enables deeper medical research, especially when combined with other data about lifestyle, profession, location, diet and so on. Medicine is big business, so this is a business opportunity as well as (one hopes) a benefit to humanity.

There is also a dark side to this data. The more data an insurance company has on our health, the more likely they are to exclude the conditions we are most likely to suffer (defeating the purpose of insurance) or to ratchet up premiums for worse risks. Do we trust the industry, whether that is the IT industry or the insurance industry, to safeguard our personal data from being used against us?

The value of this data goes some way to explaining the IT industry’s obsession with fitness gadgets, an obsession that seems to go beyond the demand. I tried a Fitbit for several months, a wristband version. It is a great device, and I found the data interesting, but not enough to motivate me to keep the thing charged up and on my wrist, after the novelty wore off.

The reality is that most of us strike a balance between keeping vaguely fit while not allowing health concerns to dominate our lives. Coffee may be bad for you, but it is also a lovely drink; there is no point in extending life if you cannot also enjoy it.

How much health data, then, is too much?

These questions are likely to come to the fore as increasing numbers of health-monitoring devices come our way, especially multi-purpose devices that do health monitoring as one of several useful functions.

image

Enter Microsoft Band, which the company successfully kept under wraps until a couple of days ago. It’s $199, works with Windows Phone, Android and iOS, and packs in a lot of features, though its 48 hours battery life is too short for my liking (I am hard to please; my plain old watch has a 10-year battery life).

Band hooks into the Microsoft Health platform. There are apps for all three supported phones, and data goes into a cloud service which delivers “intelligent insights” for you. “The more you share with Microsoft Health, the more accurate and helpful your insights will become,” says the blurb. There seems to be a link with Health Vault, a service which provides for sharing of health information with health professionals; of course the company says privacy and security are highly protected.

If I buy one (only available in the US currently) it will be more for its non-health features. Microsoft Band (by linking to your mobile over low-energy Bluetooth) will do calendar alerts, email previews, plain old watch mode (so it is actually a smartwatch), facebook posts, Twitter messages, weather, and (on Windows Phone only), Cortana, Microsoft’s digital assistant.

There is a built-in microphone and you can speak to Cortana on the go. I’ve been trying Cortana since it was was announced at Microsoft’s Build conference earlier this year, and she/it is pretty good. Cortana is not just voice activated search; it is also an example of voice UI, so you can make appointments, take notes, or ask for directions. Its voice recognition and question parsing is impressive, in my experience, though of course not perfect.

As ever I have a developer’s eye on this and I think it is interesting. Voice recognition, touch screen, and semi-permanent link with a smartphone is a powerful combination, if Microsoft opens this up to developers; and I will find it surprising if it does not.

In fact, there are already third-party apps, if you count the Starbucks partnership. You can pair a Starbucks card with Microsoft Band, and pay for coffee with it. The method is rather low-tech: the Band will display a barcode which the Starbucks scanner can read, but still, it beats searching for your card or even pulling out your mobile.

And there is of course the health tracking aspect. There are a ton of sensors here:

  • GPS
  • UV monitor (detect when sunscreen is required)
  • Optical heart rate sensor
  • Gyrometer
  • 3-axis accelerometer
  • “Galvanic skin response”: probably measures electrical conductivity of the skin to assess moisture level
  • Skin temperature
  • Microphone and touch screen

Haptic vibration is used for alerts.

image

Can Microsoft make a success of the Band and steal a march from Apple, whose Watch (which also does fitness tracking) is coming early next year? Apple’s device will be more beautiful, more expensive, and has more functions; but it will not work so well with Android or Windows Phone.

The big downer with Microsoft Band is that it is US only for the moment. Health Vault is already in the UK so we may see a UK release; the possibilities for global rollout are uncertain.

Microsoft financials show robust performance, Office in transition to subscription, both cloud and server growth

Microsoft released its financial results yesterday, for the quarter ending September 30th 2014. It was a good quarter in most respects, though consumer Windows and Windows Phone licensing are weak.

Good news outweighs bad though, particularly the company’s success in transitioning Office customers from perpetual licences to subscription, even in the consumer market. It also seems to be performing some magic in the server segment, growing both cloud and on-premises revenue, a trick CEO Satya Nadella attributes to the “unique hybrid and private cloud capabilities that are built into our Servers”.

Here is the segment breakdown, if you can make sense of Microsoft’s segments:

Quarter ending June 30th 2014 vs quarter ending June 30th 2013, $millions

Segment Revenue Change Gross margin Change
Devices and Consumer Licensing 4093 -391 3818 -102
Computing and Gaming Hardware 2453 +1044 479 +274
Phone Hardware 2609 N/A 478 N/A
Devices and Consumer Other 1809 +255 312 -12
Commercial Licensing 9873 +262 9100 +295
Commercial Other 2407 +805 805 +531

A few notable stats.

Devices and Consumer licensing is weak, in line with the PC market, a decline in Office consumer review (these figures exclude Office 365), and a 46% decline in Windows Phone revenue – the non-Nokia licensees.

Surface Pro 3 is a hit and brought in revenue of $908 million, “twice the [sales] rate of Surface Pro 2”, according to CFO Amy Hood. The gross margin on Surface is “positive this quarter”, said Microsoft, though it is undoubtedly negative over the lifetime of Surface.

2.4 million Xbox consoles were sold (including 360 as well as Xbox One), and overall revenue is up 58%; a decent performance considering that Sony’s PlayStation 4 is generally outselling Xbox One.

Windows Phone: Nadella reported “modest growth driven by sales in Europe, where we gained share with lower priced devices”. 9.3 million Lumias were sold overall. Non-Lumia devices are expected to decline; Microsoft is not interested in this business, though it said sales were “in line with the market for feature phones.” No mention of the mis-conceived Nokia X.

Devices and Consumer Other is where Office 365 consumer revenue lives. There are now over 7 million consumer subscribers and it grew 25% over the previous quarter (most comparisons are year on year). Microsoft’s ability to shift customers to a cloud-based subscription model is key, especially as more of them run Office on an iPad or Android tablet.

Windows Server, System Center and SQL Server grew revenue again; revenue from server products overall is up 13%

Cloud – Office 365, Azure and Dynamics – delivered revenue up by 128%. Nadella added in the webcast that a “major Azure service or feature” is added every three days.

From a financial perspective, Microsoft has an advantage over cloud rivals Amazon and Google, in that its customers are more likely to purchase licenses for products like SQL Server along with the commodity-priced cloud infrastructure.

A key comment from Nadella: “Our premium services on Azure create new monetization opportunities in media, data, machine learning, advanced analytics and enterprise mobility.”

Aside: Microsoft created its online slide deck using a beta PowerPoint add-in called Office Mix, which I had not seen before. It creates a video from a powerpoint deck, with the ability to insert audio, video and interactive content like quizzes, as well as screen capture. Then you can upload it to the cloud. It is mainly aimed at education, but might also be useful for, say, journalists doing product review.

How is Microsoft Azure doing? Some stats from Satya Nadella and Scott Guthrie

Microsoft financials are hard to parse these days, with figures broken down into broad categories that reveal little about what is succeeding and what is not.

image
CEO Satya Nadella speaks in San Francisco

At a cloud platform event yesterday in San Francisco, CEO Satya Nadella and VP of cloud and enterprise Scott Guthrie offered some figures. Here is what I gleaned:

  • Projected revenue of $4.4Bn if current trends continue (“run rate”)
  • Annual investment of $4.5Bn
  • Over 10,000 new customers per week
  • 1,200,000 SQL databases
  • Over 30 trillion storage objects
  • 350 million users in Azure Active Directory
  • 19 Azure datacentre regions, up to 600,000 servers in each region

image

Now, one observation from the above is that Microsoft says it is spending more on Azure than it is earning – not unreasonable at a time of fast growth.

However, I do not know how complete the figures are. Nadella said Office 365 runs on Azure (though this may be only partially true; that certainly used to be the case); but I doubt that all Office 365 revenue is included in the above.

What about SQL Server licensing, for example, does Microsoft count it under SQL Server, or Azure, or both depending which marketing event it is?

If you know the answer to this, I would love to hear.

At the event, Guthrie (I think) made a bold statement. He said that there would only be three vendors in hyper-scale cloud computing, being Microsoft, Amazon and Google.

IBM for one would disagree; but there are huge barriers to entry even for industry giants.

I consider Microsoft’s progress extraordinary. Guthrie said that it was just two years ago that he announced the remaking of Azure – this is when things like Azure stateful VMs and the new portal arrived. Prior to that date, Azure stuttered.

Now, here is journalist and open source advocate Matt Asay:

Microsoft used to be evil. Then it was irrelevant. Now it looks like a winner.

He quotes Bill Bennett

Microsoft has created a cloud computing service that makes creating a server as simple as setting up a Word document

New features are coming apace to Azure, and Guthrie showed this slide of what has been added in the last 12 months:

image

The synergy of Azure with Visual Studio, Windows Server and IIS is such that it is a natural choice for Microsoft-platform developers hosting web applications, and Azure VMs are useful for experimentation.

Does anything spoil this picture? Well, when I sat down to write what I thought would be a simple application, I ran into familiar problems. Half-baked samples, ever changing APIs and libraries, beta code evangelised by Microsoft folk with little indication of what to do if you would rather not use this in production, and so on.

There is also a risk that as Azure services multiply, working out what to use and when becomes harder, and complexity increases.

Azure also largely means Windows – and yes, I heard yesterday that 20% of Azure VMs run Linux – but if you have standardised on Linux servers and use a Mac or Linux for development, Azure looks to me less attractive than AWS which has more synergy with that approach.

Still, it is a bright spot in Microsoft’s product line and right now I expect its growth to continue.

Coding Office for cross platform: Microsoft explains its approach

At last month’s @Scale conference in San Francisco, developers from a number of well-known companies (Google, Facebook, Twitter, Dropbox and others) spoke about the challenge of scaling applications and services to millions or even billions of users.

Among the speakers was Igor Zaika, Distinguished Engineer in the Microsoft Office team, and the video (embedded below) is illuminating not only as an example of how to code across multiple platforms, but also as an insight into where the company is taking Office.

Zaika gives a brief résumé of the history of Office, mentioning how the team has experienced the highs and lows of cross-platform code. Word 6.0 (1993) was great on Windows but a disaster on the Mac. The team built an entire Win32 emulation layer for the Mac, enabling a high level of code reuse, but resulting in a poor user experience and lots of platform-specific bugs and performance issues in the Mac version.

Next came Word 98 for the Mac, which took the opposite approach, forking the code to create an optimized Mac-specific version. It was well received and great for user experience, but “it was only fun for the first couple of years,” says Zaika. As the Windows version evolved, merging code from the main trunk into the Mac version became increasingly difficult.

Today Microsoft is committed not only to Mac and Windows versions of Word, but to all the major platforms, by which Zaika means Apple (including iOS), Android, Windows (desktop and WinRT) and Web. “If we don’t, we are not going to have a sustainable business,” he says.

WinRT is short for the Windows Runtime, also known as Metro, or as the Store App platform. Zaika says that the relationship between WinRT and Win32 (desktop Windows) is similar to that between Apple’s OS X and iOS.

Time for a brief digression of my own: some observers have said that Microsoft should have made a dedicated version of Windows for touch/mobile rather than attempting to do both at once in Windows 8. The truth is that it did, but Microsoft chose to bundle both into one operating system in Windows 8. Windows RT (the ARM version used in Surface RT) is a close parallel to the iPad, since only WinRT apps can be installed. What seems to be happening now is that Windows Phone and Windows RT will be merged, so that the equivalence of WinRT and iOS will be closer and more obvious.

Microsoft’s goal with Office is to achieve high content fidelity and consistency of functionality across all platforms, but to use native UX/UI frameworks so that each version integrates properly with the operating system on which it runs. The company also wants to achieve a faster shipping cycle; the traditional two-year cycle is not fast enough, says Zaika.

What then is Microsoft’s technical strategy for cross-platform Office now? The starting point, Zaika explains, is a shared core of C++ code. Office has always been written in C/C++, and “that has worked out well for us,” he says, since it is the only language that compiles to native code across all the platforms (web is an exception, and one that Zaika did not talk much about, except to note the importance of “shared service code,” cloud-based code that is used for features that do not need to work offline).

In order for the shared non-visual code to work correctly cross-platform, Microsoft has a number of platform abstraction layers (PALs). No #ifdefs (to handle platform differences) are allowed in the shared code itself. However, rather than a monolithic Win32 emulation as used in Word 6.0 for the Mac, Microsoft now has numerous mini-PALs. There is also a willingness to compromise, abandoning shared code if it is necessary for a good platform experience.

image

How do you ensure cross-platform fidelity in places where you cannot share code? The alternative is unit testing, says Zaika, and there is a strong reliance on this in Office development.

There is also an abstraction layer for document rendering. Office requires composition, animation and touch APIs on each platform. Microsoft uses DirectX on Win32, a thin layer over Apple’s CoreAnimation API on Mac and iOS, a thin layer over XAML on WinRT, and a thinnish layer over Java on Android.

The outcome of Microsoft’s architectural work is a high level of code sharing, despite the commitment to native frameworks for UX. Zaika showed a slide revealing code sharing of over 95% for PowerPoint on WinRT and Android.

image

What can Microsoft-watchers infer from this about the future of Office? While there are no revelations here, it does seem that work on Office for WinRT and for Android is well advanced.

Office for WinRT has implications for future Windows tablets. If a version of Office with at least the functionality of Office for iPad runs on WinRT, there is no longer any need to include the Windows desktop on future Windows tablets – by which I mean not laptop replacements like Surface 3.0, but smaller tablets. That will make such devices less perplexing for users than Surface RT, though with equivalent versions of Office on both Android and iOS tablets, the unique advantages of Windows tablets will be harder to identify.

Thanks to WalkingCat on Twitter for alerting me to this video.

Xamarin Evolve: developers enjoy the buzz around cross-platform coding with C#

“It’s like a Microsoft developer event back when they were good,” one exhibitor here at Xamarin Evolve in Atlanta told me, and I do see what he means. There is plenty of buzz, since Xamarin is just three years old as a company and growing fast; there is the sense of an emerging technology, and that developers are actually enjoying their exploration of what they can do on today’s mobile devices.

Microsoft is an engineering-led company and was more so in its early days. The same is true of Xamarin. It also also still small enough that everyone is approachable, including co-founders Miguel de Icaza and Nat Friedman. The session on what’s new in Xamarin.Mac and Xamarin.iOS was presented by de Icaza, and it is obvious that he is still hands-on with the technology and knows it inside out. Developers warm to this because they feel that the company will be responsive to their needs.

image

Approachability is important, because this is a company that is delivering code at breakneck speed and bugs or known issues are not uncommon. A typical conversation with an attendee here goes like this:

“How do you find the tools?” “Oh, we like them, they are working well for us. Well, we did find some bugs, but we talked to Xamarin about them and they were fixed quickly.”

Xamarin’s tools let you write C# code and compile it for iOS, Android and Mac. If you are building for Windows Phone or Windows, you will probably use Microsoft’s tools and share non-visual C# code, though the recently introduced Xamarin Forms, a cross-platform XML language for defining a user interface, builds for Windows Phone as well as iOS and Android.

The relationship with Microsoft runs deep. The main appeal of the tools is to Microsoft platform developers who either want to use their existing C# (or now F#) skills to respond to the inevitable demand for iOS and Android clients, or to port existing C# code, or to make use of existing C# libraries to integrate with Windows applications on the server.

That said, Xamarin is beginning to appeal to developers from outside the Microsoft ecosystem and I was told that there is now demand for Xamarin to run introductory C# classes. Key to its appeal is that you get deep native integration on each platform. The word “native” is abused by cross-platform tool vendors, all of whom claim to have it. In Xamarin’s case what it means is that the user interface is rendered using native controls on each platform. There are also extensive language bindings so that, for example, you can call the iOS API seamlessly from C# code. Of course this code is not cross-platform, so developers need to work out how to structure their solutions to isolate the platform-specific code so that the app builds correctly for each target. The developers of Wordament, a casual game which started out as a Windows Phone app, gave a nice session on this here at Evolve.

Wordament has an interesting history. It started out using Silverlight for Windows Phone and Google App Engine on the server. Following outages with Google App Engine, the server parts were moved to Azure. Then for Windows 8 the team ported the app to HTML and JavaScript. Then they did a port to Objective C for iOS and Java for Android. Then they found that managing all these codebases made it near-impossible to add features. Wordament is a network game where you compete simultaneously with players on all platforms, so all versions need to keep tightly in step. So they ported to Xamarin and now it is C# on all platforms.. 

I digress. The attendees here are mostly from a Microsoft platform background, and they like the fact that Xamarin works with Visual Studio. This also means that there are plenty of Microsoft partner companies here, such as the component vendors DevExpress, Syncfusion, Infragistics and ComponentOne. It is curious: according to one of the component companies I spoke to, Microsoft platform developers get the value of this approach where others do not. They have had only limited success with products for native iOS or Android development, but now that Xamarin Forms has come along, interest is high.

Another Microsoft connection is Charles Petzold – yes, the guy who wrote Programming Windows – who is here presenting on Xamarin Forms and signing preview copies of his book on the subject. Petzold now works for Xamarin; I interviewed him here and hope to post this soon. Microsoft itself is here as well; it is the biggest sponsor and promoting Microsoft Azure along with Visual Studio.

Xamarin is not Microsoft though, and that is also important. IBM is also a big sponsor, and announced a partnership with Xamarin, offering libraries and IDE add-ins to integrate with its Worklight mobile-oriented middleware. Amazon is here, promoting both its app platform and its cloud services. Google is a sponsor though not all that visible here; Peter Friese from the company gave a session on using Google Play Services, and Jon Skeet also from Google presented a session, but it was pure C# and not Google-specific. Salesforce is a sponsor because it wants developers to hook into its cloud services no matter what tool they use; so too is Dropbox.

  image

Most of the Xamarin folk use Macs, and either use Xamarin Studio (a customised version of the open source MonoDevelop IDE), or Visual Studio running in a virtual machine (given that the team mostly use Macs, this seems to me the preferred platform for Xamarin development, though Visual Studio is a more advanced IDE so you will probably end up dipping in and out of Windows/Mac however you approach it).

Xamarin announced several new products here at Evolve; I gave a quick summary in a Register post. To be specific:

  • A new fast Android emulator based on Virtual Box
  • Xamarin Sketches for trying out code with immediate analysis and execution
  • Xamarin Profiler
  • Xamarin Insights: analytics and troubleshooting for deployed apps

Of these, Sketches is the most interesting. You write snippets of code and the tool not only executes it but does magic like generating a graph from sequences of data. You can use it for UI code too, trying out different fonts, colours and shapes until you get something you like. It is great fun and would be good for teaching as well; maybe Xamarin could do a version for education at a modest price (or free)?

image

I am looking forward to trying out Sketches though I have heard grumbles about the preview being hard to get working so it may have to wait until next week.

image