Category Archives: cloud computing

Hands on debugging an Azure application – what to do when it works locally but not in the cloud

I have been writing a Facebook application hosted on Microsoft Azure. I hit a problem where my application worked fine on the local development fabric, but failed when deployed to Azure. The application was not actually crashing; it just did not work as expected. Specifically, either the Facebook authentication or the ASP.NET Forms Authentication was failing; when I tried to log on, the log on failed.

This scenario, where the app works locally but not on Azure, is potentially a bad one because you do not have the luxury of breakpoints and variable inspection. There are several approaches. You can have the application write a log, which you could download or view by using Remote Desktop to the Azure instance. You can have the application output debug messages to HTML. Or you can use IntelliTrace.

I tried IntelliTrace. It is easy to set up, just check the box when deploying.

image

Once deployed, I tried the application. Clicked the Log On button, after which the screen flashed but still asked me to Log On. The log on had failed.

image

I closed the app, opened Server Explorer in Visual Studio, drilled down into the Windows Azure Compute node and selected View IntelliTrace Logs.

image

The logs took a few minutes to download. Then you can view is the IntelliTrace log summary, which includes a list of exceptions. You can double-click an exception to start an IntelliTrace debug session.

image

Useful, but I still could not figure out what was wrong. I also found that IntelliTrace did not show the values for local variables in its debug sessions, though it does show exceptions in detail.

Now, if you really want to debug and trace an Azure application you had better read this MSDN article which explains how to create custom debugging and trace agents and write logs to Azure storage. That seems like a lot of work, so I resorted to the old technique of writing messages to HTML.

At this point I should mention something you must do in order to debug on Azure and remain sane.  This is to enable WebDeploy:

image

It is not that hard to set up, though you do need to enable Remote Desktop which means a trip to the Azure management portal. In my case I am behind a firewall so I needed to configure Web Deploy to use the standard SSL port. All is explained here.

Why use Web Deploy? Well, normally when you deploy to Azure the service actually builds, copies and spins up a new virtual machine image for your app. That process is fundamental to Azure’s design and means there are always at least two copies of the VM in existence. It is also slow, so if you are making changes to an app, deploying, and then testing, you will spend most of your time waiting for Azure.

Web Deploy, by contrast, writes to your existing instance, so it is many times quicker. Note that once you have your app working, it is essential to deploy it properly, since Azure might revert your app to the last VM you created.

With Web Deploy enabled I got back to work. I discovered that FormsAuthentication.SetAuthCookie was not working. The odd thing being, it worked locally, and it had worked in a previous version deployed to Azure.

Then I began to figure it out. My app runs in a Facebook canvas. Since the app is served from a different site than Facebook, cookies may be rejected. When I ran the app locally, the app was in a different IE security zone, so different rules applied.

But why had it worked before? I realised that when it worked before I had used Google Chrome. That was it. IE worked locally; but only Chrome worked when deployed.

I have given up trying to fix the specific problem for the moment. I have dug into it a little, and discovered that cookie handling in a Facebook canvas with IE is a long-standing problem, and that the Facebook C# SDK may have bugs in this area. It is not essential for my sample; I have found I can get by with the Facebook session. To get the user ID, for example:

FacebookWebContext.Current.Session.UserId

The time has not been wasted though as I have learned a bit about Azure debugging. I was also amused to discover that my Azure VM has activation problems:

image

The frustration of developing for Facebook with C#

I am researching a piece on developing for Facebook with Microsoft Azure, and of course the first thing I did was to try it out.

It is not easy. The first problem is that Facebook does not care about C#. There are four SDKs on offer: JavaScript, Apple iOS, Google Android, and PHP. This has led to a proliferation of experimental and third-party SDKs which are mostly not very good.

The next problem is that the Facebook API is constantly changing. If you try to wrap it neatly in an SDK, it is likely that some things will break when the next big change comes along.

This leads to the third problem, which is that Google may not be your friend. That helpful article or discussion on developing for Facebook might be out of date now.

Now, there are a couple of reasons why it should be getting better. Jim Zimmerman and Nathan Totten at Thuzi (Totten is now a technical evangelist at Microsoft) created a new C# Facebook SDK, needing it for their own apps and frustrated with what was on offer elsewhere. The Facebook C# SDK looks like it has some momentum.

C# 4.0 actually works well with Facebook, thanks to the dynamic keyword, which makes it easier to cope with Facebook’s changes and also lets it map closely to the official PHP SDK, as Totten explains.

