<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>A Lightweight Approach to Contact Data Synchronization in Mobile Social Networks</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Nikolay Tkachuk</string-name>
          <email>tka@kpi.kharkov.ua</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alexey Vekshin</string-name>
          <email>alexeyvekshin@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Konstantyn Nagorny</string-name>
          <email>k.nagornyi@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Rustam Gamzaev</string-name>
          <email>rustam.gamzayev@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>National Technical University “Kharkov Polytechnic Institute”</institution>
          ,
          <addr-line>Frunze str. 21, 61002 Kharkov</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
      </contrib-group>
      <fpage>108</fpage>
      <lpage>115</lpage>
      <abstract>
        <p>Data synchronization is one of the most critical issues in “alwaysavailable” software mobile applications development. In this paper the new approach to resolve this problem in social networks is proposed, which is based on iPhone platform, and utilizes legacy data storage based on MS .Net WCF (RESTFull services) and MS SQL Server. This application provides import of client's contacts data (e.g. from iPhone's address book) created previously in another application (MS Outlook, etc.) into social networks, and supports their updating by further synchronization process. The advantage of proposed approach is it's universality and lightweight, because it does not need to implement any special software adapters and interfaces.</p>
      </abstract>
      <kwd-group>
        <kwd>data synchronization</kwd>
        <kwd>mobile application</kwd>
        <kwd>XML-mapping</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Nowadays many customers need to access information any time anywhere. For this
purpose different mobile software- and hardware platforms can be used, which allow
to store data in various formats and to provide diverse access interfaces. There is an
obvious necessity for centralized data storage and access them in such distributed
systems. Thus, data synchronization (DS) issue is one of the most significant problems in
development of “always-available” software mobile applications. In this paper we
propose an approach to solve a DS problem during development of a mobile client
application in social network which is based on iPhone platform and uses legacy data
storage based on MS .Net WCF (RESTFull-services) and MS SQL Server. Our
system implements the possibility to import into social network the client’s contacts data
(e.g. from address book), which were created previously in another application (e.g.
MS Outlook), and provides their modification with further synchronization. The paper
is structured in following way: Section 2 depicts briefly some modern trends in this
re-search domain, in Section 3 our approach is represented, the appropriate software
solution and its complexity estimation are discussed in Section 4. Finally, Section 5
concludes the paper and gives a short outlook on some future works in this research.</p>
    </sec>
    <sec id="sec-2">
      <title>2 Contacts Data Synchronization Issues in Social Networks: Some</title>
    </sec>
    <sec id="sec-3">
      <title>Modern Trends</title>
      <p>
        Nowadays there are few leading mobile platforms, e.g. iOS, Windows Mobile,
