Sei sulla pagina 1di 16

MOBILE CLOUD

COMPUTING IN
ANDROID
CLOUD COMPUTING?
Ø
Cloud computing refers to the provision of
computational resources on demand via a 
computer network, such as applications, databases,
file services, email, etc. 

Ø
To Store Data in the internet

Ø
Contains almost no software or data (perhaps a minimal
operating system and web browser only), serving as little
more than a display terminal for processes occurring on a
network of computers far away.
Ø
Major Cloud Service providers: Google by Google App Engine,
Picasa, Amazon be Amazon EC2,Server4you etc..

Ø
cloud computing frees users from certain hardware and
software installation and maintenance tasks through the use
of simpler hardware that accesses a vast network of
computing resources (processors, hard drives, etc.). 

The sharing of resources reduces the cost to individuals.


Ø

Ø
web-based email such as Gmail, Hotmail, Yahoo  is
considered a cloud application.
Cloud computing conceptual diagram
Why Mobile Cloud
Computing?
Click to edit Master text styles
Second level

Third level

Fourth level

Fifth level

Ø
Less memory space in mobile
Ø
Data Backup
Ø
Process Sharing
Ø
frees users from certain hardware and software
installation and maintenance 
Ø
Reduces maintanence cost
What is our project?
IMPLEMENTATION OF CLOUD COMPUTING IN
ANDROID OPERATING SYSTEM USING PICASA
FOR IMAGES
AIM:
Ø Storage in the cloud
Ø Providing services of different clouds
Ø To implement better and faster methods to
access stored data in the cloud
Design
Using Picasa as Cloud from Mobile
Android as a Host

Problem with using directly Cloud?


Ø Slow Connectivity
Ø Proxy server act as buffer
SOLUTION
Using proxy server as a local cache
IMPLEMENTATION
Application issues request to the server
Server responds correspondingly depending
upon Username and password stored in the
database
If Username is not found,new user account is
registered in the database and a new folder is
created where all data corresponding to that
user is stored
Application selects the service and do
corresponding actions
Android to Proxy server
connection(Client Side)
Connectivity is done using servlets
Connection is made using url and
OpenConnection method with the help of ip
address
Data sent and received using
DataOutputStream and InputStream classes
repectively
Android to Proxy server
connection(Client Side)
bytesAvailable = fileInputStream.available();
bufferSize = Math.min(bytesAvailable, maxBufferSize);
buffer = new byte[bufferSize];

// Read file
bytesRead = fileInputStream.read(buffer, 0, bufferSize);

while (bytesRead > 0)


{

outputStream.write(buffer, 0, bufferSize);
bytesAvailable = fileInputStream.available();
bufferSize = Math.min(bytesAvailable, maxBufferSize);
bytesRead = fileInputStream.read(buffer, 0, bufferSize);
}
Android to Proxy server
connection(Server Side)
To receive the image in servlet,type of the
client side type must be known
This is determined by mimeType
Get the input stream from the HTTPRequest
object
Convert the InputStream into Byte array
Create a FileStream for image file
Write the above object using InputStream
Android to Proxy server
connection(Server Side)
String mimeType = sc.getMimeType(filename);
if (mimeType == null) {
sc.log("Could not get MIME type of
"+filename);

res.setStatus(HttpServletResponse.SC_INTERN
AL_SERVER_ERROR);
return;
}
JDBC IMPLEMENTATION
Ø
It stores the user name and passwords of
different clients which are login concurrently
Ø
Maintains a unique path for every user
Ø
Maintains all photo name corresponding to
each user
Ø
Thus preventing from ambiguity……
ID UserName Password

ID PhotoName Path
Uploading image to picasa
To upload images to Picasa web album, we are using Google java
api.
The steps are..
1. Create a object of PicasawebService, which is needed to access the
web page in Picasa.
2. Get URL and setUsercrecidentials like username and password.
3.Set photo title and description .
4.Set the pathe name of the image.
5.Finally add it as media source and insert into obtained URL
Enchancements
Can upload videos on cloud
Services for multiple Clients under single
server