Delphi Handbooks Collection


Delphi XE Handbook


Delphi 2010 Handbook


February 20, 2012

Puzzled by Metro Lack of Multitasking in Windows 8

I've attended a very nice Microsoft Community event in Milan last Friday... but was left really puzzled by some design decisions in Metro. Did I miss something?

I've attended a very nice Microsoft Community Days event in Milan last Friday. Good level of sessions, some great speakers (and some not great, but good), very nicely hosted at the new Microsoft Milan office (which is very nice and has much better parking). I liked the event, spent some time chatting with speakers, and learned a lot. 

But in the end, I was really puzzled by the design decisions behind the new Metro user interface. Not the graphical design decisions, those are actually quite nice and inspiring, but the technical design decisions (or at least those in the current developer preview which dates back several month and are subject to change within a few days, when the first public preview of Windows 8 will become available). Some info at http://www.tested.com/news/windows-8-metro-app-multitasking-will-mimic-mobile-apps/3564/ and https://wiki.mozilla.org/Windows_8_Integration.

Why am i puzzled? In short, Metro apps run one at a time, generally full screen (the exception is 2 side by side), an app moved to the background gets suspended after 5 seconds and must save its state (and do it fast), given the OS might kill it in case it needs more memory (cannot they just warn the user and ask to close some apps as Android does? Too geeky?). The reason for these design decisions is to save CPU time and so increase battery life. A good idea for a phone? Maybe, but with dual core phones becoming the standard and with Android offering better multitasking, this seems a bit strange to me.

But that's not my point. Windows 8 Metro interface is going to show up on my 8-core PC, which has enough memory for tons of apps, and most of the time has a cable connected to a power plug. So I don't care, and yes I want my email app and my twitter app and new newspaper app to keep running, so that when I get back to them I see up-to-date status... not what was there when I moved on. Because I'll have to wait for the app to fetch more data and update the user interface. I'll have to waste my time! Keeping my browser pages open, after all, is currently making me a better service. And running native Windows app provides a better experience. I'm sorry, but I really don't get this. Even the Metro UI tiles "seem to update", but have lots of limitations. From what I've learned, Metro is very inefficient at multitasking by design: it keeps re-executing the same application over and over with different start-up parameters. This is not fast, compared to waking a suspended thread. The only good news is that Native C++ (and possibly Delphi) apps will be much better than managed .NET apps that need to to just-in-time compilation at every execution!

Moreover, as a developer you have to write a lot of code to support all of these start-up options, support saving and restoring state and much more... and this is compulsory for an application to show up on the Microsoft store. So you have to write a lot of code to support this memory management model. More than competing platforms require. This makes is practically impossible to build business apps with database connectivity and so on, unless you want to disconnect and reconnect from the DB every time the user checks the weather. I think Microsoft should really know better. And this is not the only point, as there are other limitations in the name of user experience that simply add unneeded burden on the developer.

Either I really missed something relevant, or on full blow portable and desktop PCs I see the chances of Metro and WinRT very low. Trying to unifying the two interfaces might be interesting, but trying to push desktop application developers towards a more limited architectural model, seems clumsy. Thinks might be very different for tablet and phones, but still why target for lower multi-tasking support than your successful competitors?





 

17 Comments

Puzzled by Metro Lack of Multitasking in Windows 8 

"I want my email app and my twitter app and new newspaper app to 
keep running, so that when I get back to them I see up-to-date 
status... not what was there when I moved on. Because I'll have to wait 
for the app to fetch more data and update the user interface. I'll have 
to waste my time!"

Did you really think about that when you wrote it, or were you just 
reacting instinctively ?  Because if you think about it, what you wrote 
doesn't make sense.

What is the point of your email, twitter and newspaper apps being 
constantly up to date when nobody (i.e. you) is paying attention to 
them ?

Unless your application needs constant feeding with data (e.g. GPS for 
a route tracking app) there is no point in it consuming battery, cpu, 
memory and data (not everywhere has uncapped, free data).