Nevertheless, there are still a few problems. One is that documentation for the SDK is sketchy to say the least. There is currently no reference for it on the Codeplex site, and most of the comments are the kind that produces impressive-looking automatic documentation but actually tells you nothing of substance. Plucking one at random:

FacebookClient.GetAsync(System.Collections.Generic.IDictionary<string,object>)

Summary:
Makes an asynchronous GET request to the Facebook server.

Parameters:
parameters: The parameters.

Another problem, inherent to dynamic typing, is that IntelliSense (auto-completion in Visual Studio) has limited value. You constantly need to reference the Facebook documentation.

Finally, the SDK has changed quite a bit in different versions and some of the samples reference old versions.

In particular, I found it a struggle getting OAuth authentication and access token retrieval working and ended up borrowing Totten’s sample code here which mostly works – though note that the code in the sample does not cope with the same users logging out and logging in again; I fixed this by changing his InMemoryUserStore to use a ConcurrentDictionary instead of a ConcurrentBag, though there are plenty of other ways you can store users.

I’m puzzled why Microsoft does not invest more in making this easier. Microsoft invested in Facebook and it is easy to get the impression that Microsoft and Facebook are in some sort of informal alliance versus Google. Windows Phone 7, for example, ties in closely with Facebook and is probably the best Facebook phone out there.

As it is, although I prefer coding in C# to PHP, I would say that choosing PHP as the platform for your Facebook app will present less friction.

Microsoft Office 365: the detail and the developer story

I attended the UK launch of Office 365 yesterday and found it a puzzling affair. The company chose to focus on small businesses, and what we got was several examples of customers who had discovered the advantages of storing documents online. We were even shown a live video conference with a jerky, embarrassing webcam stream adding zero business value and reminding me of NetMeeting back in 1995 – which by the way was a rather cool product. Most of what we saw could have been done equally well in Google Apps, except for a demo of the vile SharePoint Workspace for offline editing of a shared document, though if you were paying attention you could see that the presenter was not really offline at all.

There seems to be a large amount of point-missing going on.

There is also a common misconception that Office 365 is “Office in the cloud”, based on Office Web Apps. Although Office Web Apps is an interesting and occasionally useful feature, it is well down the list of what matters in Office 365. It is more accurate to say that Office 365 is for those who do not want to edit documents in the browser.

I am guessing that Microsoft’s focus on small businesses is partly a political matter. Microsoft has to offer an enterprise story and it does, with four enterprise plans, but it is a sensitive matter considering Microsoft’s relationship with partners, who get to sell less hardware and will make less money installing and maintaining complex server applications like Exchange and SharePoint. The, umm, messaging at the Worldwide Partner Conference next month is something I will be watching with interest.

The main point of Office 365 is a simple one: that instead of running Exchange and SharePoint yourself, or with a partner, you use these products on a multi-tenant basis in Microsoft’s cloud. This has been possible for some time with BPOS (Business Productivity Online Suite), but with Office 365 the products are updated to the latest 2010 versions and the marketing has stepped up a gear.

I was glad to attend yesterday’s event though, because I got to talk with Microsoft’s Simon May and Jo Carpenter after the briefing, and they answered some of my questions.

The first was: what is really in Office 365, in terms of detailed features? You can get this information here, in the Service Description documents for the various components. If you are wondering what features of on-premise SharePoint are not available in the Office 365 version, for example, this is where you can find out. There is also a Support Service Description that sets out exactly what support is available, including response time objectives. Reading these documents is also a reminder of how deep these products are, especially SharePoint which is a programmable platform with a wide range of services.

That leads on to my second question: what is the developer story in Office 365? SharePoint is build on ASP.NET, and you can code SharePoint applications in Visual Studio and deploy them to Office 365. Not all the services available in on-premise SharePoint are in the online version, but there is a decent subset. Microsoft has a Sharepoint Online for Office 365 Developer Guide with more details.

Now start joining the dots with technologies like Active Directory Federation Services – single sign-on to Office 365 using on-premise Active Directory – and Windows Azure which offers hosted SQL Server and App Fabric middleware. What about using Office 365 not only for documents and email, but also as a portal for cloud-hosted enterprise applications?

That makes sense to me, though there are still limitations. Here is a thread where someone asks:

Does some know if it is possible to make a database connection with Office365, SharePoint (Designer) and SQL Azure database ?

and the answer from Microsoft’s Mark Kashman on the SharePoint team:

