content synchronization applications for aakash tablets ... · content synchronization applications...

65
Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions M.Tech. Stage II Report Submitted in partial fulfillment of the requirements for the degree of Master of Technology by Debashee Tarai Roll No : 113050078 under the guidance of Prof. D. B. Phatak Department of Computer Science and Engineering Indian Institute of Technology, Bombay June 2013

Upload: others

Post on 11-Mar-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Content Synchronization Applications for AakashTablets and Remote Educational Institutions

M.Tech. Stage II Report

Submitted in partial fulfillment of the requirements for the degree of

Master of Technology

by

Debashee TaraiRoll No : 113050078

under the guidance of

Prof. D. B. Phatak

Department of Computer Science and EngineeringIndian Institute of Technology, Bombay

June 2013

Page 2: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Abstract

MHRD Sponsored project ”Aakash”, World’s Cheapest Tablet, aims to make e-learning as the primary mode of learning in India. Tablet, being much cheaper thanmobile phone with bigger screen size and lighter than laptop, is the most suitablemedium to enforce E-learning in education. Aakash android tablets with Linux basedoperating system, are currently tested and new useful applications are developed atIIT Bombay. This entire project contains two individual applications, Local Synchro-nization and Remote Synchronization Application.

Remote Content Synchronization application aims at distributing contents in a net-work efficient manner to remote Institutions distributed at different geographical loca-tions. It makes use of RSYNC tool for content transfer and RSA public private key pairto make the application more secured and fast. This report describes the architecture,implementation details and analyze the performance of the remote synchronizationapplication. Several tests have been conducted and analysis of the obtained resultsshows that performance of the Remote Synchronization application is nearly threetimes better then conventional scp based transfer and RSA key pair reduce the totaltransfer time to a great extent.

Local Content Synchronization application has been developed for Aakash tabletsinorder to synchronize contents between students and teachers, providing the usersan interface to submit files, download files and view the details of all submissionsand sharing at real time. It offers the flexibility of storing the files according to userspecified path and configuring IP Address as required. The work has been extendedwith Moodle database so that Student–Course–Teacher mapping can directly be doneon the existing data.

Page 3: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Acknowledgments

Foremost, I would like to express my sincere gratitude to my advisor, Prof. D. B. Phatak forselecting me as a part of his valuable project, for motivating me to do better and for spendingsufficient amount of time to instruct and encourage me with insightful comments on my projectwork, in-spite of his busy schedule.

My sincere thanks also goes to Prof. Sridhar Iyer, who was my Internal examiner in satge 1presentation, for his valuable suggestions and describing the appropriate approach for my project,guiding me in the right path.

Furthermore, I would like to give my gratitude to Mr. Nagesh Karmali and Ms. Firuza Aibara fortheir guidance and help, staring from the beginning of the project to writing reports. Secondly, Iwould like to express my appreciation to all my friends working in several Android related Projects,who cooperated and guided me to complete this project.

I thank my fellow labmates, for their discussions with me, suggestions and encouragements.

Last but not the least, I would like to thank my family: my Mother, Nalini, my brother Bharadwajand my friend Gopalakrishnan, for their unconditional support, encouragement and care throughoutmy life. Without their support, it would have been impossible for me to finish my masters educationseamlessly.

1

Page 4: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Contents

1 Introduction 51.1 Synchronization of data and content . . . . . . . . . . . . . . . . . . . . . . . . . . 51.2 Application for Content Synchronization . . . . . . . . . . . . . . . . . . . . . . . . 71.3 RSA Key based protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.4 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2 Literature Review 92.1 Survey on Various synchronization tools . . . . . . . . . . . . . . . . . . . . . . . . 9

2.1.1 RSYNC as sync. tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1012

2.1.2 Study on DropBox as sync. software . . . . . . . . . . . . . . . . . . . . . . 152.1.3 SyncBreeze File Synchronization Tool . . . . . . . . . . . . . . . . . . . . . . 15

2.2 Study on E-learning through Mobile Devices . . . . . . . . . . . . . . . . . . . . . 17

3 Android Application Architecture Framework 183.1 Introduction and overview of Android . . . . . . . . . . . . . . . . . . . . . . . . . . 193.2 A brief description on Dalvik VM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.3 Android Application Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.4 Android Application Functionalities . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

4 Proposed Architecture 254.1 Push-Pull Framework for Content Forwarding . . . . . . . . . . . . . . . . . . . . . 25

4.1.1 Content Forwarding in Local Synchronization Application . . . . . . . . . . 264.1.2 Content Forwarding in Remote Synchronization Application . . . . . . . . . 27

4.2 Detail Architectures of Local and Remote Synchronization Application . . . . . . . 284.2.1 Local Synchronization Application . . . . . . . . . . . . . . . . . . . . . . . 284.2.2 Remote Synchronization Application . . . . . . . . . . . . . . . . . . . . . . 32

5 Implementation 375.1 Implementation details of Remote Synchronization . . . . . . . . . . . . . . . . . . 375.2 Implementation of Local Synchronization Application . . . . . . . . . . . . . . . . . 47

6 Experiments and Analysis of Results 53

7 Conclusion and Future Work 60

2

Page 5: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

List of Figures

1.1 Content Synchronization Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.1 Rsync Algorithm Description with an example . . . . . . . . . . . . . . . . . . . . . 112.2 Rsync’s network protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.1 Android System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.2 Life cycle of Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.3 Android Application Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.4 Application Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.1 Pull Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254.2 Push Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264.3 Local Sync. Content Frwd Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . 264.4 Remote Sync Content Frwd Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . 274.5 Overview of Local Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.6 Update File: Details Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304.7 Submit File: Detail steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314.8 Global view of Remote Sync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334.9 Flow Chart for Remote Synchronization Application . . . . . . . . . . . . . . . . . . 35

5.1 The main page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395.2 Page containing options for faculty . . . . . . . . . . . . . . . . . . . . . . . . . . . 405.3 Faculty Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415.4 Faculty adding courses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415.5 Modifying existing Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425.6 Login to View and Download the shared files . . . . . . . . . . . . . . . . . . . . . . 435.7 Login to View and Download the shared files . . . . . . . . . . . . . . . . . . . . . . 445.8 CASE 1 : Error Message when invalid inputs . . . . . . . . . . . . . . . . . . . . . . 455.9 CASE 2 : Error Message when Empty fields entered . . . . . . . . . . . . . . . . . . 455.10 CASE 3 : Success Message when values Updated . . . . . . . . . . . . . . . . . . . 465.11 CASE 4 : Success Message when user Registered . . . . . . . . . . . . . . . . . . . . 465.12 Login screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485.13 Setting Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485.14 User Validation from Server’s Database . . . . . . . . . . . . . . . . . . . . . . . . . 495.15 Main Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495.16 Screen after Clicking Submit button . . . . . . . . . . . . . . . . . . . . . . . . . . . 505.17 Screen showing File Browser with UP button . . . . . . . . . . . . . . . . . . . . . . 505.18 Screen after selecting the file to send file . . . . . . . . . . . . . . . . . . . . . . . . 505.19 Page Showing several Options for downloading appropriate file . . . . . . . . . . . 51

3

Page 6: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

5.20 Page Displaying Last Transactions of the logged in User . . . . . . . . . . . . . . . 52

6.1 Results of various size of file transfer to various user sets . . . . . . . . . . . . . . . 546.2 Results of Retransmission time taken for the user sets of 75 and 100 . . . . . . . . . 556.3 Comparison of File Transfer time for various User sets . . . . . . . . . . . . . . . . 576.4 File transfer via SCP vs Sync Application . . . . . . . . . . . . . . . . . . . . . . . 586.5 Retransmission time comparision . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586.6 Performance Comparison between Application, Rsync and SCP . . . . . . . . . . . 59

4

Page 7: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Chapter 1

Introduction

E-Learning has the potential to support and enhance the traditional learning system and it hasalready become an integral part of learning. It makes the use of Internet to improve the qual-ity of learning by providing access to resources as well as educational contents and services fromremote organizations in a collaborative manner[1],[2]. In educational environment Video lectures,pdfs, ppts, ebooks, study materials etc are the typical examples of content which are needed to beshared. An improved learning process needs techniques and tools to present, interact and shareknowledge from variety of resources with others[3] . This can be possible if there is a automaticmechanism to share and distribute contents in between teachers and students inside an institutionas well as in between institutions[4] . Content Synchronization is a data distribution technology,in which selected contents are automatically delivered from senders to receivers in real time or atprescribed intervals[5] .

1.1 Synchronization of data and content

Synchronization vs Backup[6],[7]

Synchronization is a bidirectional process. It ensures that two parties involves in the process,remain synchronized to each other while user may change files on both the sides. This is achievedby copying changes that have been made on one side to the other side and vice versa. As a result,both the parties involved in synchronization, end up with containing the mirror copy of the sharedcontent.

Backup on the other hand, is one-way synchronization, that is, changes those have been made onone side are propagated to the other side but not vice versa. In this case the receives are leastinteractive and receive only the contents forwarded by the sender.

Educational environment needs both synchronization and backup mechanism depending on thesituation they are being used. Figure 1.1 represents a generalized scenario for local and remotesynchronization process.

5

Page 8: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Content synchronization means to keep data in two or more machines up-to-date so that eachshared repository contains identical information which is essential in interactive student teachercommunication inside the institution, on the other hand backup process is needed to share contentsbetween institutions where the process is some what less interactive and one to many communica-tion happens transferring huge volume of data.

Figure 1.1: Content Synchronization Scenario

There are several important points in this context described as follows :

