system-controller: simplify set_appid and set the win area in it.
[profile/ivi/murphy.git] / README.md
1 Murphy resource policy manager
2 ==============================
3
4 What is Murphy?
5 ---------------
6
7 Murphy is a centralized resource policy daemon. Murphy assigns system
8 resources to applications in an event-based and centralized way, meaning
9 that resources are given to applications that request them in a priority
10 order.
11
12 Murphy works with many different resource domains and is intended to
13 handle cross-domain resource conflicts. An example of this might be an
14 interdependency between power management resources, audio resources, and
15 video resources. If an application requires an instance of all the three
16 resource types to work properly, taking a single one away from it should
17 result in the release of the entire set of resources, since the
18 application anyway requires the whole set to work properly.
19
20 Murphy is designed to be extensively scripted and extended. The logic
21 behind the decisions is encoded in the scipts in form of policy rules.
22 These rules will be provided by the system intergrator. The extensions
23 are implemented as Murphy plugins or external domain controllers.
24
25 How does Murphy work?
26 ---------------------
27
28 Murphy listens to three input event types:
29
30 1.  System events
31 2.  Application requests
32 3.  User-provided settings
33
34 An input event (such as an application requesting permission to play
35 audio) may change a value in Murphy internal database. This in turn
36 triggers the decision making mechanism. The decision is made and
37 communicated to domain controllers, which enforce the resource limits
38 for different resource domains, and to the applications competing for
39 the resources. Resource-aware applications are expected to comply with
40 the decision, but for some domains the decisions can also be enforced.
41 For the audio domain it might mean stopping or muting the stream that
42 was not allowed to play.
43
44 Why is Murphy needed?
45 ---------------------
46
47 The main idea is to move policy responsibilities away from the
48 applications. Automatic arbitration of the available resources is
49 important especially in embedded systems with limited user interaction
50 capabilities.
51
52 The applications need to decide by themselves who can access the limited
53 resources if there is no centralized resource manager. In order to do
54 this, all applications have to:
55
56 *  understand the resource limits in the system (both software and
57    hardware)
58 *  follow other applications' access to the resources
59 *  define application priorities for resource access; who can access the
60    resource is there is a conflict?
61 *  handle exceptional cases, such as non-resource aware applications
62    accessing the limited resources
63
64 It is clear that it is extremely difficult for the applications to
65 cooperate in this way, and implementing and maintaining this support for
66 every single application running on a system is a huge undertaking.
67 Changing a policy would require changes to all applications. But if the
68 applications offload the resource policing responsibilities to a central
69 resource manager, the applications only need to use a well-defined
70 resource API to request access to resources and follow the resource
71 status. In order to do a policy change, the system integrator only needs
72 to change the policy in resource manager configuration, and the desired
73 behavior should automatically follow.
74
75 Compilation of Murphy
76 ---------------------
77
78 Detailed information on building Murphy, the dependencies and options
79 can be found at the [documentation](https://01.org/murphy/documentation/compiling-and-installing-murphy).
80
81 In general, Murphy is an Autotools-based project, so users who have
82 used Autotools before should be relatively "at home" with the process
83 of generating the configure script as well as configuring and compiling
84 Murphy.