adaptify 1.0.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 30

Adaptify

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.

Description

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.

Development

For feedback and bug reports just open an issue. Feel free to fork this project, create pull request and contact me for any questions.

Documentation

The features are explained in the dartdoc documentation and the example implementations.

License

Adaptify is licensed under the BSD License.

Changelog

1.0.0

  • First public release version with basic features

0.0.1

  • Initial version

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  adaptify: "^1.0.0"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


      import 'package:adaptify/adaptify.dart';
  
Version Uploaded Documentation Archive
1.0.0 Feb 29, 2016 Go to the documentation of adaptify 1.0.0 Download adaptify 1.0.0 archive

Analysis

We analyzed this package on May 22, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.54.0
  • pana: 0.11.1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
99 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0 / 100
Overall score:
Weighted score of the above. [more]
30
Learn more about scoring.

Platforms

Detected platforms: web, other

Primary library: package:adaptify/adaptify.dart with components: mirrors.

Suggestions

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 9 hints.

    Run dartfmt to format lib/src/annotations.dart.

    Run dartfmt to format lib/src/decisionunit.dart.

    Similar analysis of the following files failed:

    • lib/src/monitor/base_monitor.dart (hint)
    • lib/src/monitor/systemtools_monitor.dart (hint)
    • lib/src/performance_classifier.dart (hint)
    • lib/src/strategy/base_strategy.dart (hint)
    • lib/src/strategy/conditional_strategy.dart (hint)
    • lib/src/strategy/fuzzy_logic_strategy.dart (hint)
  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use adaptify.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.13.0 <2.0.0
fuzzylogic ^0.1.4 0.1.4 0.2.0
Dev dependencies
test >=0.12.0 <0.13.0