� Implementing file synchronization can take many forms and can address several shortcomingsfound with other content protection schemes

� Synchronization implies an automatic process of updation of data in all connected devices.In presence of distributed database, the ability to keep remote machines synchronized byroutinely copying the entire or subsets of the whole content to them in the network iscalled Content Synchronization among remote machines.

� Synchronization of Data and Content offers the ability to preserve multiple copies of files acrossvarious educational and IT industries, helping to keep updated files available to students,teachers and employees under any circumstance.

� Regardless of whether the files are spreadsheets, documents, e-mail or contain other infor-mational elements classes based on these data, businesses related to those documents cannotoperate without ready access to the data in those files creating a real time need of informationand data synchronization in day to day life.

6

Page 9: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Working principle of Backup and Synchronization is based on one-way and two-way content prop-agation respectively. A brief description about them are as follows :

One-way synchronization

It is used in backup process. All changes made in the source directory are propagated to thedestination directory but any modification done to the destination directory will have no affect onthe source directory. In short, the sender will keep on updating the the receiver’s contents wheneverit finds any new or modified content.

Two-way synchronization

Newly created and modified files are synchronized in both directions. Changes made at one locationis reflected in all the other locations. As a result, after the file synchronization process gets over,both locations contains identical data. It typically makes the use of a central server that sends thelatest copies of data to all required machines. The server keeps on watching the clients. When anychange is made at the client, server ”Pulls” the data, find the list of destinations, creates a back upand ”Push” the new content to all the destinations.

1.2 Application for Content Synchronization

The need of sharing files in a peer-to-peer environment grows, increasing the challenge of providingenvironment that enable users to share files in an efficient manner, specially in environments withlarge numbers of users and sharing relationships. A Content synchronization application is a filesharing environment. Which operates based on the database containing the details of all the clientsconnected to it. The client sharing any version of file, is compared to identify the existence of thesame content, to find the newly added parts and forwarded to the list of receives connected in thelow latency network[8] . It provides interface to users t provide, change and update their detailsand view the the list of all transactions made with the client in a client specific manner. One ofthe most important factor is transfer of large volume of data over network to remote computers[9].The detail design process has been described in chapter 4 and detail Implementation process hasbeen described in chapter 5.

Local Synchronization Application

This application has been developed for Aakash tablets[10] , provides an interactive environmentto the users. Users can submit, update or get details of previous transaction made by them or withthem etc. The Local Synchronization Application has been extended to use database of MOODLE,which is used globally all over the world in educational Institutions and the platform used bythe clients are AAKASH Android Tablets.The work has been extended with Moodle databaseso that Student–Course–Teacher mapping can directly be done on the existing data. For anysingle transaction, Android application in tablets sends the selected file to the server, server findsdestination list,i.e the list of receives registered for for that particular courses, keeps a back and

7

Page 10: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

update the clients profile with the new content. This application uses iNotify utility at the serverside to process each file transfer instantaneously in real time.

Remote Synchronization Application

In this application, video lectures, ebooks, study materials etc. of one institution are forwardedto the registered list institutions, uses One-Way Synchronization, already described above. Aninstitution which want to share its contents, work as central institution, which will provide a GUIfor other institutions to register themselves for certain number of courses. Faculties/Users of theinstitution can register themselves to share their contents. So, an institution which want the studymaterial being referred in the central institution, can register themselves in the application’s GUIand get the study materials on a periodic basis. This application has used Rsync[12] tool for contentforwarding, RSA key pair for authentication which are described in details in Implementation Capter

1.3 RSA Key based protection

Key-based authentication[11] is most secure with compared to several other modes of authentica-tion, like plain password because key-based authentication provides several advantages over pass-word authentication, like key values are significantly more difficult to brute-force or guess than plainpasswords and are of very large in length and also need not be remembered.There are basically two types of key based authentication, RSA and DSA. RSA being moresecured[7], have been used in the Remote Content Synchronization Application. Key-based au-thentication uses two keys, one is Public key which anyone can see, and another is Private key,which only the owner is allowed to see. This has been used in Remote synchronization Application.

1.4 Motivation

MHRD has launched world’s cheapest tablet ’AAKASH-2’, as the step toward the ambition ofOne Tablet Per Student : E-learning target of Govt of India. IIT Bombay was giventhe responsibility to train 1,00,000 teachers at a time to train them on Aakash usage under theguidance of Prof D.B Phatak. To enforce e learning as the primary mode of education in India,the most optimal way is to make Aakash Tablets as the means of education because :

� Smaller size and weight than Laptops, so more portable

� Considerably bigger screen size then mobiles

� Very less costlier than laptops and other android based mobiles and Tablets

� Most importantly comfortable to read and type than mobiles

The desire of being an active contributer towards the prestigious ambition of making E-learningthrough Tablets as the primary mode of education in India and to share the study materials thatIITans follow to rest of the country so that a high quality education will not be confined inside IITonly, are my primary motivations that inspired me all the time to build these Content Synchroniza-tion Applications as my Master’s Project.

8

Page 11: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Chapter 2

Literature Review

This chapter includes literature study in several directions like analyzing the working of various Syn-chronization tools, creating e-learning environment in mobile devices to setting up wifi connectionwithin various devices. A brief description regarding the fields are as follows:

� A comparison of file synchronization software tools and ultimately the use of RSYNC tool asan efficient and reliable tool for local as well as remote synchronization and study of Dropboxarchitecture, documentation of IBM Sterling for synchronization purpose among variousmobile phones.

� Implementation of E-learning environment through Mobile Devices like tablets and wifienabled mobile devices.

� Establishment of wifi connections simultaneously with multiple devices in same and varyingBSS and Establishment of peer-peer wifi connections independent of Access Point reducingunnecessary load on Access Point.

2.1 Survey on Various synchronization tools

Synchronization of Data and Content offers the ability to preserve multiple copies of files acrossvarious IT industries; helping to keep updated files available to users under most any circumstance.With the increase in the demand of data integrity and consistency there are many data and contentsynchronization tools. Here under we will conduct a study on some of the very important andpopular file synchronization tools and in the latter part we will carry out a comparative study oneach of them.

9

Page 12: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

2.1.1 RSYNC as sync. tool

One of the major synchronization tool for content and file synchronization is rsync. The followingcontents are the summary of the survey of papers studied on rsync for synchronization purpose.The rsync utility[12] can be used cross- platform Linux, Mac OS X and Windows (with Cygwin,of course) and, in combination with cron and SSH. This can be scripted easily. This makes it oneof the essential utilities in ones toolkit, even if not planning to use it for backup purpose. Anotheradvantage is which it is bundled with many major Linux distributions today.

Description of rsync tool[13]

� The killer feature for differential backups rsync, with its unique algorithm, allows to transferonly changes made in a file or directory structure, instead of re-transferring all data.

� This is very beneficial when synchronizing large files or directory trees with gigabytes of data.rsync only transfers changed parts, and applies changes to the file/directory tree copy[17]on other systems, like patch utility.

� It can even be used to synchronize files locally (on same computer), by taking backups on thelocal machine itself (say, to a different drive, like USB device drive). Overall, it is a simple,easy and efficient solution, eliminating the need to install any complicated backup software.

File synchronization Scenario:

Given two versions of a file on different machines, one outdated and the current version, the pro-cess of updation of the outdated version with minimum communication overhead, by finding thesignificant similarity between the version[14],[15].The issue of maintaining large replicated collections of files or documents in a distributed environ-ment with limited bandwidth. This arises in a number of problems such as synchronization of databetween accounts or devices, content distribution and web site mirroring, large scale web searchand mining and storage networks. For this rsync is the most commonly used solution . The rsynctool focus on the efficient synchronization of very large web pages, collections for the purpose offind, evaluate, and distribution.

� At client side : partitions old file to blocks of size b each part is named from B0 to Bi , foreach block compute weak hash and strong hash and send.

� At server side :For each pair of received hashes, insert an entry into a dictionary structure,using as (weak hash, strong hash,i) as the key.

10

Page 13: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Server Client

39886256432 1234763488625623

File.txtFile.txt Updated fileOld Version

39886256432

H1 H4 H3H2

Match Found

[3 9 H3 5 6 4 3 2 ]

1234763488625623 H4H1 H2 H3

39886256432

H1  H2  H3 H4

H3

39886256432

H3 replaced & mirror Copy of server file created

File.txt

Figure 2.1: Rsync Algorithm Description with an example

11

Page 14: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

� A pass is performed through new file, starting at 0th position and involving the followingsteps:

– Compute the unreliable hash on the block starting at 0th position

– Compare the dictionary for block with matching unreliable hash.

– If found, and if the reliable hashes match, transmit the index i of the matching block inold file to the client, advance it by ”b” positions, and continue.

– If none found, or if the reliable hash did not match, transmit the symbol new file at jthposition to the client, advance it by one position, and continue.

� At client side : Use the in coming stream of symbols and indices of hashes in to reconstructnew file from the old file.

File synchronization algorithm that partitions the problem into two phases,

� Map construction where the two parties use a multi-round protocol to determine the com-mon parts of the corresponding files. The ultimate result of map construction is to producethe bit map array, telling the sender to send only some particular blocks

� Delta compression, where the remaining parts are encoded in relation to the common partsand then transmitted to the other side. The authors have introduced technique for extendingmatches via Continuation Hashes and for the optimized verification of suspected matchesin the two files, plus several other optimizations.

Rsync Network Protocol

