Introducing a radically componentized GUI architecture Norman Feske < norman.feske@genode-labs.com >
Outline 1. Starting point 2. Ingredients 3. Challenges and solutions 4. Next steps Introducing a radically componentized GUI architecture 2
Outline 1. Starting point 2. Ingredients 3. Challenges and solutions 4. Next steps Introducing a radically componentized GUI architecture 3
Starting point - Genode → Application-specific TCB Introducing a radically componentized GUI architecture 4
Starting point - Nitpicker Introducing a radically componentized GUI architecture 5
Starting point - Nitpicker Introducing a radically componentized GUI architecture 6
Starting point Starting point Low-complexity GUI server (nitpicker) Toolkits ◮ Qt5 ◮ DOpE ◮ Custom widget set Hard-wired policy Goal → Desktop environment Retain low TCB complexity Accommodate a great variety of use cases Introducing a radically componentized GUI architecture 7
Outline 1. Starting point 2. Ingredients 3. Challenges and solutions 4. Next steps Introducing a radically componentized GUI architecture 8
ROM session interface ROM client session ROM ROM server module Introducing a radically componentized GUI architecture 9
ROM session interface (2) ROM client session signal ROM ROM server new module version update Transactional update of a ROM session Introducing a radically componentized GUI architecture 10
ROM session interface (3) Editor Noux Backdrop FS-ROM RAM FS Runtime config file file ROM system system Init Introducing a radically componentized GUI architecture 11
ROM session interface (4) Demo Introducing a radically componentized GUI architecture 12
Report session interface Existing mechanisms for propagating information Configuration defined at startup Policy defined at session-creation time Session interfaces Dynamic configuration changes What is needed in addition? Components need to publish internal state, e. g., ◮ Driver: Report available device resources ◮ Component: Report feature set ◮ Applications: User notifications ◮ Propagating error conditions Introducing a radically componentized GUI architecture 13
Report session interface (2) � Report client report session Report server RAM Introducing a radically componentized GUI architecture 14
Publisher-subscriber mechanism Combining “Report” and “ROM” session interfaces The report rom server provides ◮ “Report” service ◮ “ROM” service Stores reports using report-session labels as keys Controls access using ROM-session labels as selectors Triggers ROM-changed signals on incoming reports → Generic publisher-subscriber mechansism Composeable with existing ROM-using components Can be instantiated many times Introducing a radically componentized GUI architecture 15
Outline 1. Starting point 2. Ingredients 3. Challenges and solutions 4. Next steps Introducing a radically componentized GUI architecture 16
Flexibility of Nitpicker Nitpicker’s built-in policy stands in the way New configuration concept Domains Layering → Separation of policy from the nitpicker server Pointer Status bar Introducing a radically componentized GUI architecture 17
Nitpicker with built-in policies Launchpad Nitpicker Browser Backdrop GUI Init Introducing a radically componentized GUI architecture 18
Policy as external components Launchpad Panel Nitpicker Browser Pointer GUI Backdrop Init Introducing a radically componentized GUI architecture 19
Domains example Demo Introducing a radically componentized GUI architecture 20
Transitions How to smoothly toggle the visibility of the windows? Adding fading feature to the application? → Increase application complexity → Modifications needed per application Adding fading feature to nitpicker? → Increase complexity of nitpicker Solution → Move fading feature to separate component Introducing a radically componentized GUI architecture 21
Transitions (2) Nitpicker Scout Fader Scout Init Introducing a radically componentized GUI architecture 22
Transitions (2) Demo Introducing a radically componentized GUI architecture 23
Launcher Starting point Demo menu (monolithic application) Based on pre-rendered PNG images Customization is labour intensive Customizable launcher Runtime-generated widgets → complex (e. g., relies on libc, libpng, zlib) Introducing a radically componentized GUI architecture 24
Launcher (2) How to keep the complexity of the launcher low? Launcher is parent of all started subsystems → belongs to the trusted computing base Appealing presentation comes with complexity Solution 1. Turn launcher into a multi-component application 2. Sandboxed widget-rendering component Introducing a radically componentized GUI architecture 25
Launcher (3) Menu view Report Fader Report ROM <hover > ROM ... Nitpicker Report ROM </hover > <dialog > ... </dialog > Nitpicker Launcher Nitpicker Init Introducing a radically componentized GUI architecture 26
Launcher (4) Demo Introducing a radically componentized GUI architecture 27
Window management Starting point Genode lacked a coherent window manager Application-specific window management Problem Diversity of tastes and expectations by users There is no a single solution for everyone Introducing a radically componentized GUI architecture 28
Window management (2) Launchpad Panel Nitpicker Window Browser Pointer Manager GUI Backdrop Init Introducing a radically componentized GUI architecture 29
Window management (3) De-componentized window manager Provides “Nitpicker” interface (compatibility) Layouter (defines behavior) Decorator (defines look) Layouter and decorator are sandboxed Introducing a radically componentized GUI architecture 30
Window management (4) Report ROM Layouter Decorator Report ROM t u p n i Report ROM ROM ROM Report <window -layout > <hover > <window -list > <window -layout > <hover > ... ... ... ... ... </window -layout > </hover > </window -list > </window -layout > </hover > Nitpicker Window manager Nitpicker App Nitpicker Init Introducing a radically componentized GUI architecture 31
Decorator Demo Introducing a radically componentized GUI architecture 32
TCB complexity of window management TCB footprint of the window manager No libc dependency Adds less than 3,500 SLOC Further TCB reduction Multiple window-manager instances Each instance assigned to a different nitpicker domain Introducing a radically componentized GUI architecture 33
Screen resolutions How to support different screen resolutions? The screen resolution used to be hard-wired at build time ◮ VESA driver configuration ◮ Background image of the matching size Solution 1. Detection heuristics in the VESA driver 2. Resolution-independent backdrop 3. Dynamic framebuffer mode updates Introducing a radically componentized GUI architecture 34
Screen resolutions Demo Introducing a radically componentized GUI architecture 35
Outline 1. Starting point 2. Ingredients 3. Challenges and solutions 4. Next steps Introducing a radically componentized GUI architecture 36
Next steps Alternative window layouters and decorators Capability-based desktop environment Using Genode for day-to-day computing Introducing a radically componentized GUI architecture 37
Thank you Genode OS Framework http://genode.org Genode Labs GmbH http://www.genode-labs.com Source code at GitHub http://github.com/genodelabs/genode Introducing a radically componentized GUI architecture 38
Recommend
More recommend