As many of you might know, I am a big fan of the iPhone. As a long time proponent of unified application access and delivery, dynamic infrastructure and the idea of context-based networking, the iPhone has given me a rich set of use cases for why we need to change the way we deploy our applications.  I am often referring to the iPhone’s dynamic roaming from Edge/3G to Wi-Fi as a prime example of the need for application delivery infrastructure to understand the full context of a users application session in order to provide optimal delivery at all times to all users.  In addition, the need for this dynamic and intelligent system is exacerbated by the fact that the iPhone was the first significantly advanced smart mobile device that appealed to and was usable by non-technical people; meaning that we could no longer rely on the users of these sophisticated devices to manage their own application performance issues. No offense intended to any of the other devices before or since the introduction of the iPhone, but I think it will stand as the mobile device to break the camel’s back.  It’s release signaled the beginning of the truly mobile workforce, customers and partners.

That being said—this is not a blog about the iPhone’s impact on the future of unified application delivery network. It’s about the iPhone itself and the recent release of the iPhone 3Gs; or more to the point some of the web chatter concerning the new features and how they compare to other devices.  Specifically, let’s talk about the lack of multi-tasking on the iPhone; or more the inability of third-party apps to run in the background.  For example, here is one comment on engadget

Matt @ Jun 8th 2009 3:44PM

Guess I'm going with the Palm Pre then. Same old iPhone GUI is boring me. Only one app open at a time feels outdated and confusing on such as powerful phone. Palm will release an update soon to fix the hiccups and the app store will follow in a month [emphasis mine]

As a previous user of another common mobile platform that multitasks applications, I for one am glad that the iPhone doesn’t; do you know why?  Because, never have I hit the ‘answer’ button on my iPhone and had it either crash or simply be too busy servicing other applications to answer the call.  I’ve already espoused my love of the iPhone for pushing application boundaries, but in the end, it is a phone.  A phone should, at it’s very least, be able to make and receive phone calls.  The iPhone is the ONLY device of its class that I have NOT had problems simply answering the phone when someone calls.

What is and isn’t multitasking?

Let’s look at this closer.  We all know that a single processor only runs one application at a time.  Multi-Tasking is a trick that allows us to share processor time across multiple applications to make them look like they are running at the same time.  In order to make this happen, the processor saves the state of the currently running applications, loads the next application, processes something then saves its state and goes on to the next.  The iPhone application handling isn’t much different with two exceptions: the reliance on the developer to save state; and background servicing.

The first one, is that, unlike multi-tasking operating systems that dynamically save application state while servicing other applications—the iPhone OS doesn’t.  If you quit one app (by pressing the home button) to use another one, the first app simply stops.  This however, can be easily rectified—and in fact is by most developers.  Since the OS isn’t doing it, the application developer must write their application to maintain its own state information so that when a user exists the application and later returns, their previous state can be restored.  This provides the exact ‘switching between multiple applications’ that multi-tasking does—but puts the onus on the developer. 

Now, I know what everyone is saying—sure, but multi-tasking systems use things like schedulers and pre-emptive interrupt processing to allow those back-end applications to maintain functionality; the iPhone doesn’t do that (at least for third-party application).  You’re right—but this is exactly what causes applications to freeze and operating systems to respond slowly; because the application you WANT to run is still sharing processors with the others that you ‘don’t want right now’.  If you think about it, with the iPhone YOU are the pre-emptive interrupt every time you press the home button you are telling the processor that it is time to work on some other application. Until you tell the iPhone to do this, the entire system (most of it anyway) is focused on doing the task at hand without interruptions.  Because Apple has significantly restricted what processes can run in the background, they have complete control to make sure that when you are playing that video game—some other process doesn’t cause you to get sniped because of delay. When you are running an app—it has the full attention of you AND your iPhone.

The biggest complaint with the lack of background processing—time slicing the processor to allow other tasks to be serviced—has to do with Instant Messaging applications and other social media messaging systems.  Because they cannot be serviced in the background, they have limited use on the iPhone unless you do nothing but run that application.  If you leave it, you get logged out of the systems and no longer get updates/messages/notifications.  This should be finally solved with push notification capability in the v3.0 release of the iPhone operating system.  In essence, Apple is finally providing a universal notifications bus that can run in the background and interact with all of these applications to provide updates without having to have the application running constantly on the iPhone.  So, even if I’m not currently running my Twitter application, the twitter system could push a notification to tell me that there are new tweets/messages/updates that I haven’t seen—which is all most people were looking for.  Granted, this will require some component changes on the server side or the use of desktop redirection (full-client changes), but it can easily be done.

As long as developers build their iPhone applications to maintain their state when they exit and push notifications are implemented to enable some kind of background ‘status update’, many of the issues people are concerned with will be solved.  It is just solved in a new and unique way with the application essentially running in the background—somewhere else. OMG—maybe in . . . the cloud?

The Real Issue

This real issue here is not much different from the reasons some people (like me) loved the Palm Pilot and others didn’t.  I liked the Pilot because it did what it said it would and it did it extremely well.  No, it didn’t run a mobile version of Word—but did anyone every really create decent documents on a palm device (or a smart phone)?  People seem to want a smart phone to do everything their desktop does and in the exact same way except that it should also be a phone, SMS, and MMS device with universal connectivity—not to mention a full-fledged iPod with music, full-length HD quality movies, a camera, video recorder and everything else.  Oh, and the battery needs to run forever on a single charge.

Even if the storage, memory and processor capacity of these devices makes many of my old home desktops look like Pong, doesn’t mean that we have to keep doing things the same way and keep throwing compute resources at the problem.  Maybe, just maybe, having mobile devices with lightweight components that simply interact with more robust server-side application is the way things should be.  Maybe not being able to launch 37 application simultaneously on your mobile device isn’t a limitation, but  a reasonable concern.  I do realize there are other use cases for background processing, but maybe, just maybe, if your app is that important and needs that much attention, it deserves its own standalone device or the user should run it and keep it in the foreground (know you can ALWAYS still get your music).

Assuming push notifications work as expected, I'm perfectly happy with the state of multi-tasking on the iPhone and really think that anyone who is hung up on it is missing the point.  Assuming I get my MMS  and tethering, I’ll be even happier as then, if I really need to have the big guns to do something (like write a word document to post) I can fire-up the MacBook and do that too.

Hey, wait!  That would be a good reason for a dynamic infrastructure that adapts to changes in a user’s context, wouldn’t it?

 

Follow me on Twitter Subscribe Bookmark and Share Add to Technorati Favorites