RSync first calculates the checksums (rolling + hash value) for each block of data in the old versionof the file. These checksums needs to be transported to the computer holding the new version ofthe file, so it can get the file modifications.

Once the differences are detected between the current and previous version of file, the computerholding previous version of file receives instructions on how to create a copy of the file that is equalto the new version. These instructions consists of references to blocks in the old file which have notmodified in new file, and sequences of changed or new data.

Checksum Protocol

� In the original Rsync implementation the rolling checksum takes up 4 bytes. The hash valueis 16 bytes. That means that for each block of the outdated version of file, 24 bytes aretransmitted across the network in this direction.

12

Page 15: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

SENDER                                                                       RECEIVERfork () to start remote rsync server

File List

Rolling Checksums & Hash Values

New/Modified data & Block Ref no.

 Create File List based on pathnames, ownership, Permissions,size,mode etc

  1.Compares File List with    local directory tree  2. Rolling checksums and      Hashes are created 

 1.Find and Append only    new content 2.Compress & Encode 

  1. Create a Temp File  2. Renamed & replace  temp file as the basis file

Figure 2.2: Rsync’s network protocol

� There is no need for any specific block reference identification number. The computer holdingthe new version of the file will assume that the first 24 bytes is for block no 0, next 24 bytesfor block 1 etc.

Merge Instruction Protocol

� When sending instructions a list of block references are sent along with sequences of new datato insert. A block reference is encoded as a 4-byte int. This makes it feasible to reference upto 2,147,483,648 blocks of data.

� The data sequences are inserted into the stream of block references, and marked as blockreference. For instance, a block reference of -1 means that a data sequence is beginning, andit continues until an end code is met.

Protocol Efficiency

� It is possible to optimize the network protocol at cost of CPU computation time. At leastfive things can be optimized as follows:

– Size of rolling checksum.

– Size of block references.

– Collapsing sequential block references.

– Compression of data sequences.

– Storing Checksums Locally

13

Page 16: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Rolling Checksum Optimization

� In the original RSync implementation the rolling checksum consists of two 16 bit values,instead of 2 32 bit values. Cutting the rolling checksum back to 16 bits will increase the numberof checksum matches, and thus cost more 16 byte hash value calculations when searching forchecksum matches on blocks.

� Using a 32 (4 bytes) rolling checksum instead of a 64 bit (8 bytes) will cut down the dataexchanged by non changed blocks by a value of 4 bytes.

Improvements on rsync performance:

1. Continuation hashes perform optimized verification of suspected matches in the two files,plus several other optimizations. Suppose that a block at a particular level results in a confirmedmatch in the client file, it is unlikely that the sibling of that block would also find a match because

� Any match that is a continuation of the first match would have already been discovered atthe parent level

� Any other match is unlikely since the match found by the first sibling will likely extend atleast slightly into the other block

� Thus, if split the processing for each block size is splitted into two phases, first a search formatches using continuation hashes on blocks adjacent to confirmed matches, and then a searchusing global or local hashes

� Second omit sending hashes for any blocks whose sibling found a confirmed match in the firstphase (and also for any blocks for which continuation hashes were sent but no matches found)

2. Hierarchy Structures[17] : Rsync can be even more improved by maintaining largehierarchy of folders replicated in a distributed type environment. It was observed that thisproblem afflicted a number of important applications, like synchronization of Folders Hierarchybetween Peer-to-peer environments, synchronization of content between devices or accounts, contentdistribution and storage networks,large scale web search and mining and website mirroring. At coreof problem lay the File in Hierarchy directory synchronization challenge.

� Here a framework for remote file synchronization and describe several new techniques thatresult in significant amount of time savings and reducing error during files transfer isproposed by the authors.

� Focus on applications that involve very large collections of Hierarchy Folders including filesand folders

� The proposed algorithm adopts the Sender/Receiver’s Server structure based on a clientmodification

14

Page 17: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

And implementation of our framework and techniques achieves significant improvements over RSYNC.This standard is capable synchronization of large folder transfer between peer-to-peer distribu-tions. This method is provided for synchronizing folders between the server which is updated bysome client and other servers. Our algorithm adopts the Sender/Receiver Server structure basedon a client modification.

2.1.2 Study on DropBox as sync. software

Dropbox[18] is a file hosting service operated by Dropbox, Inc. that offers file synchronization, andclient software. In brief, Dropbox allows users to create a special folder on each of their computers,which then synchronizes so that it appears to be the same folder (with the same contents) regardlessof the computer it is viewed on. Files placed in this current folder are accessible too through a website and mobile phone applications.

� Dropbox has two parts, Dropbox server and desktop/ mobile client. Dropbox depends on thelibrsync which is very very similar to rsync.

� The Dropbox client enables users to drop any file into a designated folder that is then syn-chronize with Dropbox’s Internet service.

� Dropbox supports multi-user version controlling, allowing several users to edit and repost fileswithout overwriting versions.

� When a file in a user’s Dropbox folder is changed, Dropbox uploads only pieces of the file thatare changed when synchronizing, files uploaded are limited to not more than 300 MB per file.

� Dropbox provides a technology called LANSync, which allows computers on a LAN to securelydownload contents locally from each other instead of always hitting the central servers.

2.1.3 SyncBreeze File Synchronization Tool

SyncBreeze[19] is a powerful, easy-to-use and fast file synchronization solution allowing one to syn-chronize files between network shares, directories and NAS storage devices. The users areprovided with different product versions like freeware, pro, ultimate and server designed forhome users, power users, IT enterprises.SyncBreeze provides multiple one-way and two-way file synchronization modes, periodic con-tent synchronization, background content synchronization, compressed content synchronization, realtime content synchronization, an option to synchronize specific types of contents, user chosen GUIlayouts and permits one to define multiple customizable file synchronization commands making itvery simple to synchronize many numbers of directories, disks or NAS storage devices.

15

Page 18: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

There are some important features of SyncBreeze:

� Synchronizing Specific File Types or Categories

– SyncBreeze provides power computer users with the ability to synchronize specific filetypes or contents categories using single or more flexible file matching rules.

– For example, the user may specify to synchronize documents and digital images with thefile size more than 2 MB.

– During the content synchronization method, SyncBreeze scans the entered source anddestination folders and apply specified file matching rules to all the existing files.

– Contents not matching specified rules will be skipped from the file synchronization pro-cess effectively restricting the operation to user-selected files only.

� Synchronizing Disks or Directories

– Content synchronization with preview is more useful providing the user with a clearpicture about what contents will be synchronized.

– On the other hand, file synchronization with preview may be ineffective or completelyincorrect when there is a requirement to synchronize large directories or whole diskscontaining many thousands of files, mainly because of the fact that none will have thetime to review lists of content synchronization actions containing thousands of items.

� Periodic Execution of File Synchronization Commands

– Another option provided by SyncBreeze is ability to execute file synchronization com-mands periodically at user specified time gaps. SyncBreeze allows one to repeat everydayor every week sync operations to be performed at a specified time of the day.

– The major reason to execute a content synchronization command routinely is to continu-ously keep a frequently changing directory synchronized with a backup directory locatedin an external disk or a storage device.

16

Page 19: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

2.2 Study on E-learning through Mobile Devices

This part of literature survey is based on the implementation of E-learning environment through mo-bile devices like Mobile phones and Tablet pc etc[20] . Implementing a Mobile Campus Using MLEMoodle The main goal is to access learning materials and to support learning activities[21],[22]. The prototype of the deployed Virtual Campus using MLE Moodle enables mobile clients toperform online learning processes and is towards achieving the anytime, anywhere paradigm[23].Mobile devices have many limitations

1. computational capacity 2. small memory 3. limited graphical user interface

Integration with Web Technology (centralized Client/Server architectures, where a server applica-tion provides services to Clients) and here the difficulty is the limited capacity of mobile devicesand the lack of standards.Integration with P2P Technology: JXTA is the P2P open source platform, consists of XMLbased

protocols that permits connected device to exchange messages and collaborate in a decentralizedP2P mode and supports mobile phones and PDAs.

Proxy vs. Proxyless Architectures :

� Proxy access: Proxy is a computational device that acts on behalf other computational en-tity,so a proxy permits computational entities (nodes, peers) to indirectly connect to thenetworks (servers, broker or rendezvous peers ). Clearly, the access to resources goes throughcommunication with the proxy. Transparent proxy combines proxy server with NAT s.t. clientdo not know the existence of proxy.

� Proxyless access : Proxyless architecture solves some of the proxy base architecture, still it istoo difficult to integrate mobiles in a straightforward way to server applications.

The advantages of this standard is Control , Efficiency , Filtering. Disadvantages : Anonymity ,Security and trust , Inconsistency , Network stability 1. implemented a standard Virtual Campusin Moodle. 2. the Virtual Campus is extended with MLEMoodle module . Two servers , namely,

� Gateway Server , which is a proxy used by MLE (Mobile learning environment ) to accessthe Campus

� Message Server , which is a server for the instant messenger for mobile clients. Evaluationis done by Virtual Campus, Mobile Campus, Overall platform testing.

In the above discussion proxy and proxyless architectures, Gateway and message servers areconsidered as way to extend traditional virtual campuses with mobile clients. Indeed, the currentwide spread of mobile devices and wireless technologies brings an enormous potential to e-learning, interms of ubiquity, pervasiveness, personalization, flexibility satisfying ”anytime anywhere” paradigm

17

Page 20: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Chapter 3

Android Application ArchitectureFramework