You cannot do this via SharePoint Designer today. What you can do is to create a Silverlight or javaScript client application that calls out to SQL Azure.

In the near future, we are designing a way to make these connections using the base SharePoint technology called BCS (Business Connectivity Services) where then you could develop a service to service to SQL Azure.

If you cannot wait, check out the Cloud Connector for SharePoint 2010 from Layer 2 GmbH.

It seems obvious that Office 365 and Azure together have potential as a developer platform.

What about third-party applications and extensions for Office 365? This is another thing that Microsoft did not talk about yesterday; but it seems to me that there is potential here as well. It is not well integrated, but you can search Microsoft Pinpoint for Office 365 applications and get some results. If Office 365 succeeds, and I think it will, there is an opportunity for developers here.

Office 365 and why it will succeed

Today is launch day for Microsoft’s Office 365, which offers use of Exchange, SharePoint and Lync hosted by Microsoft at commodity prices – not quite as low as $50 per user per year for Google Apps, but low enough that it is likely to be a substantial saving for most customers, versus the cost of installing, maintaining and backing up on-premise versions of the same software.

The debate about the merits of Office 365 versus Google Apps is a fascinating one, but the reality is that many organisations are not ready to give up Word and Excel, Outlook and Active Directory. Why?

  • They are too deeply invested in Microsoft’s platform, and depend on home-grown and/or third-party applications that run on it.
  • Office and Exchange is a business standard.
  • Desktop applications still have advantages for things like word processing or manipulating large spreadsheets.
  • Offline is important, and Microsoft is better at this than Google.
  • Microsoft ticks boxes in areas like compliance and archiving

The beauty of Office 365 is that migration from on-premise servers can be almost invisible to users. It is also an easy and effective solution for new businesses. Every mobile device seems to support Exchange, and one thing it has always done well is to synchronise nicely with multiple clients.

The other side of the coin is that Google Apps is by far the better option if you want to live in the cloud. Outlook Web App is not bad, but creating and editing documents entirely with Office Web Apps would not be fun at all. Office 365 will also be a struggle if you are inclined to ditch Windows. Email will be OK, and I guess Mac users have Office 2011, though in my experience that is inferior to almost any version of Office on Windows.

What about the really interesting questions? Is data more secure with Google, or with Microsoft? Is either platform resilient enough to manage without backups? What is the risk of extended downtime that could have a drastic impact on productivity?

Unfortunately it is not possible to offer precise answers to these questions, which I guess is why on-premise retains its appeal.

RESTful and modernised: making sense of Adobe’s new Enterprise platform

Adobe has announced its Digital Enterprise Platform for Customer Experience Management. My tip to Adobe: that is too many words with too many syllables for busy IT people who are trying to get their work done. What on earth is it? The same old stuff repackaged, or something genuinely new?

The answer is a bit of each. Adobe has made several big acquisitions over the last few years, starting with the Macromedia merger in 2005 that really formed a new Adobe, bringing together digital publishing and the Flash platform. In September 2009 Adobe acquires Omniture for web analytics, and in October 2010 Day Software. This last one seems to be having a huge impact. Day’s product is called CQ5 Web Content Management and is built on CRX, a content repository which conforms to JCR 2.0 (Java Technology API 2.0), a Java API. Here’s Roy Fielding, formerly at Day and now Principal Scientist at Adobe, from this white paper [pdf]:

The Content Repository API for Java Technology (JCR) is poised to revolutionize the development of J2SE/J2EETM applications in the same way that the Web has revolutionized the development of network-based applications. JCR’s interface designers have followed the guiding principles of the Web to simplify the interactions between an application and its content repository, thus replacing many application-specific or storage-specific interfaces with a single, generic API for content repository manipulation.

JCR is a boon for application developers. Its multipurpose nature and agnostic content model encourages reuse of the same code for many different applications, reducing both the effort spent on development per application and the number of interfaces that must be learned along the way. Its clean separation between content manipulation and storage management allows the repository implementation to be chosen based on the actual performance characteristics of the application rather than some potential characteristics that were imagined early in the application design. JCR enables developers to build full-featured applications based on open source implementations of a repository while maintaining compatibility with the proprietary repositories that are the mainstay of large data centers.

Adobe already has an application platform based on LiveCycle Enterprise Suite, which you will notice now redirects to the Digital Enterprise Platform. Ben Watson, Adobe’s Principal Customer Experience Strategist, explained it to me like this:

