When developing some applications on Android, developers often find that if we want the Android Operation System(hereinafter referred as Android OS) to do some complex works such as huge computations, the results are always unsatisfied. The other problem is, Android OS was used in many kinds of mobile devices and the hardware condition of these devices are very different, so the speed of these executions are very slow and are hard to be beard by them. The worse matter is, there’s few way for us to  find an alternative way to solve the problem. Because many functions have been encapsulated in android APIs, that means developers only have few ways to realize some specific functions that they want their applications include. Finally they either endure the speed or cut some functions to escape any spots on their applications. However, these are both unwise solutions for such problem which will make their client unhappy and give up to use applications of them or their company. This is a big hidden danger to financial loss.

So it’s necessary to develop a system that can improve the performance of applications without damaging its functions. And it also should become a platform that can provide general service to any Android applications.

However, the mobile cloud platforms are almost totally rely on the server. It’s not always a good choice for the fastest speed for the application. So this problem frustrated many developers include me. Once when I developed an Android project called Android Blind Navigation System, there’s a module that need to open the camera and do some image processing. When I run it on my smart phone, although it can be executed successfully but it executed so slow that it can’t meet the purpose which I planned at beginning. I change the algorithm but it didn’t have much changes to my application. Finally I cut down many functions to make it fluency but it made me feel not very good.

Above all, I decide to develop a system that can improve the speed of application as fast as possible. And it can also become a service that can be used by any developers who want to improve the performance of their applications.

Our Solutions

In order to solve this problem, I intend to develop a cloud compute system on Android OS to let the application, especially the complex parts, not only can execute on Android OS but also can be transferred to the remote servers for execution so that the server can share responsibility for the stress added to the Android OS. I plan to research an algorithm to find the fastest way to finish the work by deciding where to execute every part of the application.

First of all, it’s not easy to divide an Android application into many parts which can be freely transferred to server. Every Android Application run in a virtual machine called Dalvic VM and it’s almost impossible to send a part of itself to the server if we only use traditional methods to develop Android application. To this problem, I plan to solve it by a new technology called OSGI. The OSGi (Open Service Gateway initiative) specification describes a modular system and a service platform for the Java programming language that implements a complete and dynamic component model. [1] Bundle looks like a normal jar in Java, but it’s not just a jar. It can be remotely installed, started, updated and uninstalled without requiring a reboot and it can prevent many problems brought by jar such as the confliction of package. There are three realized frameworks of OSGI technology: Equinox, Knopflerfish and Apache Felix. Apache Felix is a community effort to implement the OSGi Framework and Service platform and other interesting OSGi-related technologies under the Apache license. Transplanting this framework into an Android Service, then it can be used by any Android Applications which meet the OSGI lisence.  And it’s also one of the most difficult parts because using OSGI means we have to divide a project into many bundles. And every Android application run in its own VM and can’t be easily exchange information with each other, so we should use AIDL to make them exchange information with the other bundles by the service.

Second, evaluate and choose the execute environment. In this part, the major mission is to find a way to estimate the best way to execute the bundles, on server or on local. The speed of local and server should be compared, include the CPU execute speed, the network speed, the transportation speed of bundles, the amount of bundles, etc. If it should be executed on local, there’s no difference to a normal Android Application. And if it should be executed on server, that means the bundle should be handled more than local. It’s the hardest and important work for this project, for the standard of speed is difficult to find and the influence factors are too much to be measured, some elements even are fluctuant such as the network speed. An overall viewpoint must be hold in case the change of the elements slow down the speed. Average is the basic method, but it’s not calculate enough. Instead, statistics knowledge such as regression equation can help us to get the most suitable way to deploy the bundle. In addition, just do these theory is not enough for this problem, we also need experiments to explore the fastest way because the fact is often out of imagine and it’s almost impossible to think all elements just by brain. About the experiment and test research, I will discuss it at the final section of this paper.

The OSGi framework provides a service management system that can be used to register and share services across the bundles and decouple service providers from service consumers. However, to allow remote access, R-OSGi (Remote-OSGI) is necessary. R-OSGi allows a centralized OSGi application to be transparently distributed at service boundaries by using proxies, existing OSGi applications can be distributed using R-OSGi without modification [2]. So this is a good feature for extending some cloud service to communicate client-side with server-side to the Android OSGi system without doing any additional works. Above all, R-OSGi is fast, its performance is comparable to the (highly optimized) Java 5 RMI implementation, and is two orders of magnitude faster than UPnPii. By using R-OSGi, it’s easy to maintain the integrity of the system and improve the speed efficiently.

Doing many experiments to guarantee if our theory is correct is the final step of this research. In this step, hundreds of programs will be used to collect the statistics in many kinds of situations. The final result will be draw into a picture to show the tendency of the execute speed. At the same time, a compare experiment in which the programs don’t use this cloud platform will be done to show how much speed up after using the platform. In theory, the more complex the program is the more speed promote will it have even can get to 45%.

After we finish it, we also aim to continuously improve our algorithm to make it more efficient to meet the requirement of clients. And we also want to transparent this platform to other mobile devices such as IOS and Windows Phone, it has a wide range to develop.

Paper Link

Demo1:

Demo2:

References

Bartlett, Neil. “OSGi in practice.”Bd (January 11, 2009) (2009).

Rellermeyer, Jan S., Gustavo Alonso, and Timothy Roscoe. “R-OSGi: distributed applications through   software modularization.” Proceedings of the ACM/IFIP/USENIX 2007 International Conference on Middleware. Springer-Verlag New York, Inc., 2007.

Chinese(中文版)

One thought on “OSGI-based Android Cloud Compute Platform(Published on IEEE)

Leave a Reply

Your email address will not be published. Required fields are marked *