As smart phones and tablets become more popular, the operating systems for those devices becomemore important[25] . Android is such an operating system for less powered devices, which run onbattery and are full of hardware like Global Positioning System (GPS) receivers, cameras, light andorientation sensors, WiFi and UMTS (3G telephony) connectivity and a touchscreen. Like all op-erating systems, Android enables applications to make use of the hardware features by abstractionand provide a defined environment for applications[24].

Structural overviewThe software stack of Android, as shown in figure can be subdivided into five layers: The kerneland native libraries, low level tools, native libraries, the framework layer and on the top of allapplications.

� The kernel in use is a Linux 2.6 kernel, modified based on special needs in power management,memory management and the runtime environment.

� Libraries like the libc or libm were developed especially for low memory consumption, asAndroid supposed to run on the devices with little main memory and low powered CPUs.

� Android Runtime consists of the Dalvik virtual machine (DVM) and Java core libraries.The DVM is an interpreter for byte code that has been transformed from Java byte code toDalvik byte code.

� Android Application Framework are written in Java and provide abstractions of theunderlying libraries and DVM capacities to applications.

� Android applications run in their own sandboxes Dalvik VM and can consist of multiplecomponents: Activities, broadcast receivers and data/content providers, services.

18

Page 21: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Figure 3.1: Android System Architecture

3.1 Introduction and overview of Android

Android OS has become the most popular OS of Linux kernel with approximately 60 millions newmobiles running Android every year[26] . Running applications is the main goal of OS and Androidprovides different layers to compose, execute and manage applications. For this purpose Androidclearly differentiates the terms application, process, task and thread. This chapter explains eachterm by itself as well as the correlation between the terms.An Activity is a single screen of anapplication like a browser window or a settings page. It contains elements that present data orallow user interaction.

Application lifetime states[32]On application starts individual components get started and in case of an activity the followinghooks are called sequential: onCreate(), onStart(), onResume().If an activity miss it’s focus, on-Pause() method is called and if an activity is not any more visible, onStop() is called.

� onCreate() This method is called for initialization and static set up purposes. It may getpassed an older state for resuming. The next method is always onStart().

� onRestart() After an activity is stopped and to be started again,is called and after onStart().

19

Page 22: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

� onStart() The application process type changes to visible and the activity is about to bevisible to the user, but its not in the foreground.

� onResume() The activity has the focus and can get user input. The application process typeis set to foreground.

� onPause() If the application loses the focus or the device is going to sleep, this hook is calledand the process type is set to visible. After running this hook, the system is allowed to killthe application at any time.

� onStop() The activity is no longer visible, the process type is set to background and theapplication may be killed at any time by the system to regain memory. The activity is eithergoing to get destroyed, or restarted.

� onDestroy() The last method that is called in an activity right before the system killsapplication or application removes activity.

3.2 A brief description on Dalvik VM

Android applications and the underlying frameworks are almost entirely written in Java. Insteadof using a standard Java virtual machine, Android uses its own VM. This virtual machine is notcompatible to standard JVM, Java ME as it is specialized and optimized for small systems. Thesesmall systems usually only provide low RAM, a slow CPU power and no swap space to compensatesmall memory issue.

The necessary byte code interpreter the virtual machine called as Dalvik. Instead of usingstandard byte code, Dalvik has its own byte code format which is adjusted to the needs of Androidtarget devices. The byte code is more compact than usual Java byte code and the generated .dexfiles are small.

3.3 Android Application Framework

This part deals with the android application framework and how applications in android OSwork.[33] Running applications is a major goal of operating systems and Android provides sev-eral means on different layers to compose and execute and manage applications.For this reason Android differentiates terms process, task, application and thread. This sub-section explains each term by itself as well as the correlation between the terms.

20

Page 23: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Figure 3.2: Life cycle of Activity

Figure 3.3: Android Application Framework

21

Page 24: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Processes threads

In Android five types of methods (processes) are distinguished in order to control the behavior ofthe system and its running programs. Various types have various and different importance levelswhich are strictly followed / ordered.

� Foreground : A process that is running an Activity, a Service providing the Activity, astopping Service or a starting Service or a currently receiving Broadcast-receiver.

� Visible : If a process holds a paused but still visible Activity or a Service bound to a visibleActivity and no foreground components, it is classified a visible process.

� Service : A process that executes an already started Service.

� Background : An Activity that is no longer visible is hold by a background process.

� Empty : These processes contain no active application components and exists only for cachingpurposes

Applications tasks

Android applications are run by processes and their included threads. The two terms task andapplication are linked together tightly, given that a task can be seen as an application by the user.Tasks are series of activities of possibly multiple applications.

� Tasks basically are a logical history of user actions, e.g. the user opens a mail application inwhich a specific mail is opened with a link included which is opened in a browser.

� In this scenario the task would include two applications (mail and browser) whereat there arealso two components of Activities, of the mail application and one from the browser includedin the task.

� An advantage of the task concept is the opportunity to allow the user to go back step by steplike a pop operation on a stack.

22

Page 25: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Figure 3.4: Application Architecture

Application internals

The structure of an Android application is based on four different components, which are: Activity,Service, Broadcast-receiver and Content Provider. An application does not necessarilyconsists of all four of the components, but to present a GUI there has to be at least a singleActivity.

� Applications can start other applications or specific components of other appli- cations bysending an Intent. These intents contain among other things the name of desired executedaction.

� The IntentManager resolves incoming intents and starts the proper application or component.Reception of any Intent can be filtered by an application.

� Services and broadcast receivers allow applications to perform jobs in the background andprovide more functionalities to other components.

� Broadcast receivers can be triggered by events and only run a short period of time whereas aservice may run a long time.

23

Page 26: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

AndroidManifest.xml

� All Android Dalvik applications need to have a XML document in the applications rootdirectory called AndroidManifest.xml.

� In the manifest file 23 predefined element types are allowed to specify among other thingsthe application name, the components of the application, permissions, needed libraries andfilters for intents and broadcasts.

� AndroidManifest.xml is used by various facilities in the system to obtain administrative andorganizational info. regarding the application.

3.4 Android Application Functionalities

The application framework of Android provides APIs in various areas like multimedia, GUI, net-working, power management and storage access. The libraries in the framework are written in Java.They run on top of core libraries of the Android Runtime .

� The Application Framework provides managers for different purposes like power manage-ment, resource handling, system wide notification and window management.

� Applications are supposed to use the services of the managers and not use the underlyinglibraries directly.

� This way it is possible for the managers to enforce application permissions through the meansof the sandbox permission system . e.g. initiate a phone call or send data over the network.

With the size and the change rate of a platform like Android, it is almost impossible to presentall aspects of such a system, hence this study thesis can only provide a first glance at Android.

It looks like Android is just another mobile operating system, but the wide support from largecompanies and Google have created Android one of the important contestants in the mobile sector.Openness and extensibility allow companies / manufacturers to modify the system to fit their needsand requirements, both in hardware as well as in software. This leads to a significant number ofdevices from many different manufacturers and each covers a different range of customers.

24

Page 27: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Chapter 4

Proposed Architecture

This chapter contains the detail description of architectures followed in the Applications staringfrom very Primitive level to High level. It describes about the Push/Pull mechanism for contentforwarding, RSA Public private encryption mechanism, global scenario of both the individual ap-plications and ultimately the flow charts describing the detail working process of the applications.

4.1 Push-Pull Framework for Content Forwarding

In the ’normal’ client/server model, clients request for service or information from a server, whichthe server responds in transmitting information to clients. This is called as pull technology; theclient pulls information from the server. Here, the content synchronization applications, performsa way different than a typical client server system. They make the use of both push and pullmechanism for content forwarding and synchronization[34] .

Publisher: It is the agent containing updated files in its repository. Publisher can be both Clientor Server itself.

Receiver : It is the agent who suppose to receive the recent version of file from the publisher.

Server

Client 1 Client nClient 2

DB

Figure 4.1: Pull Mechanism

The Pull approach in application includes requesting for the new content from publishers. When

25

Page 28: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

the pull program executes, it esquires all the client’s local directory, fetches data from individualmachine and stores in central repository i.e. central server collects recent contents as the receivers,from the source machines.

Server

Client 1 Client nClient 2

DB

Figure 4.2: Push Mechanism

In contrast to pull, in the Push approach, the central server forwards data to individual clients ona periodic basis creating a mirror copy of the source directory to the destination directory. i.e. thecentral server acts as publisher and transmits all data to receiver clients.

4.1.1 Content Forwarding in Local Synchronization Application

ServerTablet as Sender Database Tablet as Receiver

Selects File to send from local File Sys

PUSH the new content  to Server

Update new content in server's dir tree

Upadte DB Sender's Details, Query Dest Client  List

Recieve Dest List

PULL the new file from Server

Upadte DB with Receiver's Details

Figure 4.3: Local Sync. Content Frwd Mechanism

26

Page 29: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

In Local Synchronization Scenario, the application works on the basis of Push for contentforwarding to the server and from the server and Pull for the purpose of content back up andprocessing inside server based on the results from the Moodle database. The diagram depictedbelow, describes the content forwarding mechanism for single round transmission of file from theTablets as sender through the Central server to the receiver Tablet. The the detail mechanism isdescribed in the next section in the form of flow chart.

4.1.2 Content Forwarding in Remote Synchronization Application

In Remote Synchronization Application, the attempt to make application as simple as possibleat the client side, lead it to be designed based on Pull Mechanism at the client side and Pushmechanism at the server side. Clients only keep the new content inside the appropriate directorystructure created at their local machine by the server. Server pulls the new content added by theclient, store in the central database and Push further to individual clients.

ServerClient as Sender Database Client as Receiver