The core of the platform now becomes the repository that we got from the Day acquisition. We are also following their leadership around the use of RESTful technology, so changing how we do our web services implementation, how we do our real time data integration into Flash using data services. There’s really four technologies at play here. There’s CQ5, Adobe LiveCycle which is all the business process management on the back end, the online marketing suite with Omniture, and Creative tools which allow to both design and develop all of this content and assets … We had two Java platforms and we brought them into one.

adobe-slide

You can read up on the Digital Enterprise Platform here or see a chart of capabilities here. Much of it does look like rebranding of existing LiveCycle modules; but as a statement of direction it is an interesting one.

Is this for on-premise deployment, or cloud hosted? Adobe has a tie-up with Amazon for hosted deployment, though there is no no multi-tenant hosting from Adobe yet; I got the impression from Watson that it is being worked on.

Adobe is aware that it does not stand alone, and there are several connectors and integration points for third-party applications, such as a SAP data services connector.

Adobe also has a series of “solutions”, which are permutations of web content management, analytics, document processing, social media and so on.  There is also a Unified Workspace, currently in beta, which is a dashboard application.

The company’s line is that it is well placed to address the challenge of the mobile revolution, and to bring greater usability and social interaction to business applications, the consumerization of IT.

Although that sounds a strong pitch, melding all this together into something new while keeping hold of existing developers and designers is a challenge. Another issue for Adobe is that the company’s strong presence in design, multimedia and marketing makes it hard to appeal to more general enterprise developers. Nevertheless, the combination of Fielding’s influence and Adobe’s strength in design, documents and cross-platform clients makes this a platform worth watching.

Notes from the field: migrating a small business to Microsoft BPOS

Today I assisted a (very) small company migrate from Small Business Server 2003 to BPOS (Business Productivity Online Suite), Microsoft’s hosted Exchange and SharePoint.

Why BPOS, when Office 365 launches later this month? Well, BPOS has all the features they need, and when given the choice between a beta-soon-to-be-just-launched online platform, and one that has been around for a few years, they chose the latter, which is reasonable. Long term it will make no difference, because BPOS users will be migrated to Office 365. It was interesting to me, since I am reviewing Office 365 and this migration gave me good insight into the differences.

Aside: the fact that this is a choice says something about Microsoft. One of the advantages of cloud computing is that improvements can be continuous and incremental, since the software is paid for by subscription rather than through a version upgrade cycle. There is only one Salesforce.com platform; there is only one Google Apps platform. Will there be an Office 720 in two to three years time, or will Microsoft have worked this out by then? It will be hard, because no doubt there are teams working on Exchange 2013 and SharePoint 2013 and these will be delivered as on-premise product upgrades. This also implies that the new features in these products will not be considered ready until the on-premise products go gold; which means that cloud customers have to wait a long time for major enhancements. Changing this cycle will require a profound shift in the way the company functions.

Now a few comments about the process. Overall it was pretty good, and took less time than it normally takes to migrate from one version of Small Business Server to the next. There are  annoyances though, beginning with the migration tools. The challenge is that you want to move mailboxes from SBS Exchange to online Exchange without losing any email.

Email coexistence

The basic approach is this:

1. A directory synchronisation tool copies user accounts to BPOS and keeps them in synch with on-premise Active Directory.

2. A mailbox migration tool copies mailboxes to BPOS and sets up forwarding, so email arriving into on-premise Exchange is forwarded to BPOS.

This is known as email co-existence, because users can log on to either on-premise Exchange or BPOS, and still be able to send and receive mail. Clever stuff, and it does make migration nice and smooth.

The first annoyance: the directory synchronization tool must be installed on a 32-bit Windows Server that is joined to the domain but not a domain controller. Many SBS setups do not have such a thing. In this case, I ran up Virtual PC on Windows 7 64-bit, installed 32-bit Server 2003, joined it to the domain (actually over a VPN), and ran the tool from there.

Actual mailbox migration uses a separate tool which fortunately does run on the SBS server itself. One the users are in place and enabled on BPOS, you run this tool to upload the mailboxes. This takes a while, since you are uploading what is probably several Gb of data. I left this running overnight, but it was only partially successful. Two mailboxes did not upload properly and had to be redone, which was a bit untidy because in one case some folders were duplicated. Fortunately it was not hard to clean up.

Once the mailboxes are migrated, you simply install and run Microsoft’s sign-in utility on each client PC. This automatically configures Outlook with a new BPOS profile, leaving the old profile in place in case of mishaps.

