CSE591 Midterm Report
Distributed OSGi Application Platform for MobilCloud
Group member: Xinyi Dong, Long Qiu
-
Project goal
Aimed to fulfill SOA (Service Oriented Architecture) and CBA (Component Based Architecture), this project will build up Distributed OSGi framework for mobile phone and virtual machines. Not only will this project set up the OSGi platform, but also it will build up network module which enables the communication among different OSGi frameworks over Internet. Further, it will implement service transition bundle that bridge various objects in different frameworks to collaborate seamlessly. Moreover, it will provide some demo cases showing how the framework works to guide future work.
-
Project Tasks
-
Setting up Distributed OSGi framework on virtual machine.
-
Setting up Distributed OSGi framework on Android phone.
-
Develop network bundle.
-
Develop service transition bundle.
-
Develop demo bundles which utilize built platform to show its strength.
-
Roadmap of the project (midterm/final)
TASK
|
2/6
|
2/20
|
3/4
|
3/18
|
4/1
|
4/15
|
5/1
|
5/12
|
Task 2.1
|
|
|
|
|
|
|
|
|
Task 2.2
|
|
|
|
|
|
|
|
|
Task 2.3
|
|
|
|
|
|
|
|
|
Task 2.4
|
|
|
|
|
|
|
|
|
Task 2.5
|
|
|
|
|
|
|
|
|
(Red denotes “Completed”, Grey denotes “Todos”)
-
Technical Details
Task 1: Setting up Distributed OSGi framework on virtual machine. (100% done)
OSGi framework we are using is Felix OSGi. Currently, D-OSGis are running on Window 7 system. However, it’s an easy task to transplant to Linux system or Unix system which is holding by VMs.
Task 1 details:
There are 2 steps to finish this task.
-
Setting up the OSGi Framework in the computer:
1.1 Configure Felix OSGi implementation.
1.2 Learn and user Felix independent command to control bundles.
1.3 Since Felix OSGi implementation only contains basic bundles, in order to be familiar with the framework, we went through OSGi bundle tutorials and created some bundles.
-
Install the neccesary bundles which are used for different OSGi’s frameworks’ communication.
Actually, they provided 2 options for Distributed OSGi.
option 1: Multi Bundle Distribution
This distribution is a zip file containing the Distributed OSGi bundles, as well as all their dependencies.
option 2: Single Bundle Distribution:
This is a convenience distribution of a single bundle that embeds all the dependencies.
We chose option 2 and install the following bundles:
Task 2: Setting up Distributed OSGi framework on Android phone.
Task 2 details:
Technically, we think this task can be decomposed into following steps:
-
Transfer the Felix OSGi framework jar files from java machine code to Dalvit machine code.
-
Transplant these files into Android device (currently, we’re using android emulator).
-
Transfer the bundles which enable the Distribute OSGi framework.
-
Run the Distibuted OSGi bundles on Android.
Detail for each step:
-
First of all set up the environment variable for android emulator manager and SDK.
Install and configure android SDK tools in windows environment variables to enable android SDK command.
-
Firstly, do the ‘dx’ command like following to transfer Java machine code to Dalvit machine code:
dx --dex --output=classes.dex JAR_file.jar
-
Then combine the jar file with the generated .dex file by command:
aapt add JAR_file.jar classes.dex
-
Then we use ‘Android Debug Bridge’ command to transfer the data from computer to android device:
db push JAR_file.jar path_emulator/JAR_file.jar
-
Once we have pushed all the neccesary bundles into Android phone, we can use following command to launch Felix OSGi:
sh felix.sh
-
Then we control the bundles related to Android SDK in the Felix framework.
-
We made Felix OSGi framework running on Android system.
-
Difficulty Encountered:
We configured the Distribute OSGi bundle and made it running correctly on PCs. Then we transferred these jar files into Dalvit machine code, and pushed these bundles to Android system.
However, following errors occurred: (screenshot)
Task 3: Develop network bundle. 50% done
Task 4: Develop service transition bundle. 100% done
Task 3 & 4 details:
We successfully tested that different OSGis running collaboratively on different OSGi Framework on PC.
There are two options for constructing Distributed OSGi:
Option 1: Multi Bundle Distribution
This distribution is a zip file containing the Distributed OSGi bundles, as well as all their dependencies.
Option 2: Single Bundle Distribution:
This is a convenience distribution of a single bundle that embeds all the dependencies.
We chose option 2 and went through tutorial provided in
http://cxf.apache.org/distributed-osgi-greeter-demo-walkthrough.html
http://cxf.apache.org/dosgi-spring-dm-demo-page.html
Screen Shot: (Here needs a screen shot)
We instructed 2 OSGi framework: Equintox and Felix, Equintox remote call the function in Felix.
Screen shot:
-
Expected Outcomes
This project will set up the OSGi framework among the MobiCloud system, providing a more scalable programming environment for more applications. Further, based on the framework, we’ll give some demo code to illustrate how it works.
Share with your friends: |