Store file in local public Dir

AUTOSYNC PULLsthe new content

Update new content in server's dir tree

Query Dest Client List

Recieve Dest List

PUSH the new file to dest clients

Figure 4.4: Remote Sync Content Frwd Mechanism

27

Page 30: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

4.2 Detail Architectures of Local and Remote Synchroniza-

tion Application

This section describes about the global view and in depth description of both Local and RemoteSynchronization applications respectively.

4.2.1 Local Synchronization Application

Moodle as the central controller :

In local synchronization, operates based on the Moodle Database. The central server creates its owndatabase tables based on the mapping done on Moodle, ex. Student table, Teachers table Detailstable etc. This auto generation of the application database based on Moodle database is repeatedin certain interval so that new registrations, deregistrations of Courses, Students, Teachers can behandled. The main reason for this mapping rather than direct access to Moodle Database is

� Moodle database Mapping is Complex and many many mapping have to be done to get theresult of a single query like the list of students registered for a particular Course under aparticular professor. So if each time for single round file transfer, the long chain of mappingwill be done, it will take a considerable amount of time for the total processing

� Every Institute may not be having Moodle. So they can manually configure the databasebased on their current Teacher, Students and Course details

Global Scenario

Figure 4.5 represents a typical scenario where Local Content Synchronization Application works in.

� The entire communication process is based on WIFI

� Each student have their own tablet (though it is not an mandatory condition of the applica-tion) and they connect to the central server by providing their Moodle User Id and Password

� The application provides the flexibility to set the Download path and Server’s Ip Address

� Unless modified, these fields will have the default values set at the beginning for Server’s IPAddress and /mnt/sdcard/downloads as default download location

� Both teacher’s and student’s behave as clients and only the different in functionality arecaptured at the server end processing

28

Page 31: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

� As described above, the Local Synchronization Application works based on Push from theTablets side keeping in view that the Battery Life of tablets are limited to 2-3 hours and ifthey are connected to wifi, the battery life reduces more rapidly

� So whenever the user wants only can send the files, get updated files or view the past filesharing details

Central Server  Moodle DB

S1

Sn

S3S2

T2

T1

Student  to Teacher

Teacher to Student

Figure 4.5: Overview of Local Synchronization

Detail Scenario

Unlike remote synchronization Scenario, in case of Local Synchronization, only synchronizationphase is there as the registration phase is considered to be based on the Moodle database.

Client Side :

� Set the Ip address and Default path to store downloaded files.

� Enter the UserId and Password for initial credential validation

� For Downloading files shed with the User:

– Click on the Update button

29

Page 32: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

– Select the type like, newly added, files from last 2 days, 1 week etc

– Check the default path set to get the downloaded files

� To get the details of file Send and Received

– Click on the View button

– The details of the particular user will appear on the Tablet screen

– This includes the type of the file (Send or Received by the User), Course name, Timeand Date and Filename

TABLET                                   SERVEREnter Login Credentials  Check Moodle DB 

ID PW pair exists ??

Get Error Message for wrong Credentials 

No

YesGet the main screen of the application

Select Update button from Main Menu

Select Appropriate Option to get Shared Files ex. New , 1 week and Submit Serve the Request for 

file to Tablet File Stored in the Scecified path 

Figure 4.6: Update File: Details Steps

� For Submitting any file for a particular course :

– Rename the file as ”UserId–Course–filename” format

– Click the submit button to browse the file list

– Select and send the appropriate file

30

Page 33: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

TABLET                                   SERVEREnter Login Credentials  Check Moodle DB 

ID PW pair exists ??

Get Error Message for wrong Credentials 

No

YesGet the main screen of the application

Select Submit button from Main Menu

Get the File Browser to browse through Local Files

Select the file to be sent  and Click SEND Button

Submitted file gets stored inside watched Directory

New content updated at DB with details of the Sender

Find Destination list from DB

Update Local Directory of Destinations at Server

Update DataBase with Receivers Details

Maintain a Back Up copy at the Server

Rename file as UserID_CourseID_filename

Figure 4.7: Submit File: Detail steps

31

Page 34: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Server Side

The server keeps on listening to a particular directory where the file are initially gets stored sentby the Tablet. The Server processes same computation for all files. When any new file is added thefollowing steps happen inside the server

� Get the file name and extract various parameters like user Id and Course info

� Find the valid entry in the database for that particular UserId and Course pair

� If the pair is invalid, discard all further processing

� If the same exist, create an entry in the database

� Find the destination list of UserIds

� Copy the file to reciver’s directory tree

� Update the database the details of the receivers

� Update the entire receiver’s directory structure, reconstructing the directories for files notdownloaded, shred in last 1 day, 2 days, 1 week etc.

� Back up the original file into a separate directory

4.2.2 Remote Synchronization Application

Global Scenario

The Institution offering Remote synchronization, has to run the Remote synchronization applicationon a server. Other institutions who want to get study materials from the offering institution, haveto register themselves at the application’s GUI by visiting the URL located in server. Teacherswho want to share their data also have to register themselves. After registration, users will find thedirectory structure has been created by the server in user’s local machine, based on the user’s namein the given path (provided at the time of registration), containing the course names as subfoldersinside it. The application will periodically check if any new content has been added by any teacher.If any new content found, it will copy the content to servers directory, finds the destination list ofrecipients and forward the content to them. So, in this application the offering institution will bethe server and all the institution, who register to get contents are the clients operatinf in 1 to Mrelationship.

The central server acts as publisher and transmits all data to receiver clients which are remotemachines located at geographically distributed locations. Because the primary goal is to use thissynchronization tool in educational environment the operational complexity at the client side hasbeen kept at minimum level. This application includes pull mechanism along with push mechanismkeeping in view to make the client end as simple as possible.

32

Page 35: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Cental Server

Institute 1

Institute n

Institute 3Institute 2

Institute 4

user 1

user 2

user 3

user n

Figure 4.8: Global view of Remote Sync

Detail Scenario

Figure 4.9 describes the detail scenario of Remote Content Synchronization application. It containstwo parts, Registration and Synchronization. The first part describes the registration processfollowed by the synchronization process.

Registration

This is the initial phase for both the clients who want to share their contents and who want toreceive them. Server initiates computations related to registration when any new registration takesplace.

Client Side

� Each client register them selves in the server’s GUI providing their details like Institute ID,systems credentials, IP address, path where they want the synchronization to take place etc

� Then submit the names of the courses, they want to get updates from or share updates withform the list of available options displayed in the course registration page

33

Page 36: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Server Side

� The server finds the list of newly registered users and creates directory tree inside itshelf

� Computes the pass phrase based on the user’s details

� Stores the corresponding RSA public key in side the newly registered client

� Creates directory structure inside the path provided by the client

Synchronization

The entire content transfer work is done in this phase. The registration and synchronization areto independent work and takes place simultaneously. However, clients registering as receiver willreceive the updated contents available which are available after their registration only.

Client Side Stores the content inside appropriate directory created by the server in the providedpath during the time of registration.

Server Side

� Periodically checks for the new content added by any client

� When found, it checks whether it’s already present in the servers directory tree and if nottrue continue for the next steps

� It calculates the checksum of the file and compare and find the minimal amount of content tobe copied to the server using the private key and public key pair

� After copying to the server, it finds the list of destination clients who supposed to receive thecontent

� Updates the sender and timestamp in the database

� Updates the file in server’s directory for each recipient creating a soft-link to the original file

� Checks for the file exist in the in the destination machines

� Transfers the file to the destination using the private key and public key pair

34

Page 37: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

CLIENT SERVERProvide details For Registration

Initiate Registration Process

UserID AlreadyExist!

Error Message

  No

Yes

Update Databse

Create Local Dir. TreeStore Public Key in Clients computer

Create Dir. Tree in Clients computer

Notify User for Successful registration

REGISTRATION

Store in File inside PUBLIC folder of local Computer AUTOSYNC detects change

Initiate Transfer Process

Check permission, size,mode, ownership 

   File  Already Present! Terminate Transfer Process

Yes

Calculate and sendRolling Checksums,Hash pair

New File/Modified Orig. File

 Recieve Checksum,Hashes

Send compressed encoded block Ref. No,hashes set

construct original file

     Update Sender's ID in DB

Update local directory tree

Find Destination list

 Send File List to Dest clientsCalculate and send Rolling Checksums Hash values

Compute optimal file & Send in compressed,encoded format 

construct original file

SYNCHRONIZATION

 Recieve Checksum,Hashes

Figure 4.9: Flow Chart for Remote Synchronization Application35

Page 38: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Key Based Authentication

Key Based Authentication is used in remote synchronization. As the server is visible over theInternet, use of public key authentication instead of passwords is better enforcing security to thecentral server. The user’s details are fetched from the database and user specific pass phrase isconstructed. Later on that phrase is used to create public and private key pair and then the key istransferred to the receiver/client. The only way to decrypt data encrypted with the public key iswith the matching private key. Although two keys are related to each other, a private key can’t becreated from its matching public key. So, after that all the transmission happens through publicprivate keys. If due to some reason, either the private key or the public key crashes, the password

less transfer will not happen, that time the application will use the default credentials provided bythe client for further data transmission till the end of current refresh cycle. During the next refreshcycle the pass phrase for the client server pair will be reconstructed again overwriting the existingone and the data transmission with the key pair will continue working.

36

Page 39: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Chapter 5

Implementation