Even if you take the (valid) view that memory, battery and data 
consumption are not legitimate concerns for a desktop app, there 
remains the fundamental point that if you aren't using an app then 
there is literally no point in it being up to date until such time as you 
*do* use it other than to save you a few seconds when you do choose 
to use them.

Almost everything you complain about this approach in Metro apps 
seems to be just as applicable to web apps (from the perspective of 
implementing them on the server side).  In particular w.r.t the 
supposed concern with ruling out business apps because they will 
have to constantly connect and disconnect to a DB (among other 
things).

This fundamental architectural failing presumably would explain why 
the web has failed so miserably to meet the demands of the business 
world... yes ?  ;)
Comment by Jolyon Smith [http://www.deltics.co.nz/blog] on February 21, 01:35

Puzzled by Metro Lack of Multitasking in Windows 8 

Marco,

I agree with your sentiments that the current "one OS 
fits all" approach is quite confusing. My personal 
opinion if that the core of the OS for tablets and 
desktops can be the same, but the UI? I don't see many 
business apps on Metro. At least for now.

Perhaps there should be Win 8 Standard and Tablet 
editions. Tablet Edition boots right into Metro; and 
stays there, maybe. Where as the desktop edition has has 
Metro as an option; perhaps for use in media center 
scenarios.

Comment by Wilfred Oluoch [http://www.ideaz.co.ke] on February 21, 04:58

Puzzled by Metro Lack of Multitasking in Windows 8 

I can see what you mean, but I agree only to some 
extent, which is that to provide notifications, you 
end up with something else running in the background.

The trend is to handle the above through *constantly 
running* background services, over which you have 
little to no control, even if you don't use them 
(Microsoft Office Upload Center being a prime example)

I for one prefer to leave open the applications I want 
to notify me, and be able to close them when I no 
longer want. Closing only the UI is cosmetic, yet 
that's the approach Microsoft has been going for: 
automatically close or hide the cosmetics, and pile up 
the hogs in the background.

Desktop/Laptop Windows is already largely a victim of 
that "service bloatware", which in practice aren't 
really smaller or lighter than UI apps.
Comment by Eric [http://delphitools.info/] on February 21, 07:25

Puzzled by Metro Lack of Multitasking in Windows 8 

Jolyon,

  background processing is not a mundane task for some 
applications, but a relevant feature. In fact, users 
often switch context while waiting for a time 
consuming operation (developers used to do this when 
compiling, in the early days). Suppose you get back 
after five minutes... and everything is still in the 
same status because you were not watching. 

I know, this is a bit extreme. But in general when I 
move to an application I already used (news reader, 
mail, web page with news, twitter, facebook, a 
compiler, a remote terminal... and most other 
application) I want to see an updated status.

It is true, I'm wasting CPU time and bandwidth for 
refreshing data I might never see... but I prefer that 
than having to move to the app, wait 10 seconds or hit 
a refresh button, see the new status. I don't think 
this makes sense on my desktop PC!

Suppose you have a business app with 5 or 6 forms open 
(and that's not many). Saving the status is a huge 
effort on the developer. Waiting for the program to 
catch up is a nonsense.

And again, since the idea is you execute the same 
application over and over, this drains CPU. Running a 
new process (particularly if not compiled, but based 
on .NET) is much more expensive than having a 
background thread. You have to run a new instance of 
the app to refresh the tiles, if I got it right, and 
this is very CPU intensive. on .NET, you recompile the 
code over and over, in JavaScript you re-interpret it. 
No wonder they are pushihng towards C++... 
Comment by Marco Cantu [http://www.marcocantu.com] on February 21, 08:10

It's a process called "dumbsizing" 

IT is entering a phase I am calling "dumbsizing" -
Windows 8 Metro is an example, Microsoft "Flight" is
another, basically you take something that works well
and apply to it ideas taken from a different (and
usually "dumber" even if successful) context where
they work, in the attempt to "attract" more user
making it "dumber". I see no reason why my PC should
work like my phone - but now phones get all the hype
thereby your PC must become a dumber big phone.
Comment by Luigi D. Sandon on February 21, 10:11

Puzzled by Metro Lack of Multitasking in Windows 8 

Many of the applications I use are off running long 
complex operations (rendering video, replicating 
databases between home and my remote office, scanning 
for viruses, defragging my hard drives) - I want these 
tasks to run unimpeded in the background, whilst I get 
on with other tasks in the foreground.

Isn't this why many of us have quad core PCs?

iOS-style task switching/suspending is perfect in a 
tablet/smartphone device in my leisure time - but I want 
more flexibility and sophistication on my desktop 
workstation, so I can be much more productive during my 
work time.
Comment by Jon Souter on February 21, 10:20

Puzzled by Metro Lack of Multitasking in Windows 8 

" Suppose you have a business app with 5 or 6 forms open 
(and that's not many). Saving the status is a huge 
effort on the developer. Waiting for the program to 
catch up is a nonsense."

No one will follow these Microsoft's standards unless 
they provide automated features to handle these tasks , 
!! OH ! No ! , Then Delphi also has to provide these 
automated features.
Comment by VRV on February 21, 11:08

Puzzled by Metro Lack of Multitasking in Windows 8 

 Are you missing the elephant in the room here?
Just think what the described behavior would do to Chrome running 
on a Windows 8 desktop system like this.
Than extrapolate this, using a historical perspective.
Too much conspiracy theory? Maybe.
Comment by MarkG on February 21, 12:03

Yes, dumbsizing it is! 

100% agreed with Luigi! Dumbsizing it is! Everything
in IT seems to work that way: Something is working
nice in a context. Some genius take that thing off the
context and do it work terribly in another context.
But there is another genius - a marketing one - that
convince 95% of the IT professionals that "This is the
future", "If you don't embrace it you will be legacy
soon", etc. And even though that technology is
terrible, people will use it and even enjoy it. I have
seen this happen so many times... And here we go again.

@Joylon: Metro apps and Web apps have so many
differences... Web servers use sofisticated pool and
cache mechanisms to avoid costly operations like
reconnect to RDBMS, recompress static JavaScript, HTML
and CSS content, etc. I didn't see anything like that
in Metro.

Regards
Comment by Alexandre Machado [http://alexandrecmachado.blogspot.com] on February 21, 17:40

Puzzled by Metro Lack of Multitasking in Windows 8 

And what about the fact that you will only be able to 
distribute your Metro Style Applications through the 
Microsoft App Store?

What if you only want to develop software for your own 
company? Will you have to pay M$ to be able to use your 
own software on your own machines?

And what about freeware programs? Are they going to 
disappear altogether? Are there any programmers who are 
willing to pay for software they would like to give 
away?
Comment by Pasquale Esposito [http://www.espositosoftware.it] on February 21, 19:07

Puzzled by Metro Lack of Multitasking in Windows 8 

I dont know what kind of world jolyon lives on, but 
over here I worked with 3 monitors divided on 2 each 
of them, giving me a minimum of 6 windows each where I 
need to see constant data flowing in the form of 
videos, texting, messages, notifications, 
compilations, etc.

I'm not a special case, for all users who have more 
than 1 monitor on their PC (which I assume is a large 
number, specially now with great technology options as 
Eyefinity) and at least 2 cores on every PC I will say 
multi tasking is pretty standard.

So lets say I have my podcast on the right hand side, 
my IDE on the middle and my twitter on the left.  I 
can hear a notification and glance at my tweeter, hear 
a laugh and look at my podcast (usually on video) 
while compiling on the center screen.

I'm certain all this will be possible on Win8 by 
simply checking some "Classic" or "Traditional" option 
box, it will be madness if not.
Comment by Steven Pacheco [] on February 22, 06:44

Puzzled by Metro Lack of Multitasking in Windows 8 

I feel I am losing something too.

How would my dropbox syncing work in that world? So I
cannot leave a zipping folder in the background as I
use MS Word to write a resume? So if a customer
receive an email, he cannot minimize my application
that he is editing to take some information and come
back? Because in this way, he will lose the
transaction. How will RDBMS work? Are you sure this is
real?
Comment by EMB on February 22, 13:09

Anyway Metro is just one way to write Win8 applications. 

Reading through the links, Metro applications has some
ways to awake or being notified while they're in
background. What they don't get is true multitasking.
IMHO what MS wants is a class of applications that can
work without changes from phones to PCs.
And always IMHO, too many developers were ready to
jump on Metro as if it was the new Windows application
model. I believe it is not, and will be ok to write
some applications but not *any* application (why
people are so crazy about UI candies I really don't
understand...)
There is of course a risk Win8 will be "Vista 2", and
will force upon users some bad design choices that
will require to be "fixed" in Win9 (it looks even
numbers are bad for Windows too ;) Time will tell...
Comment by Luigi D. Sandon on February 22, 15:09

Puzzled by Metro Lack of Multitasking in Windows 8 

I have an idea. What if such features are not critical for desktop "metro" 
experience but what Microsoft is planning for, is for the single catalog 
of "Microsoft windows 8 apps" to be the start of its own Apple-inspired 
walled garden?

The tablet marketplace is clearly #1 inspiration for this new approach, 
and desktops are a secondary consideration. None of these features 
reduces Desktop usability really, it simply enables a different form 
factor usability.  

It's a smart (if derivative) move on Microsoft's part. It's no secret they 
are aping iOS and OSX lion.

W 
Comment by Warren P [http://delphicodemonkey.blogspot.com/] on February 25, 00:34

Puzzled by Metro Lack of Multitasking in Windows 8 

 Its my guess that these power saving features were 
implemented by Microsoft as part of a larger green 
planet computing strategy. With the shift of the 
greater part of the computing population to handheld 
devices (think iPad, tablet computing etc) it makes 
sense to have the kernel built around technology that 
will produce a lighter carbon offset. What you are 
seeing is the effects of socially responsible platform 
design. Kudos to Microsoft, bummers for the power-
users. But then hey, serious tasks should be processed 
on a server anyway with only lightweight client user 
interfaces made available to the user.
Comment by Steve Faleiro [http://www.marketingemailer.com] on February 27, 00:38

Puzzled by Metro Lack of Multitasking in Windows 8 

"but trying to push desktop application developers
towards a more limited architectural model, seems clumsy."
Assume MS creates the environment starting with a new
generation of developers. Assume target 2020 and the
world looks different. Assume a transparent
middle-ware and LTE combined. Via LTE you can already
play 3D games and send 'screens' (problem of the last
mile - assume solved that's the plan). 'Forget client
server and web services' when talking about Metro on a
long term.

At the moment the target is - as said by MS.
Multimedia and apps. This user group, is covered by
Office + web browser + social apps and the one or
other utility. That is the vast majority. They are
covered by 'Linux' potentially already.

Microsoft will not expect from its developer community
to implement more than what is possible anyway. If the
current developers don't do, another one will do. It's
this simple. No one will wait. There is enough time
left, Win7 is the here and now.

The Delphi community is one of the last that did not
separate the back-end development from front-end
development - roles perspective, very likely reason -
simply almost no need so far. All the others already did.

Cannot add something to the comments above. All true,
I share the concerns too, especially Luigi's very
realistic view again and Alexandro's thoughtful
comments of on web-server and web-browsers capability
concerning handling of deltas and partially redrawing
the 'screen'.
Comment by Michael on February 27, 20:46

Puzzled by Metro Lack of Multitasking in Windows 8 

One answer: Background tasks...

Read this:

http://www.microsoft.com/download/en/details.aspx?
id=27411
Comment by Jav on March 3, 23:07


Post Your Comment

Click here for posting your feedback to this blog.

There are currently 0 pending (unapproved) messages.