The last step is to change the DNS records so that mail is actually delivered to BPOS rather than to on-premise Exchange.

SharePoint migration

This particular company is reliant on SharePoint for document sharing. Although it is SBS 2003, they have SharePoint Services 3.0 installed; it can be done if you are careful.

Major annoyance: the BPOS documentation is silent on the subject of migrating content. There is a heading in the Migration Help for SharePoint Online; but it does not cover migration from on-premise to BPOS SharePoint at all. There are third-party tools that do this though, and some help from the community.

Of course there are multiple ways to move SharePoint content, though in some cases you will lose version information. I found this article helpful. I was able to start from Step 5, since it was already a SharePoint 3.0 site. Look how clear and concise the steps are; a refreshing contrast to Microsoft’s verbose efforts with seemingly endless sections for overviews, planning and deployment, that take ages to get to the point and still manage to omit key information.

I read the post and the comments, then created a blank site in BPOS. I backed up and then exported the existing site to CMP files, and kept it locked so that no new content would be added. Then I installed SharePoint Designer 2007, which is free, logged into the BPOS site and restored the site.

All the important things restored correctly. Unfortunately the permissions do not migrate, because the BPOS domain is different from the SBS domain; the active directory is only synchronized. I had to fix this up by deleting dud users and groups from the new site and adding groups and users for BPOS. I also added a few web parts to the otherwise blank home page. Nevertheless, considering how painful SharePoint migrations can be this one was pretty good.

I understand though that this simple approach does not always work. I would guess that the more SharePoint is customised, the more likely you are to have problems, which is probably why there is no official tool.

Exchange issues

There were a couple of issues with Exchange. The first was public folders, which are not supported in BPOS. The solution is to use SharePoint lists. Here is how it goes:

  1. Open an on-premise Outlook profile with full access to the public folders. Export each public folder to an Outlook .pst file – the best format for preserving all the data.
  2. Go to SharePoint online and create a new list of the appropriate type. For example, for tasks you need a task list, for contacts a contact list.
  3. Open Outlook with a BPOS profile. In SharePoint online, go to the target list and choose Connect to Outlook from the Actions menu.
  4. The SharePoint list now exists in Outlook. Open the .pst and copy the items exported from the public folder to the new list.
  5. Other users need only connect to the SharePoint list. The magic of synchronization copies the content.

Another issue is mailbox permissions. If you have users who want access to another user’s mailbox, you have to set permissions on the target mailbox to allow this. These permissions do not get migrated automatically. To do this, you have to use PowerShell. This article explains. The easiest route to a correctly configured PowerShell is to use the shortcut to the Migration Command Shell which is installed with the Microsoft Online migration tools.

A note on cost

BPOS costs $10 per user per month, with a minimum of 5 users. In the UK this is £6.72, so from £33.60 per month. Along with Exchange and SharePoint, you get Office Live Meeting (Web Conferencing) and Office Communications Online (Enterprise Live Messenger).

A typical SBS server lasts 3 to 5 years before it has to be replaced. Taking the shorter time for example, BPOS will cost £1209.60 in subscription costs over the lifetime of a physical server.

It seems obvious that if Exchange and SharePoint is all you need, and if you are happy with the implications of the cloud approach, BPOS works out cheaper. Of course the pricing will change, but Office 365 is actually coming out at a similar price for the equivalent features. Yes, you could buy a basic server with SBS for £1209, but that is just the start: installation, firewall, backup and maintenance all add to the cost.

That said, most businesses will still need some kind of on-premise server, even if it is no more than a simple NAS (Network Attached Storage) box. Another real-world problem is that there may be server-based applications which cannot easily be abandoned. If you find you have to run an on-premise server anyway, adding BPOS on top looks less attractive.

There is much more to say about cloud vs on-premise, but it is worth noting that it can be cost-effective.

Common sense on Windows 8, Silverlight and .NET

I am wary about writing another post on this subject in the absence of any further news, but since there is a lot of speculation out there I thought it would be worth making a few further observations.

Will Windows 8 support Silverlight and/or some other variety of .NET in its new touch-centric mode? I will be astonished if it does not. Aside from other considerations, this is an essential unifying piece between the Windows Phone 7 developer platform and the Windows 8 developer platform, which from what we have seen have a similar user interface. For further evidence, try an internet search for “Jupiter” and “appx”.