Symbian, Android, and most of business customers require solutions which cover all
these technologies. In any case the requirement to have contacts data synchronized
with remote servers or with other devices is strictly required even for desktop
applications, but definitely this is a critically important issue for modern mobile
software systems, especially for social networks. This requirement has to be met
together with some additional special constraints of mobile applications such as e.g.
performance sufficiency and battery life [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>On Fig. 1 a typical scheme of several interactions in social network is presented. As it
is shown on this diagram, each client application: iPhone, MS Outlook, etc., and
system’s server as well have own storage with contacts data. The centralized database
on the server-side contains contacts data from all interacting clients. One of all tasks
to be realized in this system is the DS procedure between different clients and
centralized database on the server.</p>
      <p>
        There are some special tools to solve DS problems. For example, SyncML [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] is a
specification standard for common DS framework, but the main domain of SyncML is
DS for mobile devices which are intermittently connected to network ser-vices.
SyncML was specially designed for case, if data to be synchronized have different
formats or are used in different software systems. Therefore SyncML’s specification
is too expensive from the development’s efforts point of view, because it contains a
lot of redundant options for different network systems development.
      </p>
      <p>
        ActiveSync [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] is the software tool which allows to synchronize contacts and
PIMdata [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] between mobile devices (e.g. mobile phone, communicator, pocket PC) and
server which is running on Microsoft Exchange Server platform. This software
requires connection between PC and devices via USB-cable, Bluetooth or IR-port.
      </p>
      <p>
        MobiLink [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] is the Sybase DS technology from Sybase iAnywhere product line. It
is session-based synchronization technology for data exchange between relational
data-bases and non-relational data storages. Mobile client using MobiLink technology
was implemented for Windows Mobile, but it is not possible to use this solution on
iOS platform.
      </p>
      <p>
        One of open source DS tools is Funambol service [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] with client applications for
mobile devices and personal computers, it allows to synchronize contacts, PIM- data,
emails and social networks data.
      </p>
      <p>Summarizing features of mentioned above technologies we can conclude that it is
too difficult to adopt them by real-life mobile application development taking into
account problems with different data exchange formats, communication protocols, etc.
Also usage of such tools is actually related with redundant data storage on client’s
application, and also needs to cleanup non-actual data on the server side. Moreover
usage of existing technologies for the DS is expensive from the development costs
point of view in rather small mobile software projects.</p>
    </sec>
    <sec id="sec-4">
      <title>3 Formal Definitions</title>
    </sec>
    <sec id="sec-5">
      <title>Synchronization and</title>
    </sec>
    <sec id="sec-6">
      <title>Algorithm for</title>
    </sec>
    <sec id="sec-7">
      <title>Contact</title>
    </sec>
    <sec id="sec-8">
      <title>Data</title>
      <p>(2)
(3)
(4)
Proposed DS approach can be represented in a formal way using the following
definitions.</p>
      <p>Definition 1. Data synchronization (DS) is a process, which is given by the tuple</p>
      <p>DS  XMF , Ph, I ,
where XMF is contact identifiers mapping file (see for details Def. 2);
Ph is a set of synchronization phases (see for details Def. 5);
I is a set of queries to a synchronization server (see Def. 6).</p>
      <p>Definition 2. Mapping file (XMF) is represented by the tuple</p>
      <p>XMF  CM , LST ,</p>
      <p>CM  SrvAb  ClnAb ,
where CM is a set of contact identifiers (see for details Def. 3);</p>
      <p>LST is a set of synchronization timestamps (see for details Def. 4).</p>
      <p>Definition 3. Contacts mapping (CM) is contacts identifiers mapping, represented
by subset of Cartesian product
where SrvAb  sk , k  1, m is a set of contacts from server’s address book;
ClnAb  a j , j  1, n is a set of contacts from client’s address book.</p>
      <p>Definition 4. Last synchronization time stamp (LST) is a time of last contacts
synchronization,</p>
      <p>LST  , if no DS provided yet
LST  tl , 
LST  t1, if DS already provided
.</p>
      <p>Definition 5. Synchronization phases (Ph) are procedures to be performed in
synchronization process, represented by a following set</p>
      <p>Ph   pi , i  1, 4 ,
pi  C, R, U , D .
(5)
(6)
(7)
(8)
where each phase pi is a subset of create(C)-, read(R)-, update(U)- and
delete(D)operations:</p>
      <p>Definition 6. Request to synchronization server (I) – is a set of data types, which
are transferred from client to server:</p>
      <p>I  Q W ,
where Q  qv , v  1, N , N – set of natural numbers;</p>
      <p>W  wz , z  1, 3 , e.g. W  timestamp, contact identifier, contact .</p>
      <p>Algorithm which is proposed includes following four main phases.</p>
      <p>Phase I: fetch modified contacts in SrvAB; modify contacts in ClnAB, update
XMF;</p>
      <p>Phase II: upload locally modified contacts to a server; retrieve new contact from
SrvAB_ID; update XMF with obtained IDs.</p>
      <p>Phase III: obtain from XMF the removed ClnAB_IDs; fetch contacts from server
with these IDs; user action request: restore/delete contacts; if restore: insert contacts
in ClnAB and update XMF; if delete: remove contacts from SrvAB and XMF.</p>
      <p>Phase IV: send IDs from XMF to a server; find non-existent contacts in SrvAB by
retrieved IDs, return them to a client; user action request: restore/delete contacts; if
restore: upload contacts to a server, update XMF with IDs; if delete: delete contacts
from ClnAB, update XMF; finally show synchronization report.</p>
      <p>In Fig. 2 a sequence diagram of proposed approach in UML 2.0 notation is shown.
This view describes a sequence of interactions between User, Client application on
mobile device, and Synchronization server. Main synchronization phases are
represented as a sequence of method calls or messages. Synchronization process starts
after user interaction with mobile device, while synchronization in progress a mobile
application displays dialog’s confirmation messages, they allow to get control
information for user. Interactions between Client application and Synchronization
server are method invocations in RESTFull service.</p>
      <p>In order to provide DS process the appropriate data models, methods and software
tools have to be elaborated.</p>
    </sec>
    <sec id="sec-9">
      <title>4 Prototype Implementation</title>
    </sec>
    <sec id="sec-10">
      <title>Proposed Approach and</title>
    </sec>
    <sec id="sec-11">
      <title>Complexity</title>
    </sec>
    <sec id="sec-12">
      <title>Estimation of</title>
      <p>On Fig. 3 the deployment diagram of typical mobile application including new
software components is shown. Main nodes at this diagram are: the Synchronization
server and the iPhone as a mobile device. At iPhone side a mobile application is
deployed, which consists of following components: 1) ViewController is an
application controller, which handles events, invokes Model and ABProvider; 2)
Model is a component, which implements business logic of mobile application; 3)
ABProvider is a component to provide access to iPhone’s local address book and to
implement CRUD-operations; 4) SyncServiceProvider is a component to access
remote REST-service and to utilize preparing request and parsing response; 5)
MappingFile is a component accesses XMF. At the Server side the SyncServer node
is presented with following components: 1) SyncService is a RESTFull-service
implemented using C# and WCF technology to access server data with
CRUDoperations; 2) Centralized database is a central storage of contacts data. As
communication protocol the HTTP is used.</p>
      <p>In a case of usage proposed approach next several components have to be
