Beftigre Documentation

Current version 1.0. Release date: 2016-12-03

Beftigre stands for Behaviour-driven full-tier green evaluation of Mobile-Cloud Applications (MCAs).

Clarification of terms:
  • Behaviour-driven (from BDD) is a concept that uses different parameters with simple clauses (given, where, then) to construct a scenario that defines an application.
    These scenarios can then be expected or compared.
  • Full-tier refers to test coverage with finer-granularity - i.e. including all participating tiers of an architecture.
    For MCAs, the concept of full-tier would involve both the mobile tier and the cloud tier.
  • Green evaluation refers to testing for green metrics such as energy, performance and resource associated metrics.
  • Mobile-cloud applications refers to mobile applications that use cloud as surrogate for execution of resource-intensive tasks.
The benefits, addressed gaps and research intentions of Beftigre approach has been presented in details in JSEP SE4S. This web page is a companion to the JSEP SE4S submission, providing details for experimental replication - including tools, setup and technical documentation.

Beftigre approach is implemented as a framework of two flavours: Band and Befor. Please ensure to verify the authenticity of the packages.

Band Download

Band API is for the mobile tier of the MCA. Band stands for Beftigre for Android. Band API is a jar file which can be included in Android Studio gradle as a project dependency (see usage guide).

Download Get Source

Befor Download

Befor API/tool is for the cloud tier and analysis of the MCA. Befor stands for Beftigre Orchestrator. Befor API is a jar file which can be run as a GUI tool or from the command line (see usage guide).

Download Get Source

To use the API refer to the guides below. These are also provided in the README file of the GitHub projects.


Beftigre depends on the following packages. The listing below is particularly useful for the purpose of extending the Beftigre APIs. However, for usage, the APIs (Band and Befor) contains the respective libraries, so you don't have to manually download them (except for JDK and Android SDK).

The Beftigre frameworks are regularly updated to use the most recent stable versions of the listed dependencies. Please ensure to verify the authenticity of packages where applicable (a guide is provided).

The experiments presented in this section are from our JSEP SE4S publication. This section provides the case studies, procedures and data used to arrive at our conclusions. These information is useful for the replication of our experimental outcomes.
* The objective of the experiment is to evaluate the Beftigre approach by comparing it against the Non-BDD approach.

Case studies

The experiments presented in this section are from our JSEP SE4S publication. This section provides the case studies, procedures and data used to arrive at our conclusions.
The information in this section is useful for the replication of our experimental outcomes.

Offloadable Task Taxonomy
Linpack run() method of Linpack class Computation intensive Download  
MatCalc times(Matrix B) method of Matrix class Data intensive
NQueen findSolution(int board[], int n, int pos) method of NQueen class Computation intensive
Table explanation:
  • Three case studies: Linpack, MatCalc and NQueen, are used to experiment the Beftigre approach.
  • The identified offloadable tasks and taxonomy are based on existing literatures [1-3].
Four scenarios (with two schemes):
  • The case studies are implemented in four scenarios: Local, Server, Scheme1 and Scheme2.
  • Two schemes are implemented for each application, these schemes are evaluated and compared against each other using the Beftigre and Non-BDD approaches.
  • Scheme1 is based on simple threshold policy, to mock up [4], and Scheme2 is based on perceptron algorithm, to mock up [1].
[1] M. A. Hassan, K. Bhattarai, Q. Wei, and S. Chen, “POMAC: Properly Offloading Mobile Applications to Clouds,” in Proceedings of the 6th USENIX conference on Hot Topics in Cloud Computing, 2014, pp. 1-6.
[2] Y. Zhang, G. Huang, X. Liu, W. Zhang, H. Mei, and S. Yang, “Refactoring android Java code for on-demand computation offloading,” in Proceedings of the ACM international conference on Object oriented programming systems languages and applications - OOPSLA ’12, 2012, vol. 47, no. 10, p. 233.
[3] M. A. Hassan, Q. Qi Wei, and S. Songqing Chen, “Elicit: Efficiently Identify Computation-intensive Tasks in Mobile Applications for Offloading,” in 2015 IEEE International Conference on Networking, Architecture and Storage (NAS), 2015, pp. 12-22.
[4] Y.-W. Kwon and E. Tilevich, “Energy-Efficient and Fault-Tolerant Distributed Mobile Execution,” in 2012 IEEE 32nd International Conference on Distributed Computing Systems, 2012, pp. 586-595.

Setup

After downloading the case studies for the experiment, ensure to use the most up-to-date Android Studio IDE for the android projects of the case studies.

