Successfully reported this slideshow.
Your SlideShare is downloading. ×

Ubuntu Application Lifecycle

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 31 Ad

Ubuntu Application Lifecycle

Download to read offline

Phones and other battery powered devices require a more restricted application lifecycle to ensure that they can achieve low power states more often, even suspending regularly, in order to achieve the user expected battery life. Ubuntu Phone has a well defined application lifecycle that it presents to applications in order to ensure a good user experience for the end user. This talk would discuss the application lifecycle, what it means from both the user and the developers perspective. Attendees of the talk would come away with a better understanding of how their Ubuntu Phones work whether they're just using them or developing for them.

Phones and other battery powered devices require a more restricted application lifecycle to ensure that they can achieve low power states more often, even suspending regularly, in order to achieve the user expected battery life. Ubuntu Phone has a well defined application lifecycle that it presents to applications in order to ensure a good user experience for the end user. This talk would discuss the application lifecycle, what it means from both the user and the developers perspective. Attendees of the talk would come away with a better understanding of how their Ubuntu Phones work whether they're just using them or developing for them.

Advertisement
Advertisement

More Related Content

Advertisement

Ubuntu Application Lifecycle

  1. 1. Ubuntu Application Lifecycle Or: How I learned to stop worrying and trust application developers Ubuntu Application Lifecycle Or: How I learned to stop worrying and trust application developers Ted Gould ted@canonical.com @tedjgould Texas Linux Fest 22 Aug 2015
  2. 2. “I'm more worried about Murphy than I am Machievilli” — Michi Henning
  3. 3. Ideal Cracker
  4. 4. Diminished User Experience
  5. 5. © Andy Armstrong — CC-BY-SA — https://www.flickr.com/photos/andyarmstrong/190078748/ Dead Battery
  6. 6. © Josh Hallett — CC-BY — https://www.flickr.com/photos/hyku/368912557/ Data Protection
  7. 7. © Antti T. Nissinen — CC-BY — https://www.flickr.com/photos/54177777@N00/373864777/ Physical Destruction
  8. 8. Phone Usage http://hbr.org/2013/01/how-people-really-use-mobile/
  9. 9. PID Click Manifest Desktop File Helper Config Unity Screen AppArmor Profile Upstart Instance
  10. 10. App App
  11. 11. Application Switcher
  12. 12. Presentation Application Switcher
  13. 13. Infinite App Illusion Technical User How many apps can I run? 1 GB RAM 1 GHz Quad Core
  14. 14. Active Application Paused Apps (RAM) Stopped Offline
  15. 15. Stateless Stopped Paused Active
  16. 16. Stateless Stopped Paused Active User Interaction Only!!!
  17. 17. Paused Active Stateless Stopped
  18. 18. Stateless Active Stopped Paused Linux Kernel OOM Killer (want to include graphics resources in the future)
  19. 19. Stateless Stopped Paused Active
  20. 20. What happens: ● App is asked to save state ● Graphic buffers grabbed for screenshot ● Timeout, then all processes are sent SIGSTOP Paused Active Stateless Stopped
  21. 21. What happens: ● NOTHING!Stateless Active Stopped Paused
  22. 22. Positive: Ask to save state nicely via life cycle Stop using processing when not asked Negative: SIGSTOP apps SIGKILL apps on OOM killer
  23. 23. Likelytobekilled Stopped App Untrusted Helpers Active Application Unity
  24. 24. Trusted Helpers ● Download Manager — Downloads content to the device while the application isn't focused. ● Push Messages — Background process that collects JSON messages targeted at app/user ● Location Service — Uses GPS and other sources to establish location continually. ● Content Hub — Shares files between application contexts securely. ● Media Hub — Plays audio files and play lists.
  25. 25. App Location Online Accounts URL Dispatcher Address Book AppArmor TrustedConfined DBus Trusted Helpers
  26. 26. App URL Dispatcher Upstart Browser Unity USER Click on a link Show the browser
  27. 27. File Server Push Message Download Manager App Push Server Save in App Cache New File Simple Sync
  28. 28. Request permission at time of use
  29. 29. Ubuntu Applications are: ● Confined — By default the applications are restricted from using a lot of functionality that might be expected from a traditional Linux user session. ● Managed — The application lifecycle works to keep the user in control of what is draining the battery and using resources. ● Have Friends — Trusted helpers provide ways to implement the functionality you need and work with confinement. Review
  30. 30. Additional Info http://www.ubuntu.com/phone https://developer.ubuntu.com https://wiki.ubuntu.com/Security/AppArmor https://wiki.ubuntu.com/Mir
  31. 31. © Stéfan — CC-BY-SA — https://www.flickr.com/photos/st3f4n/143623934

×