This chapter describes the detail process followed in implementation. As described earlier, Localsynchronization and Remote synchronization follow different methods for content forwarding andthere are different types of security threats for each of them, the implementation of both thesynchronization applications are done based on different logic. However, in both the applications,the backend is implemented in Shell Scripting and Java. Java is used to communicate in betweenthe database and shell scripting. Central Server is of LAMP (Linux, Apache, Mysql, Php) Serverinstalled with Linux Ubuntu 12.04 operating system.

5.1 Implementation details of Remote Synchronization

The first part describes about the tools and utilities used in remote synchronization applicationfollowed by the step by step details.

Rsync :

� As already mentioned, rsync is a network protocol that synchronizes files and directories fromone place/location to another while reducing data transfer by using delta encoding whenappropriate to minimum

� It works in unidirectional way and in 1 to 1 fashion. In Remote synchronization application,Rsync has been used to fetch data from clients who are registered as contributors (teachers)at a prescribed interval

� Practically a cron job will repeat in everyday to fetch the newly added contents by the userand copy the content by rsync to central server. For transmission of data from central serverto the receivers Rsync protocol has also been used

37

Page 40: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

RSA keygen 2048 :

� ssh-keygen generates, manages and converts authentication keys for ssh process. Ssh-keygencreates RSA keys to be use by SSH protocol. The type of key to be generated is specifiedwith the -t option ex. rsa or dsa

� It accepts pass phrase to create the key. The default key length in bits is 1024 bits but toimpose more security, this application makes use 2048 bit key generation by specifying thekey length as an argument

ssh copy id

� ssh-copy-id is a script that uses ssh to log into a remote machine presumably using a loginpassword, so password authentication is to be enabled

� It also changes the permissions of the remote user’s home, to remove group writability, whichwould otherwise prevent from log in, if remote sshd has Strict-Modes configured in it’s con-figuration

� This is used by the application to store the key generated by RSA keygen as described abovein the remote machines

Expect spawn

Expect is a program that ”talks” to other interactive programs according to a script. An interpretedlanguage provides branching and high-level control structures to direct the dialogue. Rsync isa Unidirectional and 1 to 1 tool but the application need 1 to many transfer and bidirectionaloperation. This makes use of spawn which initiates certain process like ssh, ssh keygen etc. Thisis mainly useful in automatic passwordless login process. By using expect, interactive scripts havebeen written for the following purposes

� Automatically transfer the RSA Public key to the newly created users or to all the existingusers when the cron for redistribution of the public key repeats

� Automatically transfer or collect content from the users by using rsync to or from the remoteclients

� Creation of directory structure, at the user end after the registration process to create thedirectories in the specified path provided by the user during registration

38

Page 41: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Implementation Details

Registration of users :

Remote Synchronization application provides a user interface to register by the clients. Clients cango to that URL and provide their details and submit. The Registration page is designed in PHP,Javascript and Html.

Figure 5.1: The main page

� The main page allows the users to navigate accordingly based on the type like whether theuser is teacher or some other institution

� The users are instructed to install rsync to use this application

� The user’s details are checked against repeated inputs, invalid inputs and empty inputs. Ifprovided data do not fall in any of those categories, then the application checks whether thedetails are already present in the database table

� If true warning is generated by javascript catching results from the sql query and the appli-cation redirects the page to the main page

� If not the application inserts the details in the database in ”registration” table and redirectsthe page to add courses page

39

Page 42: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

� The application provides separate navigation for the Client institutions and faculties of theInstitution who are sharing their content

� The needed information for users are written on the main page of the user type, i.e. the clienttodo details are specified in ”Register Institution” page and faculty todo details are specifiedin ”Join as Faculty” page respectively

Figure 5.2: Page containing options for faculty

Add Courses by users:

� A user can add as many number of courses for as many number of departments as possible.The flexibility to the user is add courses at any point of time

� It accepts the input as User id and Ip Address which are considered as Unique pair and thendisplays the list of departments from the database after validating the entered details againstrepeated inputs, invalid inputs and empty inputs from the ”registration”

� Upon selecting any department, the application displays the list of courses as checkbox ele-ment. The user can enters multiple number of courses at a single time

� Then the application creates entry in ”details” table inserting the entered details

40

Page 43: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Figure 5.3: Faculty Registration

Figure 5.4: Faculty adding courses41

Page 44: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Update User information:

� When the Ip address, credentials of the user or any registration related information changes,the user can reset the new values by selecting the field to be changed and then entering theexisting User Id and Ip address

� Then the application provides the user is redirected to a page where the existing value as wellas the new value are expected to be entered

� In this submission also the user entered details are checked against repeated inputs, invalidinputs and empty inputs

� If provided data do not fall in any of those categories, then the application inserts the newvalues replacing the existing values both in registration and details directory

Figure 5.5: Modifying existing Fields

42

Page 45: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

View and Download Files:

� This is a very very advantageous feature of the application. It allows the users to login intotheir individual account maintained at the server and find the files or contents shared withthem

� This sharing is done based on the courses for which the user is registered for. The list of filesshown over here are same as the the list of files transfered to the remote machine

� This feature provides many features like, the user do not have to search the directories in-dividually because they can directly see the list files shared with them with details like thecourse the belong to, data and time related information

� The user can download individual files as and when needed from the server

� This helps in another way also, i.e. by simply viewing the course and filename pair, the userscan find out which are the files stored in their local system and in which folder respectively

Figure 5.6: Login to View and Download the shared files

43

Page 46: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Figure 5.7: Login to View and Download the shared files

Case Studies:

� Figure 5.8, 5.9, 5.10 and 5.11 represent several Case Studies of the Remote synchronizationapplication

� Figure 5.8, represents the error message generated while wrong inputs are inserted in the formduring updation od already existing information in the database

� Figure 5.9, represents the error message when Empty fields entered during the Registrationphase

� Figure 5.10, represents the success message when the entered values are not duplicate (existin the database), empty and invalid types at the end of the Registration phase

� Figure 5.11, represents the success message when the entered values are not duplicate (existin the database), empty and invalid types at the end of the Update Information phase keepingother parameters as they are.

44

Page 47: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Figure 5.8: CASE 1 : Error Message when invalid inputs

Figure 5.9: CASE 2 : Error Message when Empty fields entered

45

Page 48: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Figure 5.10: CASE 3 : Success Message when values Updated

Figure 5.11: CASE 4 : Success Message when user Registered

46

Page 49: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Server side implementation:

Following are the step by step details of server side implement:

� The server runs a script to find the newly registered users both as contributor and receiversperiodically through a cron job

� This creates corresponding users public directory inside the server and add each registeredcourse name as directory inside the public directory

� Then uses expect to spawn ”scp” to automatically transfer the public key through ”ssh copy-id” to all the newly registered user

� Then uses expect to spawn ”scp” to automatically transfer the public key through ”ssh copy-id” to all the newly registered user

� Handling the issue of lost or corrupted key another cron repeats for transmission of publickey to all the already registered users replacing the existing key of server

� If the key is corrupted/deleted/lost due to any reason at some point of time, the data trans-mission continues through transmission by using password. In the next cycle, when the keyis again stored, the passwordless transmission continues as before

� After this another script repeating at some interval in cron checks periodically whether anynew content is added by the ”contributors” only and fetches the new content to the serverscorresponding local directory by making use of expect to spawn ”ssh” and transfer throughrsync

� When an new content is added the corresponding recipient list is calculated from the database”details” table and a softlink is created to the original file at respective destination users publicserver directory

� Then the file is transferred to the remote receivers again by making use of expect to spawn”ssh” and transfer through rsync. These files when transferred by rsync over network arecompressed and encoded before transmission at the binary level[16]

5.2 Implementation of Local Synchronization Application

Moodle v1.9 and v2.3 :

Moodle is open source CMS (course management system ), used by thousands of educational in-stitutions around the globe to provide an highly organized and secured interface for e-learning.Moodle allows educators to create online courses, which users can access as a virtual classroom.Moodle is open source, or freely distributed. This application performs synchronization based onthe database content and the application database is generated on the basis the result obtainedfrom the mapping on Moodle database. This has been tested both in Moodle 1.9 and 2.3 versionsof moodle, i.e. the institutes following any version of Moodle are capable of running the application.

47

Page 50: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

iNotify :

Inotify (inode notify) is a Linux kernel subsystem that acts to extend filesystems to notice changesto the filesystem, and report those changes to the application. A watch is at the core of Inotify. Inthis application iNotify WATCH has been established in monitoring for events for file uploadingpurpose by tablets. The application makes use of iNotify WAIT to keep on watching till anymodification is done on the directory under WATCH.

Implementation Details

Login and Setting parameters :

Figure 5.12: Login screen Figure 5.13: Setting Screen

48

Page 51: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

� Aakash Tablet is a android based operating system which works on Linux Kernel. Whereusers have to set Server Ip Address and default path to store the downloaded file. If thesevalues are not set, the application uses the default values

� After getting the login credentials, the client side application calls the server as http requestadding UserId Password pair as Name-Value Piar. This is a check in the application databasewhere the server accepts the arguments and responds ”User found” if the UserId and Passwordpair exists otherwise responds ”Invalid Entry”

� The android application receives the response from the server and redirects the page to Mainpage if the UserId and Password pair exists otherwise shows error message as a toast notifi-cation

� User clicks the submit button when she/he wants to send a file. This requires the file to berenamed as the predescribed format. The application finds the files and folders inside thelocal storage and displays them as individual element without opening a separate file browserproviding up button to go up

� The time user selects any particular file, the application displays the filename to confirm thefile to be send to the server and after clicking the SEND button the file delivered to the servervia wifi connection

