Abstract
Smartphone used offloading Computation to use resources remotely from external platform i.e.cloud. It is recently discovered to make smartphone application more efficient with limited resources.
This paper hold the presentation of first practical implementation of offloading computation idea for Android Smartphones. It is named as cuckoo frame Work. By using this technique, a dynamic runtime will be provided which decide to run application on local resources or external platform i.e.Cloud. Evaluation of framework is done by using two real life application in this paper.
Introduction
In last 20 years, we observed a wide addiction and usage of Advanced mobile phones named smartphones. These Smartphones equipped with rich and advanced set of sensors, high powered and fast mobile processors with efficient internal as well as external memory.
Number of operating systems available to be installed such as Android [1], IOS [2]. These Operating systems are developed to use these resources more efficiently it allows to developers and programmers to build and run custom applications.
Today Android Market and Apple Application store have main focus of market. They got focus due to ease of Application publishing. Number of Applications can be developed and install for ease and entertainment of user such as 3D games, Social Networking (i.e. Facebook [3]), Simulators, health applications and much more.
After a recent statistical report of Apple Application store there are more than 185,000 Application which was only 500 at start. Similarly, Android have 2,800,000 on March 2017 Applications on Google play store [4] which was 16,000 only in December 2009 reported by Statista [5]. We are expecting thousands of applications on monthly basis on Google play store [4].
But above we only discussed about applications now talk about hardware resources which are used to run such applications how improved the hardware is?
We can observe that mobile processors enhancing and got efficient and faster day by day we can see it’s real example in our daily life such as multi processors. If we talk about screen resolution it is increasing day by day in initial phone dotted display was clearly observed but these days, we can see that high screen resolution increasing day by day. we can see quality of sensors increasing day by day we can see enhancement of GSM technologies in shape of 4G networks that allows 100 Mbit/s increased from 14.4 Kbit/s, Bandwidth of Wireless network got increased.
Now these days Smartphone providing fast processing more memory capacity efficient sensors but a problem which is still unsolved which is battery drainage to tackle this issue manufactures install batteries having maximum capacity but still User’ Applications put heavy burden on battery which leads it to early drainage. But how better it is that if we tackle it through a new technique offloading Computation.
Here we presenting cuckoo system to save energy and make devices more efficient in less power.
Cuckoo provide a very simple programming model which is designed for mobile environments. It supports both local as well as remotely execution moreover it also includes bundling remote and local code in single package. Cuckoo can be easily integrated with existing development tools which are familiar to programmers and developers. It provides a facility of collecting remote resources which can include laptops, cloud resources and home servers on behalf of Smartphone user.
Contribution by this paper:
It is shown in paper that computation offloading can be implemented elegantly, if existing Operating System differentiate between user oriented activities and computational background services.
It is presented that Cuckoo is a computation offloading for Android, which include runtime system. It can behave as a resource manager Application for user and can behave as programming model for developers. Runtime system supports custom implementation remotely to optimize resources. Its main Goal is to be configured for minimizing energy usage and maximizing Computation speed.
We Include two real Life example application to evaluate the frame work.
Outline:Section 2 include discussion on Android operating system, a platform we selected for research. Section 3 include design of cuckoo framework, Section 4 include details of implementation. Section 5 include evaluation of our system by using two real time applications. In Section 6 we conclude our paper.Background: Android
Before designing and implementation of cuckoo we need to understand working of Android operating system we need understanding of application’s working internally on operating system.
Android is an open source Operating system which provide facility of key applicationsto target smartphone and other devices by installing them.
Open Handset Alliance developed Android operating system with Google as a key participant. Java used to design Android application and after designing it converted in Dalvik bytecode which can run on Dalvik Virtual Machine.
2.1 Android IPCFigure 1 A structured overview of Android IPC Mechanism. An activity binds with kernel to get services and get proxy as a response where in other hand android set up service named as stub. Subsequent methods invoked on proxy by activity. It will be routed by kernel to stub that contain actual implementation of methods.
2.3 Android Application Development
Java language is used to write android Applications in any editor. Recommended IDE is ECLIPSE [6].
Eclipse provides environment that include syntax highlighting, attractive graphical user interface and auto code completion etc.
• Android resource Manager: it is used to generates java files to access resources easily for example images, audio and layout definition.
• Android Pre-Compiler: it generates java files with the help of AIDL files.
• Java Builder: it compiles source code and generate bytecode as a output.
• Package Builder: It helps to bundle the resources, byte code and application manifest in a single file. After successful building an APK file generated which is further installed on devices supporting Android Operating System.
- Cuckoo Design
We found after an initial research on computation offloading that it is a technique which is useful to increase performance and efficient usage of battery during usage of heavy applications. Offloading technique is a challenging to implement as it requires extra skills and efforts from developer side. We can minimize this effort using some techniques below
• providing simple programming model to support local, remote execution and bundling it in single package.
• Supporting existing development tools
• by automation of large parts of development process.
• Providing simple way to user for resource collection such as laptops, home servers and other cloud resources.
3.1 Programming model
Cuckoo provide programming model to Application developers which is a key contribution. This programming model is easy to use easy to under understand because it acts as and intermediate layer for interaction of developer and system.
Our smartphones cannot be always connected to internet or networks to access cloud resources so this programming model supports local as well as remote method implementation. In Such a way application, will behave in both remote and local to fulfill user’s requirement. Parallelization can be used to get full performance by using local as well as remote resources. Initially this implementation behaves like a dummy implementation, which will be replaced by developer to make it working in real time environment it may be completely different because it has to work in real time environment and will work on another algorithm to run in parallel.
3.2 Integration into Building process
Two Eclipse builders and Ant [7] build file is provided by the Cuckoo framework which can be inserted into an Android project’s builder configuration in Eclipse IDE (Used to develop android application).
First Cuckoo builder named as Cuckoo service rewriter is invoked before java builder and after Android Pre-Compiler so that it can decide that this method will invoked locally or remotely to access resources.
Second Cuckoo Builder named as Cuckoo remote service driver which is used derive dummy remote implementation from AIDL interface which is available.
Ant file build file built by Deriver that helps to build jar files contain remote implementation that is installable on cloud resources (remotely). A structured overview of integration of Cuckoo componentsin default Android build process is shown in Figure 2, whereas order of development process shown in Table 3.1.
3.3 Integration into the Runtime Invocations to services are intercepted at runtime on server side at stub. Then Cuckoo method will decide about the method whether it’ll be invoked locally or remotely. Cuckoo framework will request for available resources to use from Cuckoo Resource manager so it can use it.
3.4 Cloud Resources
For offload computation, an application use Cuckoo to offload its computation to any resource that support java virtual machine, that might be on commercial cloud or mini cloud i.e. laptops, PC, workstations or local networks. User runs simple application with the help of server which enable computation offloading.
Sr. actor action
1 Developer Designing & creating application (source code)
2 Developer Defining interface for services
3 Build system Provide dummy implementation with the help of stub/proxy pair
4 Developer Deploy local services and remote services
5 Build system APK file generated after compilation
6 User Install APK file on smartphone
- Implementation
Implementation is one of the significant step. Here we are explaining and elaborating some important steps for Implementation of "Cuckoo Framework. How by using remote resources between phone and Remote resources can be applicable, is described in this section. All these implementation needs a well-defined steps and procedure. The end portion contains information about How the Cuckoo framework can be used in different configurations.
4.1 Intelligent Offloading
When the service is invoked due to some kind of activity, this call will be transferred through the proxy by the Android IPC mechanism. Proxy. Though usually the stub is actually acting as the invoking towards local implementation and then the proxy gets the result and the kernel Acts as a connecting device to the stub. The Cuckoo system cut off all method calls and
checks its beneficially for offloading the method invocation or not,using, context information and history. The heuristics techniques are used and they are very preferred though for remote execution. Context information being used here is for evaluating or checking whether remote resources are in reach or whether it iOS attainable or not.
Though usually the stub is actually acting as the invoking towards local implementation and then the proxy gets the result
4.3 Client / Server Protocol
.
The receive reports are being placed at the server in
the cuckoo framework and in that way, it handles the requests from the clients.
The server can be found by the client through ibis’ identifier and attach a sending port to similar or matching receive port ant server point for exchanging messages and they can be transferred explaining this process in an easy way you can say that client will request to the server for execution of a specific method and with specific arguments particular ones used for it and after then the result is returned to a receive pert which has been placed particularly of method invoking.
In that case, which is containing information about hen service is not working or during course of its unavailability the client should make installation on the server. By doing this and by sending a message or command the installation can be done the message sent for installation contains jar file which is created in the build process which is containing information about the external entity jars and server’s package name. All external information which is required is in it.
When the installation is done successfully on the remote service now the clients can invoke methods
The overhead of sending jars towards remote server is actually introduced after the installation of service .and it is a kind of unique activity occurring only once at a time that is providing one service only per invoke.
Mobile applications are used by clients in a multi environment dynamic you can say and this is a normal case that disconnection is faced sometimes due to failure in service. There are many reasons are these kinds of failures on of them may be due to limited coverage. Here is the benefit of cuckoo that it will solve such cases and disconnection will be corrected by it, cuckoo will always be available but with less preferred local implementation
4.4 Configuration of Cuckoo: Trade-offs
Cuckoo relies on some main configuration files
Done with this thing that how programmers can make and write remote implementations Now moving forward, let’s consider that how such implementations can be finally will be on the remote server
Now let us consider some different configurations i.e. of cuckoo on which it depends These implementations make it flexible and are beneficial in runtime providing services So it becomes also valuable and significant by making several connections with large number of appliances with different configuration and requirements. The factor of speed is kept under consideration. Though cuckoo can do late binding and early binding as well, If needed a small remote resource can be created Early binding will give best results when service methods are
invoked, the resource finding has done and remote methods can be invoked rightly. When late binding is done, it takes time for finding resource or resource discovery.
We need to avoid unnecessary or extra energy consumption and this can be done making lesser connections, which can occur during the time between the connecting
of task or activity to the service and the time when the service is wanted or in other words invoked. During this time, there is possibility of losing the connection, so in that case new connection making is necessary to reconnect it. There are some benefits as well that if we do binding earlier it optimizes for speed and responsiveness, and late binding or connecting
binding optimizes for energy consumption
A developer can specify
per service, whether the service is optimized for speed or for
energy usage.
The quicker response or responsiveness of the application can be made better by making its execution speed faster –
More over by multitasking the speed can also be made better such that executing in parallel and execution of tasks is done in that parallel working including the local implementation as well. The first most implementation ‘s result that returns, will then be transferred to the proxy
This method is consuming energy too much because at some place after execution there will be surely some kind of discarding of data ,in this way it is called as energy hungry as well .In the end , the programmer can configure single methods or functions of the service so that it will not be off loadable at all and thus it will be beneficial for example If methods needed to connect or interact with sensors on smartphone appliances.
- Two Applications
5.1 Eyedentify
Here we go with a multimedia content analysis application first example that is Eyedentify Its function is to perform the recognition of the images being captured through a camera of smartphones .The images taken in your smartphones are recognized by it .
Images are identified in the same way in Google in which you enter your required image and details about it are shown as we know that Google is very helpful for us specially when we need information it easily recognizes places ,images etc. and all can be some extent can be done
The application works by making the image into a kind of vector i.e. mathematically the picture or image is represented by geometrically using parameters and this algorithm is computable and also memory active or intensive and this is the reason it is used for offloading computation.
Many parameters are influenced by the algorithm its computation speed, time efficiency memory footprint etc. For example, a larger image will result in high quality. By these parameters, the quality can be increased or decreased and it is affected by them
Also, parameters may be connected to lessen
the memory space and computing needs and can affect in lessening the quality of feature vector and quality of object as well
In case of T-Mobile G-1 smartphone, with a 528 MHz processor and 16 MB it becomes impossible to implement our application’s idea though these have reasonable time, memory but the algorithm can’t work correctly due to some mathematical issues, for offloading computing we show here how it is speed up to factor of 60
Eyedentify parameters.
This table demonstrates how to convert into feature vector and its implementation.
Feature Vector quality is dependent on size of image if it’s is bigger the size will be bigger if small the quality will be less effective and vice versa. Fig shows highlighted terms.
round about 40, plus enhances recognition ‘s quality as well.
Cuckoo computation for Eyedentify has been written now we begin with the interface.
For a service that performs hosting of algorithms AIDL changes the picture or image
in a feature vector represented also by mathematically. After considering it we implement local
service that are suitable for the usage by the feature vector and considering by it.
Here Cuckoo made a dummy implementation for instance so in order to understand it in better way and we have replaced this dummy implementation with real one and that remote implementation performs high quality object recognition on large sized images and after creation of jar by cuckoo it is ready to be implemented on smartphones
When the application is objected to a image it then performs the process of identifying it without any network connection as well in this way you can say it is better than Google because Google though works very efficiently but its efficiently is all dependent on network connection as well in the application it works even without the internet connection .It is not network dependent however when in availability of network the application uses remote resources for speeding up the execution and moreover it also lessons the consumption of energy and bundling of client and server code provides benefit that they will stay compatible
5.2 Photoshoot
For second world wide Android challenge we go for it with the Photoshoot which is and augmented reality bases game and we stood at 6th position there Now introducing the game’s first one is Game action and arcade as name implies it a multiplayer real world game players have a time duration of 60 seconds to shoot 6 virtual bullets at the focus i.e. at each other though their smartphones camera .After the functioning will perform such that the face when recognized it will describe whether the bullet was on point or not ,The participant who hits firstly is the winner and the duel will be his .
The basic computing deep and complex functioning in the game is actually facial recognition on which the whole criteria is dependent .The Android framework provides face detecting algorithm which recognizes face by this algorithm .It implementation can be done by the framework under discussion one of the limitation here is due to memory that is algorithm works only for images to 3.2 Mega Pixels – which is low for modern smartphone and consumes round about 9s of compute time on Google ,1.0 GHz processor or 44 s on the old one T-Mobile. In fig, a screen shot of Photoshoot is shown.
Now discussing with Duel which is a augmented reality smartphone game consisting of two players who fight a virtual duel in real both have time duration and a specified number of bullets they shoot both with bullets and photographs are made which are shown and are then used for detecting purposes and evaluation is made from it .If it works slowly that is it gives slow results in finding whether the bullet was shoot or not it is considered a drawback .Using offloading slower phones can even get faster detection and provides a best resolution as well . The remote implementation is based on the Open Source Computer Vision library (OpenCV) and can, next to frontal
faces, also detect profile faces, and will therefore give more
accurate and best results. Here we need precise results and this depend is fulfilled.
- Conclusion
This paper is a presentation of Cuckoo which is a framework for computation offloading for smartphones. It is a latest technique which helps to reduce the energy consumption and increase computation speed.
Cuckoo can be implemented on the most famous platform called Android operating system with the help of ECLIPSE Development tool that provide a simple programming model which is already familiar to developers.it allows local as well as remote implementation. Cuckoo framework will decide at runtime whether this application will run on local resources or remote resource required.
This paper have evaluation of Cuckoo framework by two real time application named as Eyedentify and photoshoot that use computation offloading.
References:
[1] Andriod https://en.wikipedia.org/wiki/Android_(operating_system)
[2] IOS https://en.wikipedia.org/wiki/IOS
[3]Facebook https://play.google.com/store/apps/details?id=com.facebook.katana&hl=en
[4] Google Playstorehttps://play.google.com/store
[5] Statistahttps://en.wikipedia.org/wiki/Statista
[6] Eclipse IDE https://eclipse.org/ide/
[7]Ant File https://www.tutorialspoint.com/ant/ant_build_files.htm
The faster you go, the shorter you are.
- Albert Einstein
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @attiqueurrehman! You have received a personal award!
1 Year on Steemit
Click on the badge to view your Board of Honor.
Do not miss the last post from @steemitboard:
SteemitBoard and the Veterans on Steemit - The First Community Badge.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @attiqueurrehman! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Vote for @Steemitboard as a witness to get one more award and increased upvotes!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit