Presentation is loading. Please wait.

Presentation is loading. Please wait.

PROJECT IN DISTRIBUTED SYSTEMS IPERF FOR ANDROID Developers: Shir Degani, Yuval Degani Supervisors: Prof. Roy Friedman, Alex Kogan.

Similar presentations


Presentation on theme: "PROJECT IN DISTRIBUTED SYSTEMS IPERF FOR ANDROID Developers: Shir Degani, Yuval Degani Supervisors: Prof. Roy Friedman, Alex Kogan."— Presentation transcript:

1 PROJECT IN DISTRIBUTED SYSTEMS IPERF FOR ANDROID Developers: Shir Degani, Yuval Degani Supervisors: Prof. Roy Friedman, Alex Kogan

2 Project Goal  The project is based around a common open-source tool called "iperf", which is widely used for bandwidth measurement in Linux and Windows environments.  Our main goal is to port iperf to Android environment, so it can be used to measure performance across networks within a mobile device, running as a client or server.

3 Secondary Goals  Ability to perform iperf tests using the Android version with original versions running on a PC or laptop using Linux/Windows.  To provide all the functionality and features of the original PC version.  To provide the user with a friendly GUI for a mobile device and use the same parameters and commands as in the original version.

4 Tools used in the project  Android SDK as the standard environment.  Android NDK, Native Development kit, which allows integration of C code into the Java environment.

5 Basic Architecture  Our project consits of two parts:  Modified source-code of iperf, configured to be compiled using NDK, and run on Android.  Java code of the Android application consisting of a GUI and code for running the compiled iperf executable.  The advantages of this "Divide and Conquer" approach, is that we promise minimum changes to already working algorithms of iperf, and thus making it compatible with other machines running the original iperf.

6 Basic Architecture - Chart Android Java application iperf executable cross-compiled for Android ARM enviroments. iperf modified C source-code Android NDK “IperfTask“ class

7 Design Decisions  The main decision that had to be made was whether to rewrite the original code to java or to use the existing C code with modifications.  Since our intentions were to keep compatibility and reliability to the maximum, we have decided to use the original code.

8 User interface  The user interface is designed to be as similar as possible to the original version, with small changes to make it touch-screen friendly.

9 User interface - Screenshots

10 Class Diagram Android application package (iperf.apk) “iperf” iperf executable cross-compiled for Android. “iperf_activity.xml” Layout properties of the application. “IperfProject.java” Main source file for the application. Initialization methods GUI functionality Class “IperfTask” Test Invocation

11 Class “IperfTask”  Test invocation code - the interface between the Android application and the iperf executable running in the background in a terminal.  This code consists of a special class called "IperfTask" which extends the class "AsyncTask".  AsyncTask is a built-in method of Android that allows running processes in the background and occasionally updates the GUI upon changes in output. With every test invocation, a new instance of this class is made so it can run in the background while the output streams correctly to screen.

12 Class “IperfTask” - continued  This special class allows this functionality with no harm to the performance of the test, as it is scheduled by the system when resources are free.  When a test ends, or aborted by the user, the process is terminated, clearing up memory for the next test to be run.  Before every test we also check the input from the user to match certain syntax that iperf supports, using a regular expression. This is done in order to prevent any exploitation of the shell interface.

13 Timing in Android environments  Iperf measures bandwidth using simple computations of time differences between submissions and retrievals of data packets.  This is done in the original code using “gettimeofday()” system function (sys/time.h).  In our modified version this is done in the same way, but an Android implementation is used when running.  In the Android version, the functionality is basically the same, since this is a system function that runs on the kernel outside of the Dalvik VM.  Our conclusion is that no difference should arise between the two versions, since Android provides the same functionality as being linux-like.

14 Changes to the original source code  For compiling the code so it could run on the Android platform, we used the linux 32bit configuration for x86 processors as a baseline.  We tested numrous additional configurations until we got it to compile and run on an Android ARM terminal with the exact functionality as running it on a linux terminal.

15 Changes to the original source code - continued To summarize the changes and additions that exist in the final version: 1. Application.mk - makefile to configure the filenames and working directories for NDK. 2. Android.mk - makefile for compile and build instructions for NDK. 3. Source files - we moved the original source files to a single directory that contains only the relevant code for this build. 4. changes in the files themselves revolved around correcting the system dependencies of the original code, mainly involving includes definitions. We made a special effort not to change the code itself, thus we retain the original functionality of the source code. All the features of the original iperf remain the same, including multithreaded testing (- P), UDP testing (-U), etc.

16 The End.


Download ppt "PROJECT IN DISTRIBUTED SYSTEMS IPERF FOR ANDROID Developers: Shir Degani, Yuval Degani Supervisors: Prof. Roy Friedman, Alex Kogan."

Similar presentations


Ads by Google