Figure 5.14: User Validation from Server’sDatabase Figure 5.15: Main Screen

49

Page 52: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Figure 5.16: Screen afterClicking Submit button

Figure 5.17: Screen showingFile Browser with UP button

Figure 5.18: Screen after se-lecting the file to send file

View the Details of last Transactions and Download a file from server

� This is an additional functionality provided by the application to the users. After clickingon Veiw button, the users can view the list of files shared with them or send by them. Thisworks as a decision maker for the user whether to click the Update button or not

� The application sends the userId as http request, requesting for the detailed information ofthat particular User. Server query the database and sends back the results to the tablet.Then the application displays the results in a tabular format

� From the View results, user can know which are the file she/he has not downloaded till now,at what time they are share with the user, in which course and by which teacher, savingrepeated file transfer via wifi as large file transfer takes long time in wifi and consumes morebattery in the tablets

� The user can download the files needed or the entire set of files from the server and client sideapplication fetches the appropriate file or folder depending on the UserId and the option theuser has opted for. They get stored to the default download folder of local storage system asopted.set by the user

50

Page 53: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Figure 5.19: Page Showing several Options for downloading appropriate file

Processing each event at the server:

� When any user (independent of whether a teacher or student ) submit any file, that gotuploaded in the watched directory. inotify performs all the further computations based onevery single upload event. Thus making availability of the file to the destinations in real time

� As soon as the file upload completes, iNotify redirects the file to the public directory of theuser, extracting the UserId from the file name. Every single user’s public directory are undersingle watch of iNotify tool. So when the file gets stored inside the public directory of theuser, the corresponding iNotify calls shell scripts to perform further computation

� The shell script first creates an entry in the database with the details like UserId, CourseId,filename, type (Send/Received) and timing. After that the list of receivers found based on thecatagory of the User. i.e. if the user is a student the destination list should include only theteachers who are offering that particular course but if the user is a teacher the destination listshould include rest of the teachers of the course (in case more than one number of teachersoffering the same course) along with all the registered students

� Then the file is copied to the public directory of individual user inside Downloads directoryof the server along with that keeping a backup copy at the server and update the databasewith all the detail informations as specified above for each of the user in the destination list.The application offers the users to download files share in last 1 day, 2 days, 1 week, 2 weeks,1 month etc. So, server recreates the file structure adding this new file to appropriate folders

51

Page 54: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Figure 5.20: Page Displaying Last Transactions of the logged in User

52

Page 55: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Chapter 6

Experiments and Analysis of Results

Rigorous experiments have been conducted on Remote Synchronization application based on variousparameters and factors. The results obtained in the testing have been compared and analyzedagainst SCP and certain other parameters. This section describes about the Objectives, Scenarios,Obtained results and Analysis done on the results proving the efficiency of the application.

Test Scenario

The main objective and goals of the conducted experiments is to know the performance of theremote synchronization application under various conditions. The tests have been conducted forseveral type of conditions like

� varing number of clients for receiving content

� varing file size being transmitted

� transmission time difference with public and without public private key pair

� the transmission time for original transmission and retransmission of the same file of slightlymodified file name and even content

� the transmission time difference between conventional scp based transmission and rsync basedtransmission

� disconnecting the transmissions while the data transfer is going on

The central server is LAMP(Linux, Apache, Mysql, Php) server, and the clients are eitherWindows or Linux (Ubuntu 12.04) type. Initially all the testing were carried out without usingthe key and later on the same experiments were repeated using the generated key. The entireexperiments are conducted with foru sets of users, 20 user set, 50 user set, 75 user set and 100 userset respectively. Around 15 experiments have been conducted for various file sizes as mentioned inthe test scenario , i.e. 10kb, 50kb, 100kb upto 2 gb, for each set of clients.

53

Page 56: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

  User SET File Size 20 CLIENTS 50 CLIENTS 75 CLIENTS 100 CLIENTS 10 KB  30 69 108 145

 50 KB  30 69 108 145

 100 KB  31 71 109 146

 500 KB  32 72 109 147

 1 MB 34 79 112 148

 5 MB  36 89 118 151

10 MB 40 105 125 159

50 MB 118 271 375 545

100 MB 153 412 625 925

200 MB 306 934 1801 2141

400 MB 544 2116 2916 4214

500 MB 590 2640 3687 5689

700 MB 866 3689 4883 7944

850 MB 1199 4440 6621 8932

1 GB 1280 5280 7186 10067

2 GB 2587 11653 ­­­ ­­

Figure 6.1: Results of various size of file transfer to various user sets

54

Page 57: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

  User SET 

File Size75 CLIENTS 75 CLIENTS

RETRANSMISSION100 CLIENTS 100 CLIENTS

RETRANSMISSION

 10 KB 108 108 145 145

 50 KB 108 108 145 145

 100 KB 109 109 146 146

 500 KB 109 109 147 147

 1 MB 112 112 148 148

 5 MB 118 116 151 151

10 MB 125 117 159 153

50 MB 375 119 545 155

100 MB 625 121 925 156

200 MB 1801 123 2141 159

400 MB 2916 125 4214 162

500 MB 3687 127 5689 163

700 MB 4883 130 7944 167

850 MB 6621 135 8932 172

1 GB 7186 141 10067 176

Figure 6.2: Results of Retransmission time taken for the user sets of 75 and 100

55

Page 58: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

The findings of Figure 7.1 and Figure 7.2 are discussed as follows:

� Figure 7.1 represents the data obtained by transferring various files sizes from the server tovarious user sets. All the results are for transmission time in seconds using RSA keys.

� The table data shows that upto 10MB of file transfer, the total elapsed transfer time is same.One major observation from the table is the highest amount of data transfer is 100GB ofdata all total to 100 user transferring 1GB to each user.

� This consumed around 3hr 20min of time which is a quite less amount of time for huge volumeof data transfer like this in a completely automatic manner.

� A manual testing for transferring a total of 10GB data transfer through USB3 consumedaround 12 minutes, where as USB3 is considered to be a very hi-speed transmission medium.

� Figure 7.2 represents the retransmission time elapsed for user sets of 75 and 100. As alreadynoted for file size upto 10MB, the transmission time is the minimal amount time to transferthe file to that particular set of users.

� This retransmission experiment on small sized files like pdfs or ppts are done by slightlymodifying content of original file and for big sized files (video files) the retransmission isperformed with the same file

� A clear result form the data is no matter how big is the file in size, the transmission withRSYNC protocol will mimimum time to transfer it over network. There is a very littletime difference in transferring file retransmission between 10 KB and 1 GB and that timedifference is the time taken for computing and comparing and communicating the hash andoffset pairs

� As a result the repeat transfer of files over network by this remote synchronization applicationwill consume the time transfer time needed to transfer the new content only

However there are many other documents obtained as a results of the experiment . The impor-tant parts are only displayed in the report in above tables and analysis done in the next section isbased on all the results obtained i.e. not confined to the displayed data in the tables.

Analysis of Results

This section analyzes the results which have been represented in graphical format.The initial communication process to find the minimum content of a file to be transferred to the

receiver consumes a very huge amount of CPU computation power therefore requiring a very highperformance system to be the server. All the experiments for this application have been carried outin a 2GB RAM, 64-bit, Intel i3 processor Laptop. In such limitation scenario, the contentsynchronization application produced a very good result, so any high performance, high speed serverwill certainly provide much better result causing the Application to be more faster with comparedto the current results.

56

Page 59: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

20 Users 50 Users 75 Users 100 Users0

1500

3000

4500

6000

7500

9000

10500

Transfer Details varing file sizes and No of recipients

100 MB

500 MB

1 GB

Number of users

Tim

e E

lap

sed

in s

ec.

Figure 6.3: Comparison of File Transfer time for various User sets

File transfer in various user sets

� As shown in figure 7.3, the datasets are selected as 100MB, 500MB and 1GB for all the setof 20 users, 50 users, 75 users and 100 users

� This is a comparative view of time taken for file transfer in the overall scenario of testing bythe application

File transfer via SCP vs Sync Application

� Figure 7.4 represents the scenario of transmission of the same file over SCP and the developedcontent synchronization application. The results shown for Application is obtained by theexperiments specified in the previous section, and the results foe SCP is obtained by trans-mitting the file to one user and multiplying that values to the total no. of users, though inpractical scenario, the same will take more time

� The figure shows that the file transfer in SCP for total of 100 GB data transfer may take upto8hrs and the same by the application took nearly 3.5 hrs

57

Page 60: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Figure 6.4: File transfer via SCP vs Sync Application

100 KB 1 MB 10 MB 100 MB 200 MB 500 MB 850 MB 1 GB

0

2000

4000

6000

8000

10000

12000

14000

16000

18000

20000

22000

24000

26000

SCP Remote Sync Application

Figure 6.5: Retransmission time comparision

100 KB 1 MB 10 MB 100 MB 200 MB 500 MB 850 MB 1 GB0

500

1000

1500

2000

2500

3000

3500

4000

4500

5000

5500

SCP RSYNC+KEY

58

Page 61: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Retransmission time in SCP vs Sync Application

� There is a very high probability of retransmission of the same files. So we have comparedthe results obtained by transmitting the already transfered files with a small modification orwithout modification, in the remote synchronization application using rsync and key pairsand commonly used remote transfer tool called SCP as in Figure 7.5.

� For no modification case in the file content, SCP is consumes around 60-70% time comparedto original file transfer. Where as, the synchronization application takes considerably lessamount of time, thus proves to be very very useful in case of large number of file transfers tohundreds of users.

