layered programatical api framework for real time mobile social network
TRANSCRIPT
Layered Programatical API Framework for
Real-Time Mobile Social Network
N.T.G.K. Padmabandu, P.A.I.U. Amarasekera, H.A.C.M. Hewagama, M.N. Dheerasinghe and L. Rupasinghe
Abstract— Mobile social networking is one of the most emerging concepts in the IT industry. Even though the internet is piling up
with social networking sites each day, with the large number of mobile devices being available in the market today, not only the
demand for the mobile application development has become very high but a huge requirement for mobile social networks has also
taken place. Real-time social networking which is the next level of social networking will open its doors to the community in the very
near future. This will be a huge leap in the IT industry that will enhance the lifestyle of the mobile users. Even though there is a huge
demand for development of real-time social networking applications, a proper framework to develop such applications is not yet
available. Therefore the objective of the Layered Programatical Application Programming Interface (API) Framework for Real-time
Mobile Social Network is to keep an initial step in providing an API framework to support the development of real-time mobile social
networking applications. This framwork consists of four main modules which are operating on different layers. Thus far, this is
capable of supporting mobile application development which perform match making based on Myers and Briggs and Big Five
personality models much efficiently and thereby increase the application developer’s productivity.
Keywords— Mobile, Social Networking, Android, Real- time,
Profile Matching, API Framework
I. INTRODUCTION
With the invention of smart phones, other portable devices
and vast usage of them, mobile social networking has become
an emerging concept in the IT industry [1]. Thus, a huge
demand for mobile social networking applications has taken
place and of course there are so many such applications
developed in the ad-hoc manner to fulfil the user requirements.
If this mobile social networking application development
could be supported with a proper framework, it was identified
as a useful conception. The Layered Programmatical API
Framework for Real-time Mobile Social Network provides a
framework and application programming interfaces (APIs) for
android developers to develop social networking applications
that perform matchmaking in a real-time environment.
N. T. G. K. Padmabandu was with the Sri Lanka Institute
of Information Technology, Malabe Campus, Malabe,
SriLanka (e-mail: [email protected]).
P. A. I. U. Amarasekera is with the Sri Lanka Institute of
Information Technology, Malabe Campus, Malabe, SriLanka
(e-mail: [email protected]).
H. A. C. M. Hewagama was with the Sri Lanka Institute of
Information Technology, Malabe Campus, Malabe, SriLanka
(e-mail: [email protected]).
M. N. Dheerasinghe was with the Sri Lanka Institute of
Information Technology, Malabe Campus, Malabe, SriLanka
(e-mail: [email protected]).
P. L. Rupasinghe is with the Department of Information
Technology, Sri Lanka Institute of Information Technology,
Malabe Campus, Malabe, SriLanka (e-mail: [email protected]).
This reduces the workload by increasing the re-usability
and makes it easier for the developers to develop applications
on top of it. It also helps the android developers to develop the
applications that fulfil the obsessive requirements of the
android users as this concept has become trendy and is about
to lead the application market in the near future.
The existing social network sites mostly focus on making
friends and sharing the information among individuals. But
this framework facilitates the application developers to
develop applications that allow users to find the ideal person
for their business or relationships. Thereby people will not
have to go on seeking the kind of person that they currently
want to deal with, based on the situation. The other most
attentive feature of this system is that, it facilitates the
development of real-time applications. The applications
supported by this framework therefore help individuals to
meet the appropriate person according to their current
requirements and it opens a potential to develop and run these
kinds of applications on a larger number of mobile devices.
The layered programmatical API framework for real-time
mobile social network consists of four main modules; profile
matching, connection management, security management and
storage m anagement as shown in the figure1 below.
It also provides the relevant APIs thus the developers can
develop their own applications using them. The applications
that are developed using this API framework can be varied
and will help users to match their profiles with any other
authorized profile in a specific domain.
This framework is initially deployed on android mobile
operating system as android is the latest and upcoming
technology in the mobile industry. Even from the mobile
developers’ perspective android operating system (OS)
supports for application development more than that of the
other mobile OS and platforms as it is open source.
The main objective of this research is to provide a reusable
framework for mobile application developers to develop real-
time social networking applications where you need
matchmaking features based on Myers and Bgriggs and Big
Five personality models more efficiently. As a result well
developed real-time mobile social networking applications
will be available for the mobile application users and the
workload of the mobile application developers can also be
reduced.
II. BACKGROUND STUDY
Initially a substantial background study was conducted to
draw out the foremost idea for the project. Then it was
identified that the research should be focused on how to
enable real-time social networking features on mobile
devices. Then the research was split into two components,
“mobile operating systems” and “real-time social networking”.
Under the sub research area “mobile operating systems”,
the aim was to find out the best mobile operating system that
would provide the optimum support to implement the
aforementioned concept in the real world, based on the
availability, reliability, cost etc. It was inquired about the
existing real-time social networking applications, how they
were implemented, for how far those applications satisfy the
user requirements etc., under the next sub research area “real-
time social networking”. The outcome of the analysis of these
two areas were that, there is no proper way to develop real-
time social networking applications and if this concept is to be
implemented in the real world, the most appropriate mobile
operating system would be android mobile operating system.
Thereafter the research was focused on to find out the ways
to merge these two components into one. Then it was noticed
the necessity for a programmatical API framework for real-
time social networks. The further research on the newly
discovered area helped to identify four major constituents of
such a framework. Then the research was directed towards
each of those constituents namely, profile matching, real-time
connectivity, data storage and mobile security. The outcome
of each of these research areas helped to design the main
components of the “Layered Programmatical API Framework
for Real-time Mobile Social Network”. The breakdown of the
research components is shown in the figure 2.
During the background study and the research conduct of
each of the main components, it was considered about the
existing, similar projects.
Considering the use of user profile matching in the global
level, the researches have led to providing a matching
framework that is able to consider all the profile attributes.
This framework provides solutions to achieve inter-social
network operations and functionalities. This is used to identify
the same individual in different social networks, analyzing
and matching his user profiles in different networks [2]. User
Profile Matching was used to create design architecture to
maintain location-aware information. In this research user
profile were generated for every users applied terminal and
were used to integrate contextual information about mobile
users and objects/devices in their environment [3].
Social networking in ad-hoc networks of mobile phones
(AdSocial) and social networking experience with sensing the
presence (CenceMe) are two research studies conducted for
mobile social networking that uses communication media
effectively [4] [5]. AdSocial is a software platform supporting
social network applications in ad-hoc networks. AdSocial is
designed to support spontaneous interactions and provide the
basis for running collaborative applications. Some
functionalities of the AdSocial are playing games in a local
area, share calendar information with co-workers etc. The
main feature of AdSocial is its design to run on resource-
constrained mobile devices. The CenceMe system
transparently makes useful inferences from data gathered from
sensors embedded in mobile phones, and exports the resulting
“sensing presence” to social network applications. Layered
Programmatical API Framework for Real-time Mobile Social
network supports social network application with
matchmaking features connected via a unique combination of
global positioning system (GPS) location combined with the
Wi-Fi access point. The main feature of this framework is that
it provides based matching functionalities based on the Big
Five personality model and Myers-Briggs personality model.
Fig. 1. Framework development overview
The Adsocial software platform does not support any location
based features in their social networking applications.
Censeme uses location based functions to view the user’s
physical location presence and this presence is to be mapped.
Layered Programmatical API Framework for Real-time
Mobile Social Network supports location based functions to
identify the available user’s presence into an android
compatible google map. Adsocial software platform mainly
targets symbian mobile operating system whereas Cenceme
targets symbian mobile operating and apple iphone. Layered
Programmatical API Framework for Real-time Mobile Social
Network targets the android mobile operating system.
III. RESEARCH FINDINGS AND DISCUSSION
Based on the research and the background studies
conducted by the research group, the Layered Programmatical
API Framework for Real-time Mobile Social Network was
divided into four major modules as given below in the figure 3.
Connection Management Module
Profile Matching Module
Security Management Module
Storage Management module
These modules were designed to be independent and
loosely coupled modules, thus changes in one module do not
directly affect the functionality of another module. The below
described is the research components, the approach and the
methodologies followed in implanting each of those modules.
A. Connection Management Module
This framework consists of multiple layers. The uppermost
layer is to manage the real-time connectivity and the
communication between users. Since the success of any social
networking experience relies on effective communication
between their users, it is very important to send information to
the right user quickly as possible. In real-time social
networking application development, it is essential for the
programmer to create applications that will have the capacity
to connect to other devices/ networks efficiently. Therefore a
separate module is introduced to manage these types of
wireless communication activities. To achieve real-time
communication within the framework we focused on 3 main
solutions.
To use Wi-Fi ad-hoc network mechanism
To use bluetooth ad-hoc mechanism
To use GPS and general packet radio service (GPRS)
mechanisms
Considering the first option it was found that android
supports Wi-Fi ad-hoc networks only on the newly introduced
android 4.0 platform [6]. More precisely, and quoting from
the android open source project, android uses wpa_supplicant
as the platform interface to the Wi-Fi device. Therefore the
Wi-Fi driver must be compatible with the standard
wpa_supplicant in addition to extensions added to the
supplicant [7]. Because of this reason we needed a solution
that supports earlier versions on android operating system
platforms.
Considering the bluetooth technology, android supports
managing multiple connections but the problem here is the
communication range. The effective communication range
that bluetooth supports is low. The average bluetooth's range
is only 10 meters [8]. This is clearly not sufficient when it
comes to implement a real-time social network mechanism.
Fig. 3. Framework Architecture
Fig. 2. Breakdown of the research components
However the combination of GPS and GPRS was found to
be a clear solution to achieve real-time communication in all
the android platform versions. The GPS functionality will
provide an accurate location of the user while the GPRS
functionality can be used to connect the users and transfer
information among users. Furthermore by using the Wi-Fi
functionality it could identify the nearby Wi-Fi access points
and map it with the location provided by the GPS
functionality to discover users nearby each other.
As a result of the research study a separate module is
created to handle connection management activities within the
framework. This module includes 3 different libraries to
handle GPS activities, Wi-Fi activities and GPRS activities as
shown in figure 4.The GPS library is implemented using the
“android.location” package provided by the android API
whereas the GPRS library is implemented using the
“org.apache.http” package provided by the android API and
the Wi-Fi library is implemented using the “android.net.wifi”
package provided by the android API.
B. Profile Matching Module
The next layer performs the profile matching functionality.
Certain profile for each user has to be created in order to
perform the profile matching. In this framework it supports
profile matching based on Myers & Briggs and Big Five
personality models. The reason to choose a scientifically
proven model to match people is because; the final result has
to be an accurate and an acceptable one by all. Thus this layer
provides a means for the application developer to match
different user profile information using methods that based on
the aforementioned theories. It also consists of methods to
convert the results into a user readable format and find the
best match for the application user.
Discussing further about the profile matching library, it
could be considered as the core of the application platform. It
has methods and functions to examine the similarities and
differences of the individual profiles. And this library also has
pre-defined attributes to hold profile information. In other
words it’s a basic Java class library which has pre-defined
classes to support profile matching. Developers who are
willing to use this framework can create objects from these
classes to implement their applications.
Profile matching is basically achieved via pattern matching
where it checks some sequence of tokens for the presence of
the constituents of some pattern. If this process is clarified
further, considering the Myers and Briggs personality model ;
Myers and Briggs theory or the MBTI (Myyers and Briggs
Traits Indicator ) is a method for understanding personality
and preferred modes of behaving.This model uses a four-scale
structure for identifying and categorizing an individual's
behavioral preferences, based almost entirely on Carl Jung's
theories and his translated descriptive words [9].The four
scale structure describes four behavioral preferences and the
four opposite behavioral preferences of those as shown in the
figure below.
Each person falls into one category in each of the above
four behavioural preference pairs according to his personality
traits and each of those types has unique set of attributes that
describe the personality of the people belong to them. The
combination of all the behavioural preferences belong to one
person, construct his Myyers and Briggs personality
profile.The pattern matching is used in matching such profiles
with each other by separating the characteristics into factors as
given below in the diagram.
Factor1 = Extraversion (E) or Introversion (I)
Factor2 = Sensing (S) or Intuition (N)
Factor3 = Thinking (T) or Feeling (F)
Factor4 = Judging (J) or Perceiving (P)
Fig. 4. Overview of the Connection Management Module
Fig. 5. The four scale structure of Myers & Briggs Personality Model
The figure 6 gives a clear idea of the basic profile matching
functionality. Thus, what is finally getting matched is each
person’s personality profile which consists of these 4 factors
with that of another person. It provides a means to carry out
detailed comparisons between data objects. And it will
generate statistical values correspond to the matching
percentages between two objects. Later on it can be concluded
whether those objects match or not by analyzing the
percentage values produced during the comparison process.
C. Security Management Module
Security always plays an important role in any application
development process. Therefore the next layer is designed to
handle the security issues arising when the applications are
developed using this framework. One major security problem
identified was, storing the information securely in a storage
medium and accessing the users’ private information in
various existing social networks such as facebook.
To store the information securely, the most appropriate
method is encrypting them before storing. As this kind of
framework not deals with highly confidential information it
was not necessary to use much complicated security
mechanisms to the storage media. Thus a symmetric kind of
encryption algorithm, based on the advanced encryption
standard is used to do the encryption. This algorithm is
selected considering its fastness and flexibility. The security
management module which is responsible for the functionality
of this layer contains an interface class that must be
implemented by all the encryption algorithm classes. This
facilitates the replacement of the encryption algorithm
whenever it is necessary. Thus, the encryption mechanism can
be used in various places and since it requires only one object
of the algorithm in each place it is implemented using the
singleton design pattern.
This framework is accessing some basic information such
as name, gender and date of birth from the application users’
existing social networks. Currently the OAuth protocol is the
most popular mechanism used in this kind of situations. Here
it is used the OAuth 2.0 specification. Thus the following
steps were followed to accomplish the requirements.
Retrieve Request Token
This includes preparing the OauthConsumer (our
application) with the consumer key by registering
application with a particular OAuthProvider (facebook).
Authorize the request token
This is achieved by notifying the user to accept the request
about letting our application to access his/her basic
information.
Retrieving the access token
In here we receive the access token and it is being stored in
shared preferences.
After these steps the applications developed using this
framework can retrieve the users’ information that needs to do
various activities supported by the framework.
D. Storage Management Module
The bottom layer handles the data used by the applications
that are supported by this framework and it provides all the
necessary data structures to store them. Storage systems used
by this framework can be categorized as shared preferences,
internal storage, external storage, SQLite database and
network connectivity. Using these systems and new
technologies the files, applications and data within this
framework are efficiently managed. This module contains
several handlers to handle different kind of files and data and
perform fast file/data transactions with high accuracy within
the framework.
The primary user informations such as username, password
and profile type are stored in the internal storage of the mobile
phone itself using the SQLite database. It also handles basic
queries such as insert, update, delete, and select. This
facilitates faster transaction of data and thereby increases the
efficiency as it is not needed to connect to the server to
retrieve these primary data.
Since this framework supports development of real-time
social applications, there is an enormous amount of user
information to be handled. Therefore connectivity information
is mainly handled by a web server using PHP programming
language. All the information relevant to the matching
algorithms is stored in the server. Thus when an application
requires a primary data such as username, it can refer the
internal SQLite database/ the mobile database and when an
application needs data stored in the server it requests data
transaction through the connection management module.
The application developers can also make use of shared
preference to store temporary data in the development of their
applications. In this framework shared preferences may be
used in a situation where it requires passing a primitive data
value such as the user personality type, from one activity to
another to generate a certain matching result.
Fig. 6. Profile Matching Functionality
IV. CONCLUSION AND FUTURE WORK
The tangible outcome of the Layered pProgrammatical API
Framework for Real-time Mobile Social Network is a set of
libraries and is available as an open source project.
Application developers can find the relevant libraries,
documents and source codes at googlecode or in sourceforge
under the project name “rasn”. A sample android application
based on “Belbin Team Role Play” theory which demonstrates
the complete functionality of the framework, is also available
in the android app market under the name ”Belbin
Employees”for mobile application users.
Layered Programmatical API Framework for Real-time
Mobile Social Network provides an API framework for the
android developers to develop social networking applications
based on Myers and Briggs and Big Five personality models
to perform real-time matchmaking. This reduces the effort of
the developer by increasing the reusability and makes it easier
for the developers to develop applications on top of it. The
framework is developed on top of android operating system
and it contains the following modules; profile matching,
connection management, security management and storage
management. This helps the android application developers to
develop the applications that fulfil the obsessive requirements
of the android users.
Since this project brings out a novel concept, the
framework is still in the basic stage of it. Therefore there will
be so many future enhancements that could be done to this
framework to make it much more convenient to use. Here are
some suggestions for such future enhancements.
Introduce semantic technology in profile matching process
thus the matching functionality would be much more
intelligent.
Enhance the profile creation and profile matching libraries
by implementing methods to perform profile matching
with other scientifically proven theories and models.
Implement a method to perform the validation for the
standard questionnaires use to obtain the results for Myers
& Briggs and Big Five personality models.
The GPRS library in the connection management module
is using only the apache HttpComponents package. The
future developers can introduce web services to the GPRS
library to improve the performance of the connection
management module.
The Wi-Fi library in the communication module is used
only to get information of the wireless access points and to
initiate and terminate connections between mobile device
and access points. As a further development developers
can introduce the wireless ad-hoc communication
mechanism for this library.
ACKNOWLEDGMENT
A special acknowledgment goes to our supervisor Mr.
Lakmal Rupasinghe who supervised and guided us throughout
this research. Without for his support and supervision this
would have not been successful. We also wish to acknowledge
our co-supervisor, Ms. Kalpani Manathunge for her kind
support, attention and ideas she provided in conducting this
research. Another part of this acknowledgement goes to the
Department of Information Technology, Sri Lanka Institute of
Information Technology, for encouraging us as students, to
conduct research on innovative and novel concepts.
REFERENCES
[1] “Social networking and the next generation of handheld devices will
improve business decision-making through efficient, unified
communications and location awareness”, [Online]. Available: http://images.tmcnet.com/online-communities/fixed-mobile-
convergence/pdfs/mobile-socialnetworking.pdf
[2] Raad, E.; Chbeir, R.; Dipanda, A.; "User Profile Matching in Social
Networks," Network-Based Information Systems (NBiS), 2010 13th
International Conference on , vol., No., pp.297-304, 14-16 Sept.
2010doi: 10.1109/NBiS.2010.35 URL:http://www.ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=
5636108&isnumber=5635536
[3] Devlic, A.; Jezic, G.; , "Location-aware information services using user profile matching," Telecommunications, 2005. ConTEL 2005.
Proceedings of the 8th International Conference on , vol.1, no., pp.
327- 334, June 15-17, 2005doi: 10.1109/CONTEL.2005.185885 URL:http://www.ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=
1458564&isnumber=31385
[4] Emre Sarigöl, Oriana Riva, Patrick Stuedi and Gustavo Alonso, "Enabling social networking in ad hoc networks of mobile phones,"
Proceedings of the VLDB Endowment, vol. Volume 2, no. Issue 2, pp.
1634-1637, August 2009. [5] Andrew T Campbell et al., "Transforming the social networking
experience with sensing presence from mobile phones," in Proceedings
of the 6th ACM conference on Embedded network sensor systems, New York, 2008, pp. 367-368.
[6] Android developers. (n.d). Android 4.0 Platform [Online]. Available:
http://developer.android.com/sdk/android-4.0.html
[7] Android & Windows Phone: Tablets, Apps, & ROMs @ xda-
developers. (2010, August 17). Android Ad-hoc Wireless Network
Support [Online]. Available: http://www.xda-developers.com/android/android-ad-hoc-wireless-network-support/
[8] Julian Claudino, Neer Shay, and Damon Valenzona. (n.d.). An
Evaluation of Peer-to-Peer File Sharing on the Android Mobile Platform [Online].
Available:http://www.cs.ucsb.edu/~almeroth/classes/W10.290F/final-
reports/damon+julian+neer.pdf [9] katherine benziger. (n.d). dr katherine benziger - personality
assessment, thinking and working styles [Online].
Available:http://www.businessballs.com/benzigerpersonalityassessment.htm