A library for adaptive decision-making with Dart. It supports the Dart VM and the browser with dart2js. This library was initially created for my master's thesis. Also, a second library for code distribution, called Code Mobility, was developed. For more information on this topic see the blog post on the blog of my employer inovex GmbH.
The Adaptify library is responsible for the decision-making. It utilizes the three basic resources CPU, memory and bandwidth. For every task used with Adaptify metadata with consumption information for the three resources must be defined. In the metadata the resource requirement is graded into low, medium or high consumption. Additionally, there is a fourth metadata which defines whether a task is time-critical.
Several components of the library interact with each other for the decision-making. At first the resource requirements of a task, as defined before, are determined. In addition, the monitor component provides information about the current capacity of the device. Both information sources are evaluated by an adaptation strategy and a decision is made. Adaptify is able to make a decision based on the resource requirements alone, if no monitor information has been collected or the adaptation strategy doesn't intend the use of a monitor. The decision is then forwarded to the decision unit which determines a final result and returns it to the application. The decision unit may further process the decision of an adaptation strategy. For example, several adaptation strategies can be evaluated within a decision unit. Subsequently, the decisions are collected and the result is determined by a majority decision.
The implementation with Dart provides several challenges. At first the two very different runtime environments (Dart VM and browser) offer different and very limited options to acquire the capacity information of a system. Furthermore, the comparability of measurements on different devices is a problem that makes it hard to use the results in an adaptation strategy. The implementation and conducted tests revealed that it's difficult to capture meaningful results for the three resources in both runtimes. Especially the browser complicates the data collection and only limited information are available. Therefore, the manual user input of the performance values is a good strategy to collect information for the monitor. In addition to the collection of information a good adaptation strategy is important. Adaptify currently provides two strategies based on conditional expressions and fuzzy logic. They are tested with user provided values and have proven their suitable for the decision-making in tests.
For feedback and bug reports just open an issue. Feel free to fork this project, create pull request and contact me for any questions.
Adaptify is licensed under the BSD License.
Add this to your package's pubspec.yaml file:
dependencies: adaptify: ^1.0.0
You can install packages from the command line:
$ pub get
Alternatively, your editor might support
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|1.0.0||Feb 29, 2016|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.
Support Dart 2 in
The SDK constraint in
pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://dart.dev/dart-2#migration.
dartdoc successfully runs on your package's source files. (-10 points)
Dependencies were not resolved.
|Dart SDK||>=1.13.0 <2.0.0|