P R -

advertisement
PROJECT REPORT - CS 8803 (AIA)
M-SHARE – SOCIAL NETWORKING ON MOBILE DEVICES
GROUP MEMBERS:
HARESH AVHAD
NEHA DEODHAR
ANKUR PAI
NEHA SHEVADE
INTRODUCTION
Interactive computing field has always been an area of interest and the development in mobile
technology further makes this field important to the industry. The development of mobile devices
has been fast-paced and drastic in the past few years. From an era where mobile devices were a
novelty we have come to an era where mobile device has become a necessity. Almost every person
today carries a mobile device. Although the basic aim of mobile phones was communication, mobile
devices have been explored to provide features like sending messages to other mobile devices,
connecting to the internet, sharing photos and videos( via Bluetooth and certain software) etc. These
features are greatly used by any average mobile user.
Another technology that is being widely explored by an average internet user is Social Networking.
Social Networks have become one of the most upcoming technologies in the interactive computing
field. The main aim of Social Networks is to get like-minded people having common interests to
chat with each other, share photos, videos, comments, chats etc. Social networking is a great way to
keep I touch with people (friends, family etc.) not within your vicinity. It is also a good way to make
new friends and this feature is extensively being used by people all over the world.
Our aim was to combine both the technologies mentioned above to create a mobile social network
which is hyped to be the next upcoming field in the industry. The main features of this technology
are that they allow users to communicate with their friends and colleagues through a social network
over the mobile phone. The biggest advantage of this is that it allows the user to stay in touch with
his friends without access to a computer. Furthermore, the social networking idea over the mobile
phone can also be extended further to provide features like spatial alarms, location based tracking
etc.
Hence we have built a mobile information sharing application that allows users to share files. These
files may be image files, videos, music etc. Currently we look at sharing only image files with
extension like JPEG,PNG etc.
MOTIVATION
The main motivation behind the development of M-Share was to provide mobile users to share files.
The structure of the system is based on Social networks. Currently mobile social networking tools
provide users to share photos by connecting to the internet and uploading pictures to some site. Our
aim was to help share these photos as a simple message between cell phones. Thus whenever a
photo is uploaded to a particular group by a user, all the other members of that group get a message
immediately on their cell phones. Also currently for cell phones to be able to share files, they need
to be connected to the internet. Most of these phones require a specific browser to do the same.
Another motivation for the project was to provide an image sharing functionality to mobile devices
that do not have browser support.
Another major issue affecting mobile devices today is the limited memory available on the device.
Hence currently it is not possible to store a large number of photos without using client memory.
Hence we provide a system which allows you to access large number of photos without using up
memory on the client. The photos are stored on the server side and the client can have access to
these whenever he wishes to view them.
Lastly we were interested in exploring the mobile application development platform called Android
by google. Hence our client side application is based on this Android application.
RELATED WORK
In a web based social network, one or more individuals of similar interests or commonalities,
converse and connect with one another. A few years back, the idea of social networks was extended
to mobile phones. This provides all the features of web-based social networks on an individual’s
cellular phone.
Under the Cingular deal subscribers get short text messages when new comments or friend requests
get posted to their MySpace profile.
Also, special phones called Helio phones include applications that make it easy for customers to
view friends' profiles and post comments and photos onto MySpace. This was the first step of
adding social networks to mobile applications.
Using this as a baseline, another cellular company called Rave Wireless came up with a mobile social
networking application that allows students to connect to their teachers, faculty, fellow students and
even the campus security. Faculty and teachers can notify students about changes in assignments or
schedule for the class. Students can also conduct online chats with their professors. Also, in case of
emergency, security alerts can be provided to all the students. Students can also collaborate with
each other by sharing files with one another.
Rave Wireless, the leading provider of reliable safety applications for mobile users has made
marketing toolkits available to university clients to help increase student body participation in
campus-wide mobile software and emergency alerting initiatives. Rave's mobile application suite
includes the only two-way safety solution complete with inbound and outbound emergency alerting,
as well as applications that promote mobile learning and mobilize student services. Rave's marketing
toolkit is designed to help university partners address the industry-wide challenge of student
enrollment.
Currently, there are various applications which allow their users to upload photos from their mobile
phones to some photo sharing application on the web. Examples of these are ShoZu, Treemo,
Yahoo! Go Flickr etc. Each of these applications allows their users to upload their photos to photo
sharing applications like Picasa, SnapFish, Treemo etc. Pickle is another photo sharing mobile
application which allows users to load their photos to a central spot and then distribute the photos
to all the people subscribed to Pickle.
Mobile video sharing is a new technological and social trend. A special mobile video sharing portal
MYUBO has been launched in June 2007 powered by the technology Upload-n-Watch developed by
the company Tom Horn Enterprise. myZenPlanet has launched a mobile product that aggregates
video-sharing and photo-sharing sites like YouTube, Metacafe, Flickr , and media entertainment
sites like VH1 and MTV. South African based Mobile Social Network mobimmi.com contains
traditional social network features like IM Chat as well as user generated content for sharing,
including music, images and videos.
FEATURES
Client Side Features:
Allows users to create new groups
Allows the group administrator to add new members to the group
Allows users to quit a particular group
Enables users to send photos to a group
Enables users to view photos uploaded to a group by using a pull based approach. In this
approach android users can log on to the server and choose an image from a list of images
and view it on their phone
Allows users to view pending requests and accept/reject group requests
Users can transfer images of different types like .jpg, .png, .bmp etc.
Server Side Features:
Provide server side authentication
Store photos uploaded by clients in appropriate groups
Add/delete members from groups
Provide authorized access to photos
Pull out the images in byte format from the database server for easy and successful
transmission to the clients
ARCHITECTURE DESIGN
The system is based on Three Tier Architecture. Apache Tom Cat is used as the Web Server. Java
Servlets are used for the client-server communication. The three tier architecture consists of a
Client-Server architecture and a Server-Database Connectivity. The database used in our application
is MySql. Steps involved in sending requests from client to server to retrieve information from the
database are as follows:
When the client sends a request to the server, the corresponding java server page from the
server is called. The contents of this page are then displayed through the web server.
The java server pages implement the back end by making a connection to the database and
retrieving the information requested by the client.
There are two methods available to send data to the server using HTTP pprotocol,
rotocol, namely
post method and get method
method.. The get method passes parameters to the JSP on the server via
the URL itself. Whereas the Post method actually creates a separate channel to pass the
parameters to the server along with the URL.
The JSP on the server in turn connects to the MySql database. The server queries various
tables on the database to retrieve the information requested by the clients.
This information is then sent back to the client using the get or post method.
Database
M
M-Share Architecture Design
Thus as seen from above,, since there are three components and two connectivity’s,
connectivity’s this architecture
is called Three Tier Architecture.. This architecture has a few advantages.
It is easier to modify or replace any tier wi
without affecting the other tiers.
Separating
arating the application and database functionality means better load balancing.
Adequate security policies can be enforced within the server tiers without hindering the
clients
DATABASE DESIGN
M
M-Share Database Design
Our database contains the following tables:
Users: In this table we store Username, First and Last names of users. Here, Username is
the Primary Key.
LoginInfo: In this table we store Usernames of users and their corresponding passwords.
Here, the usernames are matched with the usernames stored in the Users table.
Groups: In this table we store Group_id, Group_Name and the Owner of the group.
Group_id is the unique identifier of this table.
Group 1…Group N: We have a separate table for each group. We store the Usernames of
users belonging to different groups in the respective group tables.
Group1_Content…GroupN_Content: We have a separate table for each group content.
Here we store Image_Content which is the content of the image stored in bytes in the Blob
object (Blob is the data type used to store non text data like images, videos etc.)
We also store the Type of the image, Image_id which is the unique id for this table and
Image_Name.
Pending_Request_Group: Here we store the Group_id which is matched with the id from
the Groups table. We also store the username of sender and receiver of the request.
ANDROID PLATFORM
The Android platform is a software stack for mobile devices including an operating system,
middleware and key applications. Developers can create applications for the platform using the
Android SDK. Applications are written using the Java programming language and run on Dalvik, a
custom virtual machine designed for embedded use which runs on top of a Linux kernel.
Features:
Application framework enables reuse and replacement of components
Dalvik virtual machine is optimized for mobile devices
Integrated browser based on the open source WebKit engine
Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the
OpenGL ES 1.0 specification
SQLite for structured data storage
Media support for common audio, video, and still image formats (MPEG4, H.264, MP3,
AAC, AMR, JPG, PNG, GIF)
GSM Telephony, Bluetooth, EDGE, 3G, and WiFi (hardware dependent)
Camera, GPS, compass, and accelerometer (hardware dependent)
Rich development environment includes a device emulator, tools for debugging, memory
and performance profiling, and a plug-in for the Eclipse IDE
Application Framework:
The application architecture is designed to simplify the reuse of components. Any application can
publish its capabilities and any other application may then make use of those capabilities (subject to
security constraints enforced by the framework). This same mechanism allows components to be
replaced by the user.
Underlying all applications is a set of services and systems, including:
A rich and extensible set of views that can be used to build an application, including lists,
grids, text boxes, buttons, and even an embeddable web browser
Content Providers that enable applications to access data from other applications (such as
Contacts), or to share their own data
A Resource Manager, providing access to non-code resources such as localized strings,
graphics, and layout files
A Notification Manager that enables all applications to display custom alerts in the status bar
An Activity Manager that manages the life cycle of applications and provides a common
navigation back stack
Android Runtime:
Android includes a set of core libraries that provides most of the functionality available in the core
libraries of the Java programming language.
Every Android application runs in its own process, with its own instance of the Dalvik virtual
machine. Dalvik has been written so that a device can run multiple VMs efficiently. The Dalvik VM
executes files in the Dalvik Executable (.dex) format which is optimized for minimal memory
footprint. The VM is register-based, and runs classes compiled by a Java language compiler that have
been transformed into the .dex format by the included "dx" tool.
Linux Kernel:
Android relies on Linux version 2.6 for core system services such as security, memory management,
process management, network stack, and driver model. The kernel also acts as an abstraction layer
between the hardware and the rest of the software stack.
IMPLEMENTATION DETAILS
The basic implementation of the structure is briefly explained below. The system is based on a basic
client-server architecture. The client side is developed on a mobile application development platform
called Android. The coding language used on Android is Java. The coding language used on the
server side is also Java. Java Servlets are used to provide connection between client and server.
Apache Tom Cat is used to provide the Web Server. The database used to store the image files, user
information, group information etc is MySql.
The basic implementation of the main screen is as shown above. This screen appears after the user
successfully logs into the system. The login authentication is done on the server side. Once the user
has successfully logged in, he/she has an option of sharing pictures, viewing pictures, creating new
groups, adding new members and viewing pending group requests. Each of these will be explained
in details below.
Viewing Pictures:
Once a user is certified as an authenticated client, he has an option of viewing the photos from all
the groups that he is a part of. Once the user clicks on the view photos tab, a drop down list appears
with a list of all the groups that this particular user belongs to. The steps that take place on the
server side are as follows:
The client selects the Group from which he wishes to view the photos.
The server queries the database on the group_id of this group(which is unique) jointly on the
tables Groups,Group<id>_content and Group<id> and retrieves a list of images available
in that group. The list of images is then sent to the client-side.
On the client side, another drop down is presented which will display the list of images
retrieved from the server.
The client selects the image he wishes to view from the dropdown box. This image name is
then sent to the server.
The server queries the Group<id>_Content table to retrieve the required image from the
Database. This image is then forwarded to the client.
The client then displays the image received from the server on the display.
Sharing Photos:
Once a user is certified as an authenticated client, he has an option of sharing photos with other
members of the groups of which he is a part of. When the user clicks on the share photos tab, a
request is sent to the server side. The steps are as follows.
When the client clicks on the share photos tab, a request is sent to the server to retrieve the
list of groups of which the client is a member. This is done by the server by querying table
Group<id> on the username of the client. A list of group names of which the client is a part
of is retrieved. This list is then sent to the client.
The client displays this retrieved list of groups to the user. The user then selects a group with
which he would like to share the photos and also gives the path to the image that is to be
uploaded.
A request is sent to the server to upload that image to the specified group. The user then
inserts the image into the specific group table by first getting a group_id by querying the
GROUPS table and then issuing an insert command on the corresponding
Group<id>_contents table.
The client receives a confirmation from the server upon which a message of image
successfully uploaded is displayed to the client.
Create New Group:
Once a user is authenticated as a client at the server, he has an option of creating a new group. The
steps in the process are as shown below.
When the client clicks on the Create New Group tab, a new form of android is provided to
the use.
The user then provides a name for the new group and the request is submitted to the server.
The server makes an entry to the Groups table by providing it with a unique group_id,
recording the name of the requesting client as the owner and also recording the group name.
The server also creates a Group<id>_ content for that particular group_id. The server also
creates a table called Group<id> where the username of the requesting client is added as a
member.
On getting a response from the server the client displays a message of Group successfully
created.
Adding New Members:
Once a user is authenticated as a client at the server and has created a new group he has an option of
inviting/adding other members to this group. The steps in this are as follows.
On clicking the add new members tab, the client is redirected to another form. On this form
the client specifies the username of the member he wishes to add to his group. On clicking
the submit tab, the request is sent to the server.
The server makes an entry of this request into the pending_request_table by adding the
requesting client as the sender, the username provided to be added as the receiver and the
group_id.
On receiving a response from the server the client displays a message saying a request has
been sent to the requested person
Viewing Pending Requests:
The authenticated user also has an option of viewing the requests sent to him by others to join
various groups. The steps for the same are as follows.
When the client clicks on the view pending request tab, a request is sent to the server.
The server queries the pending_request_table on the username of the requesting client to
retrieve a list of requests pending for that client. This list is then sent to the client.
The client displays this retrieved list to the user. On clicking on a particular request, the
client gets an option of accepting or rejecting the request.
If the client clicks on accept, a request is sent to the server to add that entry to the database.
On receiving the request, the server adds the username to the appropriate group<id> table
for that particular group. The server also deletes the corresponding entry from the
pending_request_table of that particular client.
TECHNOLOGIES USED
JAVA: As explained earlier Android is a Java enabled phone so Android applications are
Written using the Java programming language and run on Dalvik, a custom virtual machine.
Hence we have used Java as a front end language.
MySQL: We have used an open source database, MySQL for backend due to its simplicity.
Apache Tomcat: We have used Apache Tomcat as the Web Container / Application Server
for clients to communicate. Apache Tomcat powers numerous large-scale, mission-critical
web applications. Tomcat implements the Java Servlet and the Java Server Pages (JSP)
specifications from Sun Microsystems, providing an environment for Java code to run in
cooperation with a web server.
EVALUATION AND TESTING
We have tested and evaluated our project on the following factors:
Scalability
The amount of request that the server can handle at a time, without loss of information
provided by any of its clients has been measured. The numbers of requests depend on the
amount of memory available at the server in order to handle flood of requests.
Evaluation is done on how the server addresses the problem when there isn’t enough
memory on the cell phone of the receiving client to receive the sent items.
Time and Space Evaluation
The amount of time required to send the photo or video files from the sending client to the
receiving client is also evaluated. This depends on the size of the file that is being sent and
also on the server load. The average time is calculated. Also the maximum size of the file
which can be sent by the client is also evaluated. The maximum file size is 2GB as the blob
object holds data up to 2GB. We have used unit testing as well as stress testing to come up
for our evaluation.
Finally, a tradeoff is made between the time required to send a file and the maximum size of
the file to achieve better performance.
CONCLUSION:
M-Share is thus a photo sharing application based on mobile social networking. It allows users to
share photographs across mobile phones without using browser support i.e. the application is
supported on mobile devices which do not have in built browsers. Hence both the advantages of
mobile devices and social networking technology have been captured in this application. This
application is a basic structure for taking advantage of this mobile-social network collaboration.
The hands-on experience of working on this project taught us a lot of new technologies. Firstly we
got hands on experience on working on mobile application development platform called Android. It
gave us a chance to explore the various features provided in Android, and actually implementing the
application on a mobile simulator. Secondly, the project also increased our knowledge of web
applications. Along with Apache Tomcat, we also got an experience in coding Java Servlets and Java
Servlet Pages. In addition to the technologies learnt, it was a very good experience to work on some
application which was based on something that we use daily in our lives for e.g. social networks and
mobile devices. Since we have used Bluetooth and MMS enabled phones to transfer image files
across mobile devices over a short range, it was a different and challenging experience to come up
with a system that tackles the problem of sharing of files irrespective of the distance. Also coming
up with a system for mobile devices that do not have browser support was an interesting and
challenging to work with.
The concepts of client-server architecture were very useful in our project. The basic advantage was
from the papers on web applications like web servers, web proxies and web caching, and web
pre-fetching. But the main motivation of the project was the papers on Social Networks and
Web2.0/Web3.0. These papers cleared many concepts about social networks and provided us with
the basic background on which the structure of our project is based.
Topics like Mobile Privacy, WWW Workloads etc. taught during the course will be very useful in
adding future extensions for our project. The WWW Workloads will be especially useful while
tackling the scalability issues of the server. Also Spam and Denial of Service Attack papers will prove
to be beneficial while tackling unwanted requests and junk message clean up on the client side.
FUTURE WORK
Though we have completed the image sharing application successfully, there can be many extensions
to our project. Some of possible extensions are as follows:
Enable users to send group join requests to the group administrator.
Support sharing of videos and other media.
Improving server scalability.
Allow Senders to filter out members from a particular group before sending data.
Allow Receivers to filter out members from whom they don’t want to receive data.
If for some reason there is not enough space available on the server/client i.e. the
server/client is overloaded, then a buffer can be maintained to store the data temporarily
and repeatedly send data until success or for a maximum number of attempts.
REFERENCES
[1] Information on mobile social networking http://en.wikipedia.org/wiki/Mobile_social_network
[2] Google Android, http://code.google.com/android/
[3] Pickle – a photo sharing application, www.pickle.com
[4] MySpace Mobile, http://www.myspace.com/attmyspacemobile
[5] Rave Wireless – A campus mobility application, http://www.ravewireless.com/
[6] Apache Tomcat - http://tomcat.apache.org/
[7] Albrecht Schmidt, Paul Holleis, Jonna Häkkilä, Enrico Rukzio, Richard Atterer, “Mobile Phones
as Tool to Increase Communication and Location Awareness of Users”, ACM International
Conference Proceeding Series; Vol. 270, Proceedings of the 3rd international conference on
Mobile technology, applications & systems
[8] Rui Li, Shenghua Bao, Yong Yu, Ben Fei, Zhong Su, “Towards effective browsing of large scale
social annotations”, ACM, Proceedings of the 16th international conference on World Wide
Web
[9] Risto Sarvas, Mikko Viikari, Juha Pesonen, Hanno Nevanlinna, “MobShare: controlled and
immediate sharing of mobile images”, ACM, MULTIMEDIA '04: Proceedings of the 12th
annual ACM international conference on Multimedia
[10] Petros Belimpasakis, Juha-Pekka Luoma, Mihaly Börzsei, “Content sharing middleware for
mobile devices”, ICST (Institute for Computer Sciences, Social-Informatics and
Telecommunications Engineering), MOBILWARE '08: Proceedings of the 1st international
conference on MOBILe Wireless MiddleWARE, Operating Systems, and Applications
Download