locked
Background Tasks

    Question

  • How will background tasks work with Metro?

    1) Incoming email.

    2) Zune Podcast downloads.

    3) Instant Messaging.

    4) Complex time spanning calculations.

    5) System tray stuff.

     

    Is the Desktop Sytem Tray always running? Is the Desktop always active in the backround... never suspended?

    How do Background processes not kill a tablet battery?

     

     

    Wednesday, September 21, 2011 1:54 PM

Answers

  • For things like email clients and communication applications, there is the ability to have a small amount of code run periodically in the background (I think it's something like once every 15 minutes) which they can use to poll a mail server. Alternatively they can take advantage of the Windows Push Notification Service (WNS) to automatically update the Live Tile for the user's mail client when messages arrive.

    Downloading files can be done using the Background Intelligent Transfer Service, which will continue to download even if the related app is suspended or stopped.

    Complex time spanning calculations don't really sound like suitable work for Metro, so will probably remain the focus of desktop based applications, which are able to continue running in the background as they always have been. I'm not entirely sure what you mean by "System tray stuff", but applications that currently just use the notification area of the taskbar to indicate they are running will continue to do so unless they are re-written to use the Metro application model (which hopefully they will be since it is better suited to most of those kind of tasks).

    The desktop is loaded if you run any application which requires the desktop, so having startup tasks that launch utilities will cause the desktop to load. It (and apps running on it) doesn't get suspended since those applications are not written with the new WinRT lifecycle management in place.

    Processes which run continuously in the background will continue to have an effect on battery lifetime as they do now, however much of the Metro functionality is about enabling applications to give the impression of running whilst minimizing the amount of actual power they utilize. As a result Metro applications should give you better battery life than older style desktop applications when providing background functionality.

    • Marked as answer by CraigLaurin Wednesday, September 21, 2011 11:35 PM
    Wednesday, September 21, 2011 2:18 PM
  • This is a link to a whitepaper on background tasks for Metro apps which may answer some of your questions:

    http://www.microsoft.com/download/en/details.aspx?id=27411

     

    • Marked as answer by CraigLaurin Thursday, September 22, 2011 12:33 PM
    Thursday, September 22, 2011 12:04 AM

All replies

  • For things like email clients and communication applications, there is the ability to have a small amount of code run periodically in the background (I think it's something like once every 15 minutes) which they can use to poll a mail server. Alternatively they can take advantage of the Windows Push Notification Service (WNS) to automatically update the Live Tile for the user's mail client when messages arrive.

    Downloading files can be done using the Background Intelligent Transfer Service, which will continue to download even if the related app is suspended or stopped.

    Complex time spanning calculations don't really sound like suitable work for Metro, so will probably remain the focus of desktop based applications, which are able to continue running in the background as they always have been. I'm not entirely sure what you mean by "System tray stuff", but applications that currently just use the notification area of the taskbar to indicate they are running will continue to do so unless they are re-written to use the Metro application model (which hopefully they will be since it is better suited to most of those kind of tasks).

    The desktop is loaded if you run any application which requires the desktop, so having startup tasks that launch utilities will cause the desktop to load. It (and apps running on it) doesn't get suspended since those applications are not written with the new WinRT lifecycle management in place.

    Processes which run continuously in the background will continue to have an effect on battery lifetime as they do now, however much of the Metro functionality is about enabling applications to give the impression of running whilst minimizing the amount of actual power they utilize. As a result Metro applications should give you better battery life than older style desktop applications when providing background functionality.

    • Marked as answer by CraigLaurin Wednesday, September 21, 2011 11:35 PM
    Wednesday, September 21, 2011 2:18 PM
  • Thank you for the clarifications Andy.

     

    I'm still wondering how IM may be able to work in Metro. We see Metro pop-up windows in response to hardware events, like a USB stick being inserted. I wonder if the same hook could be used for IM apps with the ability to respond in the pop-up window with typed responses.

    I wonder how Metro Messenger and Metro Skype will work. I don't want to have to wait 15 minutes between newly solicited  actions. Nor do I want to have to keep a Metro IM app open in a side window for it to function. It needs to be listening silently.




    • Edited by CraigLaurin Wednesday, September 21, 2011 11:46 PM
    Wednesday, September 21, 2011 11:40 PM
  • Maybe Metro IM could act like the contract window that slides over from the right as an overlap.
    Wednesday, September 21, 2011 11:44 PM
  • This is a link to a whitepaper on background tasks for Metro apps which may answer some of your questions:

    http://www.microsoft.com/download/en/details.aspx?id=27411

     

    • Marked as answer by CraigLaurin Thursday, September 22, 2011 12:33 PM
    Thursday, September 22, 2011 12:04 AM
  • Thank you for the link Hari. That answers the rest of my questions.

     

     

    Thursday, September 22, 2011 12:34 PM