Giter Club home page Giter Club logo

mapplauncherd's Introduction

What is applauncherd?
==============================

Applauncherd is a daemon that helps to launch applications faster by
preloading dynamically linked libraries and caching stuff (MComponentCache). It also saves memory, because all launched
applications share certain resources.

Applauncherd also provides support for fast single instance launches.

Some technical details are explained below. 

Install applauncherd-doc for the Doxygen-based user documentation.
See INSTALL on how to build applauncherd and the documentation.

Building
==============================

    BUILD_TESTS=1 ./configure
    make
    make doc
    make install

Technical overview
==============================

The applauncherd daemon is started by UpStart as part of XSession, that
is, at the same level as the desktop (MeeGo Touch homescreen).
Applauncherd forks the will-be-application process, "booster", before
knowing which application is going to be launched next. There can be
different kinds of boosters optimized for different kinds of
applications, e.g. Qt or QML. 

In the current architecture boosters are loaded as plugins. Applauncherd
searches for plugin libraries in /usr/lib/applaucherd/lib*booster.so and
forks a new process for each booster to wait for launch commands from the
user.

The user uses the launcher always through a special invoker program. The
invoker (/usr/bin/invoker) tells booster process to load an application
binary via a socket connection. 

The application to be launched via applauncherd should be compiled as a
shared library or a position independent executable (-pie) and it should
always export main(). There's also a "booster" for all applications.
In that case exec() is used.

Technical details
==============================

Before loading, booster process changes its security credentials so that
the code in the application binary will be executed with the correct credentials. Loading the binary is done with dlopen(), and therefore the
application needs to be compiled and linked as a shared library or a
position independent executable. The booster process also sets the
environment variables. Finally, it finds the main function in the
application binary with dlsym() and calls the main() with the command
line arguments given by the invoker. 

The launcher itself is a library that is loaded by a small C-program (/usr/bin/applauncherd.bin). Idea behind this is to avoid linking the
launcher binary to any libraries. This allows us to fully control how
(with which flags) the preloaded libraries are opened with dlopen(). 

Each application type (currently Qt or QtDeclarative) has its own booster
process. When booster launches the application by calling the "main()"
function, applauncherd will create new booster process of that type.

Booster processes do some initializations that cannot be shared among
other processes and therefore have to be done after forking. This allows,
for instance, instantiating a application before knowing the
name of the application. Then the booster process waits for a connection
from the invoker with the information about which application should be
launched. 

Contributors
==============================

People who have contributed to meegotouch-applauncherd:

Olli Leppänen
Jussi Lind
Juha Lintula
Pertti Kellomäki
Antti Kervinen
Nimika Keshri
Alexey Shilov
Oskari Timperi

Some parts of the code is based on the maemo-launcher by:

Guillem Jover
Michael Natterer

mapplauncherd's People

Contributors

rburchell avatar special avatar thp avatar saukko avatar neochapay avatar faenil avatar askervin avatar stskeeps avatar

Stargazers

Majick Tek avatar

Watchers

Giulio Camuffo avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.