Why isn’t Microsoft already shouting about this? A good question. Part of the answer is that Microsoft wants to get developers enthused about the forthcoming build conference in September, and is holding back information.

Another part of the answer is that Windows historically has kept .NET as a layer above the operating system, rather than as part of it. We saw this in Windows 7, where to take advantage of new features like jump lists or thumbnail toolbars, .NET developers had to use a supplementary Windows API Code Pack. The Windows team delivered only native code or COM APIs.

Admittedly, there are differences this time around. The Windows team is not just delivering native code APIs, but also an HTML and JavaScript API. This is a break with the past, hence the talk of a new platform.

When it comes to desktop applications, would not Silverlight or something .NET based be a better choice than HTML5? I can see both sides of this. On one side is all the effort Microsoft has invested in .NET and Silverlight over the past decade. As I’ve noted before, I see Silverlight as what client-side .NET should have been from the beginning, lightweight, secure, simple installation, but with support for C# and much of the .NET Framework which developers know so well.

On the other hand, I can see Microsoft wanting to tap into the wave of HTML5 development and to make it easy for web developers to build apps for Windows 8.

In the end, developers will most likely have the choice. That puts pressure on Microsoft’s developer division to provide strong tools for two different development models; but I think that is what we will get.

Is .NET itself under threat? As far as I am aware, Microsoft has no plan “B” in terms of web and application server technology, and its Azure cloud is largely a .NET platform though there are are efforts to support other things like PHP and Java. Further, this aspect of the Microsoft Platform is under Server and Tools which is 100% behind .NET as far as I can tell. We have also seen Silverlight crop up in the user interfaces for new server products like InTune and System Center. On the server then, there is no evidence for .NET doubts at Microsoft; and considering the trend towards cloud+device computing the server is now at the heart of most business application development.

That said, Microsoft has challenges in sustaining .NET momentum. It cannot afford to fail with Azure, yet other platforms such as Amazon EC2 have greater developer mindshare as cloud computing platforms. VMWare with its Java-based Spring framework is another key competitor. Microsoft was late to the server virtualisation party with Hyper-V. I also see declining market share for IIS versus Apache in Netcraft’s statistics, although these figures are distorted by millions of little-used domains that get shunted from one platform to another by major hosting providers.

Further, it seems to me that the fortunes of .NET on the server cannot be completely separated from what happens on the client. One of the attractions of .NET is the integration between client and server, with Visual Studio as the tool for both. Windows has lost momentum to Apple in mobile, in tablets, and in high-end laptops, making Windows-only clients less attractive. In that context, the decision of the Windows team to favour HTML5 over .NET is a blow, in that it seems to concede that the future client is cross-platform, though I expect there will be some sort of outcry when we see all the proprietary hooks Microsoft has implemented to get HTML5 apps integrated into Windows 8.

Therefore these really are difficult times for .NET. I do not count Microsoft out though; it still dominates business computing, and amongst consumers the Xbox may prove an important new platform as Tom Warren notes.

While I have reservations about Windows 8, it does demo nicely as a new touch-centric operating system and Microsoft surely has chances in the corporate world with new-style tablets that integrate with its system management tools and which run Microsoft Office.

Finally, the angst over the role of .NET in Windows 8 shows that many developers actually like the platform, including Visual Studio, the C# language, the .NET Framework, and XAML for building a rich user interface.

Apple iCloud: i is for integrated

Apple has announced iCloud, smart cloud storage for Apple devices.

The iCloud will store documents, email, contacts and appointments, and synch the data to multiple devices including iPad, iPhone, iPod touch, Mac or PC. You get 5GB free with more available to purchase. Books are synched so that your place is saved from one device to the next, a feature borrowed from Amazon Kindle.

Apple has also exposed an API for developers:

Apple apps are seamlessly integrated with iCloud, and we’ve given developers the tools to make their apps work with iCloud, too. So you’ll be able to paint a masterpiece, play a game, create reminders, edit stock lists, and more — and have it all stay with you on all your devices.

This API allows for key-value pairs to be stored as well as documents.

The iCloud also backs up settings, including device settings and app data. If your iOS device is stolen, restoring it should be just a matter of reconnecting:

When you set up a new iOS device or need to restore the information on one you already have, iCloud Backup does the heavy lifting. Just connect your device to Wi-Fi and enter your Apple ID and password. Your personal data — along with your purchased music, apps, and books from iTunes — will appear on your device.

This is similar to what Google is promising for the Chromebook; in fact, there are quite a few parallels there.