implemented: 1) XMF mapping file, to store identifiers; 2) SyncServiceProvider
synchronization service client. That is why from our point of view the proposed
approach has less complexity as compared with another DS tools, e.g. like SyncML
and Funambol (see Section 2).</p>
      <p>In order to compare these approaches correctly, we need to describe typical
software components for each tool in the same notation, and to estimate their
complexity in some way.</p>
      <p>E.g., in case of SyncML framework there are some components are needed to
implement for DS process: 1) 2 SyncML-adapters; 2) SyncML-engine; 3) SyncML
client agent; 4) 2 SyncML I\F (API to SyncML-adapter); 5) SyncML server agent.
The SyncML based DS-architecture is shown in Fig. 4 as the UML component
diagram.</p>
      <p>
        In case of Funambol tool it is also needed some components to be implemented: 1)
a SyncML-adapter, 2) Input and Output synclets (Java adapter classes); 3)
Synchronization Sources (BTW: additionally some back-end classes have to be used
in this approach, but they should not be taken into account for our comparison). In
Fig. 5 the components of Funambol-based solution are shown [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>
        As usual frameworks have to be compared by their functionality and structures (see
e.g. in [
        <xref ref-type="bibr" rid="ref8 ref9">8, 9</xref>
        ]), so to calculate complexity it is possible to calculate number of
components, divided in some groups. In our case there are two groups of components:
the components which have to be implemented, and the components which are
already available. To calculate complexity the following formal expression can be
used:
      </p>
      <p>z
C   i  ci ,
i1
(9)
where: z is the number of component groups;
i is the weighting coefficients for components of i-th group;
c1 is the number of components in i-th group.</p>
      <p>The following test case uses weight coefficients calculated with Analytic Hierarchy
Process (AHP) method [10], the appropriate coefficients are: ρ1=0,17 , ρ2=0,83. With
respect to expression (8) there are the following final values of complexity estimation:
1. for proposed approach: Cproposed  0,17  2  0,83 0  0, 34 ;
2. for SyncML framework: CSyncML  0,17  7  0,83 0  1,19 ;
3. for Funambol tool: CFunambol  0,17  4  0,83 1  1, 51 .</p>
      <p>Results of complexity estimation expose that the proposed approach has less
complexity than SyncML and Funambol both.</p>
    </sec>
    <sec id="sec-13">
      <title>5 Conclusions and Future Work</title>
      <p>We have presented the lightweight approach for contact data synchronization in
mobile social networks, which allows to reduce development costs and to elaborate
reusable software solutions. Of course, there are some problems in our approach
which were not discussed in this paper. For example, we did not take into account the
fact that contact data in any social network are surely private information, therefore a
correct synchronization procedure has to provide an appropriate data security options,
etc. Another critical issue in the proposed approach is an intensive data exchange
process between a lot of client applications and centralized data storage, and it can
lead to “bottleneck” effect in the synchronization framework. That is why in future
work we are going to solve these problems, and additionally to improve our approach
in the way of advanced analysis of contacts data to be synchronized in order to
prevent possible semantic errors and data missing.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Mobile</given-names>
            <surname>Platform Benchmarks</surname>
          </string-name>
          .
          <article-title>A Methodology for Evaluating Mobile Computing Devices</article-title>
          . Daniel
          <string-name>
            <surname>McKenna. Transmeta Corporation</surname>
          </string-name>
          (
          <year>2000</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>SyncML</given-names>
            <surname>Data Synchronization Protocol</surname>
          </string-name>
          , http://www.openmobilealliance.org/Technical/release_program/ds_v1_
          <article-title>2_2</article-title>
          .aspx
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>3. Microsoft Active Sync, http://msdn.microsoft.com/en-us/library/aa913903.aspx</mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <article-title>4. The Return of the PDA</article-title>
          , http://memex.org/thereturnofthepda.html
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Designing</given-names>
            <surname>Mobile Applications: Why Sync Is Central</surname>
          </string-name>
          , Sybase iAnywhere, (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Funambol</given-names>
            <surname>Project</surname>
          </string-name>
          , http://www.funambol.com
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>Funambol</given-names>
            <surname>Documentation</surname>
          </string-name>
          , https://www.forge.funambol.org/download/documentation.html
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>8. Compare JavaScript framework, http://www.ibm.com/developerworks/web/library/wajsframeworks/</mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9. Best Web Frameworks, http://www.bestwebframeworks.com/ 10.Saaty,
          <string-name>
            <surname>T.L.</surname>
          </string-name>
          :
          <article-title>The Analytic Hierarchy Process: Planning, Priority Setting, Resource Allocation</article-title>
          .
          <string-name>
            <surname>McGraw-Hill</surname>
          </string-name>
          (
          <year>1980</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>