Figure 6.6: Performance Comparison between Application, Rsync and SCP

100 MB 500 MB 1 GB0

2000

4000

6000

8000

10000

12000

14000

16000

18000

20000

22000

24000

SCP

RSYNC

Application

Comparison of file transfer via Application with RSYN and SCP

Finally considering the most important issue, the transfer time when the file is being transferedfor the first time transfer, rsync takes comparatively less time from scp based file transfer and whenAutosync transfer’s file, it uses the RSA keys for pass wordless transmission, thus taking quite lessamount of time for file transfer. The main reason lies in the fact that, it uses the key to authenticatethe receivers and once the receiver is authenticated, all the file transfer via RSYNC will be without any credential checking.

59

Page 62: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Chapter 7

Conclusion and Future Work

The effect of e-learning on global learning process has been exponentially growing over past decades.E-learning, in different manifestations, has made its way into the majority of educational settings,bringing an evolution in learning environment ending up with a paradigm shift regarding the generalunderstanding of learning itself. It not only provides learning and organizational facilities but alsooffers communication and interaction supports.Local Synchronization application synchronizes files chosen by senders to the list of authorizedreceivers through Aakash tablets based on Moodle, allows to download the shared documents tolocal storage, view details of last transactions, configure default loaction and server locations etc.providing features like Assignment submission by students, study material distribution by teachersto registered students based on Moodle entry. Remote Synchronization Application allows to syn-chronize the data kept in the server created directory at the remote computers and synchronize /update the data to the registered computers.The architecture of content synchronization application serves the purpose of establishing consis-tency among data from a source to one or multiple target data storage in two way manner overtime. As learning in general shifted from a teacher-centered process to a learner-centered one, theSynchronization Application will certainly contribute to make contents like pdfs, ppts, study ma-terial even video tutorial readily available to the students and assignments submissions, feedbacksreadily available to teachers. In the area of e-learning, Content Synchronization Application, au-tonomously tailors the learning content and learning support to the individual learners as well asto the groups of learners and even between institutions . I have submitted the work done by me onRemote Content Synchronization Application in IEEE Transactions on Learning Technology. Myfuture work is to submit the work I have done for Local Content Synchronization Application forAakash tablets so that the idea will inspire and guide individual who want to work more on thesame field.

60

Page 63: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

Bibliography

[1] Cesar Correa Arias, Collaborative Academic Work as a Power Strategy for an Inclusive E-learning Education,University of Guadalajara, MexicoIEEE, ICEMT 2010.

[2] Jianfeng Zhu, Study On E-learning Education Model Based on Web Intelligence, HarbinNormal University, Harbin, China, International Conference on e-Education, e-Business, e-Management and e-Learning, IEEE 2010.

[3] Shu Na, Liu Jing, The Impact of Learner Factor on E-Learning Quality, Department ofEducational Technology, Capital Normal University, China,International Conference on e-Education, e-Business, e-Management and e-Learning, IEEE 2009.

[4] Alireza Ghobadi, C. Eswaran, Chin-Kuan Ho, Automated tools for manipulating files in adistributed environment with RSYNC, Advanced Communication Technology (ICACT), Feb.7-10, IEEE, 2010.

[5] Meilian Lu, YubingZeng, Research And Implementation Of Multi-device Content Synchro-nization In Converged IP Messaging System, Beijing University, China, International Confer-ence on Information and Multimedia Technology, IEEE 2009.

[6] Microsoft Window’s Site, http://windows.microsoft.com/en-in/windows-vista/

what-is-the-difference-between-one-way-and-two-way-sync, June 2013.

[7] Copyright TGRMN Software. TGRMN Software products, ViceVersa: File Synchronization,File Replication, Windows Backup Software, http://www.tgrmn.com/web/kb/item78.htm,June 2013.

[8] Hao Yan, Utku Irmak, Torsten Suel, Algorithms for Low-Latency Remote File Synchroniza-tion, CIS Department, IEEE INFOCOM proceedings of Communications Society, 2008.

[9] Hao Zhang, Chuohao Yeo, and Kannan Ramchandran, RATE EFFICIENT REMOTE VIDEOFILE SYNCHRONIZATION, Department of EECS, University of California, USA, Confer-ence on Speech and Signal Processing IEEE (ICASSP), 2009.

[10] Aakash (tablet), http://en.wikipedia.org/wiki/Aakash_\%28tablet\%29, 17 June 2013.

[11] Public and Private Keys, Key-Based SSH Logins, https://help.ubuntu.com/community/SSH/OpenSSH/Keys, June 2013.

[12] Andrew Tridgell,Paul Mackerras, The rsync algorithm, Department of Computer Science,Australian National University, Australia, http://rsync.samba.org/tech_report/, June2013.

61

Page 64: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

[13] Infrant Technologies, READYNAS INSTANT STORAGE, Using Rsync for NAS-to-NASBackups, 2006.

[14] Torsten Suel Patrick Noel Dimitre Trendafilov, Improved File Synchronization Techniques forMaintaining Large Replicated Collections over Slow Networks, International Conference onData Engineering (ICDE), IEEE 2004.

[15] Utku Irmak Svilen Mihaylov Torsden Suel, Improved Single-Round Protocols for Remote FileSynchronization, CIS Department, IEEE, 2005.

[16] Ryozo Kiyohara, Satoshi Mii, Koichi Tanaka, Yoshiaki Terashima, Hidetoshi Kambe, Studyon Binary Code Synchronization in Consumer Devices, IEEE Transactions on ConsumerElectronics, Vol. 56, No. 1, FEBRUARY 2010.

[17] Alireza Ghobadi, Ehsan Haji Mahdizadeh, Pre-Processing Directory Structure For ImprovedRSYNC Transfer Performance, International Conference on Advanced Communication Tech-nology(ICACT) 2011.

[18] SyncBreeze File Synchronization Flexense Ltd, SyncBreeze File Synchronization User Man-ual, Version 5.3, June 2013

[19] A Guide To Getting Started With Dropbox File Backup Sync, http://www.guidingtech.com/3656/dropbox-file-backup-sync/, 2013.

[20] Mitsushi Fujimoto, Stephen M. Watt, An Interface for Math e-Learning on Pen-Based MobileDevices, 2009.

[21] Giuseppe Laria, Mobile and nomadic user in e-learning: the Akogrimo case, Grid for complexproblem solving, SIXTH FRAMEWORK PROGRAMME, PRIORITY IST-2002.

[22] Jason Haag, From eLearning to mLearning: The Effectiveness of Mobile Course Delivery,Advanced Distributed Learning Initiative, Interservice/Industry Training, Simulation, andEducation Conference (I/ITSEC) 2011.

[23] Fatos Xhafa, Santi Caballe, Isaac Rustarazo, Leonard Barolli, Implementing a Mobile CampusUsing MLE Moodle, Technical University of Catalonia, Spain, International Conference onP2P, Parallel, Grid, Cloud and Internet Computing, IEEE, 2010.

[24] The Method of Android Application Speed up by usingNDK Ki-Cheol Son Prof. Jong-YeolLee Dept. of Electronic Engineering, 2010.

[25] Android: Changing the Mobile Landscape Margaret Butler, Published by the IEEE CS n1536-1268/11/ IEEE, 2011.

[26] Foutse Khomh, Hao Yuan, Ying Zou, Adapting Linux for Mobile Platforms: An EmpiricalStudy of Android, 28th IEEE International Conference on Software Maintenance (ICSM),2012.

[27] Jingtong Hu, Chun Jason Xue, Edwin H.-M. Sha, Yi He, Reprogramming with MinimalTransferred Data on Wireless Sensor Network, Department of Computer Science, Universityof Texas at Dallas, IEEE, 2009.

62

Page 65: Content Synchronization Applications for Aakash Tablets ... · Content Synchronization Applications for Aakash Tablets and Remote Educational Institutions ... Indian Institute of

[28] Alireza Ghobadi, C. Eswaran, Nithiapidary Muthuvelu, Ian K.T. Tan, An Adaptive WrapperAlgorithm for File Transfer Applications to Support Optimal Large File Transfers, AdvancedCommunication Technology (ICACT), IEEE 2009.

[29] Meilian Lu, YubingZeng, Research And Implementation Of Multi-device Content Synchro-nization In Converged IP Messaging System, IEEE Computer Society, 2009.

[30] Sattar J Aboud, Mohammad A AL-Fayoumi, An Efficient RSA Public Key EncryptionScheme, Fifth International Conference on Information Technology: New Generations, IEEE2008.

[31] Milad Bahadori, Mohammad Reza Mali, Omid Sarbishei, Mojtaba Atarodi, Mohammad Shar-ifkhani, A Novel Approach for Secure and Fast Generation of RSA Public and Private Keyson SmartCard, IEEE 2010.

[32] Wei-Meng Lee, Beginning Android Application Development, Wiley Publishing, Inc. Indi-anapolis, Indiana, 2011.

[33] Reto Meier, Professional Android Application Development, Wiley Publishing, Inc., Indi-anapolis, Indiana, 2011.

[34] Improving Data Access Performance with Server Push Architecture Xian-He Sun, SurendraByna, Yong Chen Illinois Institute of Technology Department of Computer Science, IEEE2007.

[35] Staggered PushA Linearly Scalable Architecture for Push-Based Parallel Video Servers JackY. B. Lee, Member, IEEE, 2002.

[36] Global Information Broadcast: An Architecture for Internet Push Channels T IE L IAOINRIA/CS-Telecom, France, JULY– AUGUST 2000.

63