Email is also synchronised, provided you use Apple’s me.com email account. Users of Microsoft Exchange or similar server-based systems already have the experience of email, appointments and contacts synched across all devices; now iCloud brings this to all Apple users.

There is also special provision for music. In this case you do not actually have to upload the tracks in most cases, since Apple will “scan and match” your collection. This applies to CDs you have ripped as well as iTunes purchases, which strikes me as a big concession from the music industry, since there is actually no way to tell if you ripped your own CD or copied it from a friend. You do have to pay $24.99 annually for this though, so it is a kind of music subscription. However it falls short of Spotify’s play-anything offer, since you have to acquire each track by some separate means first.

Taking each feature individually, there is little new here other than Apple’s deal with the music companies. Taken together though, this is a big deal. Apple iOS devices are no longer tied to an iTunes installation on Mac or PC; they are now cloud devices. If you think as I do that cloud+device is the direction of computing today, this is a key move.

One weak point is collaboration. The iCloud seems to be a private store, whereas with technology like Microsoft SharePoint or Google Apps you can publish documents to selected individuals or to the world.

I expect it is just a matter of time before Apple adds document sharing based on Apple IDs or me.com email identities. Another obvious move would be some sort of web site integration so you can publish certain kinds of data.

Another weak point is system requirements. Some features will require iOS 5 or OS X Lion. However, in the past iOS upgrades have been free so that is unlikely to be a problem; and even an upgrade to Lion will only be $29.00, provided your Mac is compatible – it needs Intel Core 2 Duo or better.

There is also the question of whether you want to store all your critical data on Apple’s servers. In my own encounters with Apple’s online security I have not been impressed. Someone managed to sign up for iTunes using my email address once; I could have had full access to his account and stored credit card details. Apple also uses the notorious “security questions” technique for resetting passwords. It is also not clear whether data in iCloud is encrypted.

That said, as with the iPad versus Microsoft’s Tablet PC, I am struck by how Apple has taken a feature which Microsoft has worked on for years but failed to implement sensibly and consistently. Microsoft had Live Mesh for example back in 2008 complete with an API for synchronising documents across PCs. The API was poor, there was an operating system component which could be problematic to install, and mobile device support never really came. Then in 2010 Microsoft scrapped most it and replaced it with a new Live Mesh based on SkyDrive which is now part of Windows Live Essentials. It is an optional extra for Windows users and aimed at consumers; business users can get some of this using Exchange and SharePoint as mentioned above, though these are usually privately hosted. Everything is an extra, some things free, some things paid for. In the confusion third party services like Dropbox have flourished.

Microsoft will learn from Apple and we will see a nicely integrated cloud story in Windows sometime around 2014, based on past performance.

Perforce is developing a content management system called Chronicle, says we should version everything

I spoke to Christopher Seiwald, founder and CEO of Perforce Software, on the eve of the company’s 2011 user conference which starts today.

image

The Perforce product manages source code, dealing with version history, check-in and check-out, branching, merging and so on. It is excellent software, lightweight, fast and reliable, and there are Perforce clients for a wide range of development tools across multiple platforms. The company has been able to compete successfully against the likes of IBM and Microsoft by offering a tightly focused and vendor-neutral approach, with few dependencies, low management overhead, and fast performance.

Now Perforce is doing a web content management system, but why? “We thought the web content world was a very easy step for us, in terms of what we knew and what our customers are already using the product for.” says Seiwald. “We’re building a web content management system to sit on top of Perforce. It’s going to be open source, so our customers can extend it, and it’s built using PHP, Zend and Perforce. Our APIs are also open.”

If you look under the covers of a CMS system like WordPress, every post and comment is an entry in a database. In Perforce Chronicle, the database is abstracted by Perforce, and of course everything is versioned. “It is all hosted by Perforce, using more of a document model,” says Seiwald. “A database underlies everything, we have a database underneath our system. But the world shifted a long time ago, for certain things, from regularly indexed relational databases to things more like documents where you index everything, you index every word, because you can.”

Although the CMS system will be open source, the Perforce back end “remains our proprietary company jewels,” Seiwald told me. “I’m a big fan of open source. If we could figure out a way of funding our operation in an effective way with open source then we would, but we’re not that clever. The business model just seems to support having a proprietary back end.”