Set the configuration for the android projects as follows (these are located in the Config class of the project's package)

Scope Config Variables Description Data Type
Server, Scheme1, Scheme2 SERVER_IP_ADDRESS The IP Address of the Server String
Server, Scheme1, Scheme2 OFFLOAD_PORT The Port of the Offloadable Task int
Scheme1, Scheme2 BANDWIDTH_LATENCY_PORT The Port for testing the Bandwidth and Latency int
Scheme1 BANDWIDTH_THRESHOLD Bandwidth threshold for offload decision int
Scheme1 LATENCY_THRESHOLD Latency threshold for offload decision int
Scheme2 SERVER_CPU_MEMORY_PORT The Port for testing the Server CPU and Memory Availability int
Scheme2 TOTAL_TRAINING_SETS Total number of Training Data set int
Scheme2 OFFLOAD_TRAINING_DATA Training Data for Offload decision (i.e. remote execution) String[]
Scheme2 NO_OFFLOAD_TRAINING_DATA Training Data for local execution String[]

Set the configuration for the Befor API (i.e. the cloud tier), as follows:

Settings Description
BandwidthLatency Port This is the port used by the Bandwidth and Latency metrics monitor at the cloud tier. This port has to correspond with the BANDWIDTH_LATENCY_PORT on the mobile tier.
CPUMemory Port This is the port used by the CPU and Memory metrics monitor at the cloud tier. This port has to correspond with the SERVER_CPU_MEMORY_PORT on the mobile tier.
Offloadable Port This is the port used by the offloadable task at the cloud tier. This port has to correspond with the OFFLOAD_PORT on the mobile tier.
Note: If using EC2 as cloud provider, ensure that the ports above have been setup within the EC2 Security Groups of your instance.

Follow the usage guide to run the Beftigre test using Band and Befor APIs.

Data

The results of the experiments can be found here.

Band [.jar] Befor [.jar]
sha256 11913d5c9ee2b9a1c4cea8a92cb116b5480493ffe8b6190f606c1417fdc7f408 81a3f6192d05d0ed24386ee7a76bf4dcb81d655639922b1a1aab1b6da82c503e
md5 dbfb5ddaba6345d18f01d5276e0d742a 3dbd8b47b6780e2636d4f73855df62f7

We recommend verifying the authenticity of all packages referred to by this site. We have also provided the checksum values for the Beftigre frameworks (Band & Befor). For checksum, you can use tools like CertUtil or sha256sum. This section demonstrates checksum on Windows using the built-in CertUtil and on Linux using the built-in sha256sum:

Format for Windows:     CertUtil -hashfile [file_name] [algorithm]
Format for Linux:             sha256sum [file_name]
To see supported algorithms for CertUtil, enter CertUtil -hashfile /?

Example - Windows:
C:\Users\Chinenyeze\Downloads>CertUtil -hashfile BeftigreAND.jar SHA256
SHA256 hash of file BeftigreAND.jar:
11 91 3d 5c 9e e2 b9 a1 c4 ce a8 a9 2c b1 16 b5 48 04 93 ff e8 b6 19 0f 60 6c 14 17 fd c7 f4 08
CertUtil: -hashfile command completed successfully.
Example - Linux:
chinenyeze@ubuntu:~/Downloads$ sha256sum BeftigreAND.jar
11913d5c9ee2b9a1c4cea8a92cb116b5480493ffe8b6190f606c1417fdc7f408  BeftigreAND.jar
Compare the actual checksum value i.e. the result of command above, with the expected checksum value given on the site. You can use the simple scripted tool below to compare the checksums, the tool will remove spaces, decapitalise text, check if the values are identical and print 'Identity Successful' or 'Identity Failed' accordingly.


Result:
Samuel J. Chinenyeze  
s.chinenyeze@napier.ac.uk
Xiaodong Liu  
x.liu@napier.ac.uk
Ahmed Al-Dubai  
a.al-dubai@napier.ac.uk
School of Computing, CAVES
Edinburgh Napier University
10 Colinton Road, EH10 5DT
Phone: +44 (0)131 455 6142

How to cite this article:
Chinenyeze SJ, Liu X, Al-Dubai A. BEFTIGRE: Behaviour-driven full-tier green evaluation of mobile cloud applications, J Softw Evol Proc. 2017. doi: 10.1002/smr.1848

Band & Befor are open source projects that are licensed under the MIT license. This allows you to do pretty much anything you want as long as you include the copyright in "all copies or substantial portions of the Software."

Beftigre approach can be adopted with appropriate academic reference to our journal submission under JSEP SE4S.