Nevertheless, there will be a free CMS server for small sites. The approach will be similar to that used for the version control system, where up to 2 users can use it for free. Sites with few authors and/or small amounts of content will likely be free. “My attitude has always been, get from people who are willing to pay their money, and if they’re not willing to pay, make sure they can use it anyhow.”

The features of the CMS are not yet available in detail, and Seiwald says the first release will be “as simple as possible. My goal is to get it out of the door so that you can manage a simple web site in Perforce. The guys who are working on the CMS are pushing to put more in; I keep pushing to get it out earlier.” However, since it is open source it should be possible to plug-in additional features.

Perforce Chronicle is part of a wider strategy, to embrace the cloud and to encourage users to version more of their content, perhaps all of it. “People are putting just about everything online somewhere, not just source code, because they think online is better than offline. Data sitting on your local desktop, that just makes people scared. Online, whether corporate online or out in the cloud online, is becoming more appealing.”

I am reminded of Microsoft SharePoint. In January 2009 I wrote a post SharePoint – the good, the bad and the ugly. Since that time SharePoint use has grown, but it still has that mix of great features, over-complex setup and maintenance, and parts that rarely seem to work as they should. I use SharePoint myself, and sometimes SharePoint decides that the document I have open is read-only, for no apparent reason. I have to save my changes locally, and then copy it back to SharePoint overwriting the original.

SharePoint may be awkward, but the problem it solves is huge: reasonably secure access to your content from anywhere, without VPN, and with versioning, programmability, and a bunch of other features. SharePoint is a way of storing content in the corporate cloud. Yesterday Apple released its iWork apps for iPhone, including Pages and Numbers. Using SharePoint web storage, I can open, edit and save documents and spreadsheets in Pages on the iPhone, for example.

Perforce source code management succeeded against ClearCase and PVCS by being simpler, faster and easier. What if Perforce web content management could do the same thing versus SharePoint? Although the Chronicle CMS has a narrower focus, listening to Seiwald it seems that his vision does extend beyond web sites and source code to embrace all corporate content. “You are all going down the road of versioning everything,” says Seiwald. Note that Perforce is getting a new web services API and a Javascript API. Seiwald describes a project his team is working on called “The Commons”:

It will provide the simplest of access to Perforce for the simplest of uses. Need to work on a document? Drag it to your desktop. Need to check it in? Drag it back to Perforce. Done. It not only is an example app for our new web services, but also takes advantages of the trend for simple, online document management – backed by the power of versioning in Perforce.

That is actually not quite enough. Users need to be able to double-click a document to open it, and save it directly from Office, before it is really seamless; and yes, SharePoint has that. Nevertheless, I think this is an interesting direction for Perforce, and done right could find a ready market.

There is a little more on Perforce Chronicle on the company blog, which is where I grabbed the screenshot, but expect more details soon as the conference proceeds.

Disappearing cloud APIs: a new legacy software problem in the making

Today Google announced that a number of its APIs are to be withdrawn:

This highlights an issue with platform as a service (PaaS). If you build an app on a set of cloud services provided by a third-party, there is a risk that those services will change or disappear so that your app no longer works.

Many of Google’s APIs are free, or free for all but the heaviest users, so you can argue that you get what you pay for. Developers are particularly frustrated by the disappearance of the Translate API, where Google says:

Due to the substantial economic burden caused by extensive abuse, the number of requests you may make per day will be limited and the API will be shut off completely on December 1, 2011.

Poor old Google with its “substantial economic burden”. Oddly though, some developers are willing to pay, but this is not going to be an option:

It would be much better if Google charges using Translate API than shutting it down. Now i will have to remove this functionality from my projects. Nicely done Google 🙁

says one developer. Further, Google’s rationale for withdrawing APIs is likely multi-faceted. If I write an app that calls a Google API in the background, there is no direct benefit to Google unless it makes a charge. From Google’s perspective it is better to supply a widget, that can be branded, or to get users logging onto its site so it can gather stats and display advertising.

Still, my main interest here is in the implications for cloud computing, particularly PaaS. I frequently see old apps running in businesses. In some cases the original developer is long gone and nobody understands the code, if they have it at all. These apps keep running though. In a PaaS world that will no longer be possible; they will stop working if the APIs they use disappear.

The other side of this coin is that responsible service providers have to keep old APIs supported in order not to break applications. I have an application which I wrote 5 years ago using Amazon’s Simple Storage Service (S3). It still works today. There must be thousands of other applications which also use it. Amazon is now stuck with that API, and I guess that unless some major security flaw is discovered it will continue to work for the foreseeable future.