Processing Linked Data onMobile Devices Tuan Anh, Le Submitted in fulfillment of the requirements for the degree of Master of Science SUPERVISOR Prof.. Applying Linked Data technologies
Trang 1Processing Linked Data on
Mobile Devices
Tuan Anh, Le
Submitted in fulfillment of the requirements for the degree of Master of Science
SUPERVISOR Prof Manfred Hauswirth
Dr Danh Le Phuoc
Digital Enterprise Research Institute, National University of Ireland, Galway
January 2015
Trang 2i
Trang 3“If you optimize everything you will always be unhappy.”
Donald Knuth
Trang 4iii
Trang 5The Semantic Web has been evolving and becoming the preferred choice for representing infor-mation not only on the Web but also on mobile systems Applying Linked Data technologies
on mobile systems could enable a wide range of novel mobile applications Furthermore, the computational, storage and network capabilities of mobile devices are constantly improving, thereby raising interest in moving Linked Data processing closer to mobile applications Using RDF triplestores for storing and processing Linked Data locally on mobile devices could reduce data transmission costs, lowering the risks of intermittent connectivity and increasing the security of personal data Due to these advantages, there are several works that port existing tools for processing Linked Data from workstations to mobile devices However, whereas the systems for workstations are designed for using GBs of main memory and efficiently storing data
on magnetic disks, mobile devices have limited memory and are equipped with flash disks The differences in computing environments and storage mediums lead to performance and scalability issues in existing mobile RDF triplestores Therefore, algorithms and techniques for RDF triplestores need to be carefully re-engineered to create an efficient RDF triplestore specifically for mobile devices
In this work, we first conduct an empirical evaluation of existing mobile RDF triplestores to identify their performance and storage shortcomings These findings serve as input for a novel design of an RDF triple store tailor-made for mobile devices We then implement this design
on the Android platform as a faster and more scalable version of RDF on the Go Finally, we evaluate the performance and scalability of RDF on the Go to demonstrate the advantages of our design
Trang 6First and foremost, I would like to thank my mentor Dr Danh Le Phuoc for his guidance and valuable support throughout the preparation of this work and in particular for his input and feedback on the formal model I also would like to thank my supervisor Prof Manfred Hauswirth for his helpful and constructive contributions during the GRC meetings that have helped a lot
in directing the research efforts of this work Despite his positions as both vice director of DERI and group leader, he always had an open ear for my matters
Special thanks are due to my colleagues Dr Gregor Schiele and Dr Martin Serrano with whom
I co-authored two papers Moreover, I want to express my gratitude to Aidan Hogan and Hung Ngo Quoc, my friends in DERI who have spent their valuable time helping me correct my writing
Above all, I wish to express my sincere gratitude to my beloved family for all their kind support and the sacrifices made throughout this work
v
Trang 71.1 Motivation 1
1.2 Problem Statement 3
1.3 Thesis Contributions 5
1.4 Thesis Outline 6
2 Background 7 2.1 Resource Description Framework 7
2.2 Physical Storage of RDF data 10
2.3 Mobile Database 11
2.3.1 Mobile Applications 12
2.3.2 Requirements of Mobile Databases 13
2.4 Flash Memory 14
2.5 Mobile Semantic Web Frameworks 16
2.5.1 Mobile RDF Frameworks 16
2.5.2 Query and Persistence Frameworks 17
3 Empirical Evaluation and Experiment Analysis 18 3.1 Evaluation Design 18
3.2 Evaluation Results 21
3.3 Analysis of Evaluation Results 24
3.4 Conclusion 26
4 An Architecture of Mobile RDF Triplestore 27 4.1 Architecture Overview 27
4.2 Dictionary 31
4.3 Physical Storage 33
4.3.1 Access Pattern 33
4.3.2 Sorted list 34
vi
Trang 8Contents vii
4.3.3 Two-layer Index 35
4.4 Summary 36
5 RDF On The Go - mobile RDF triplestore 38 5.1 Performance Evaluation 38
5.1.1 Experimental Setup 39
5.1.2 Evaluation Results 39
5.2 Scalability Evaluation 43
5.2.1 Experiment Setup 43
5.2.2 Evaluation Results 45
6 Conclusions and Future Researches 48 6.1 Conclusion 48
6.2 Future research 48
A Performance of Berkeley DB & SQLLite 50 A.1 Comparison of write performance 51
A.2 Comparison of read performance 51
Trang 9List of Figures
2.1 Triple concept 8
2.2 RDF triple 8
2.3 RDF Graph 9
2.4 SPARQL Query 9
2.5 SPARQL Triple Pattern 9
3.1 Testing application design of Android RDF store 19
3.2 Updating throughput of OTG-BDB & TDBoid 21
3.3 Memory usage of OTG-BDB & TDBoid 22
3.4 Query response time (OTG-BDB & TDBoid) 23
3.5 Inserting throughput and memory usage of OTG-BDB 25
4.1 System architecture overview 28
4.2 Node Store 31
4.3 Triple lists 33
4.4 Index table 35
4.5 Spare Index on Triple Table 36
5.1 The update throughput of RDF-OTG, OTG-BDB and TDBoid 40
5.2 Memory usage of RDF-OTG, RDF-BDB and TDBoiD 41
5.3 Inserting throughput and memory usage of RDF-OTG 42
5.4 Query response time of RDF-OTG, TDBoiD and RDF-BDB 42
5.5 Scalability of RDF-OTG 45
A.1 Writing speed of SQLLite and Bekelery DB 51
A.2 Read speed of SQLLite and Bekelery DB 51
viii
Trang 10List of Tables
4.1 Possible query patterns and corresponding indexes 34
5.1 Memory consumption of mix queries/size of data 43
5.2 Android devices 44
5.3 Memory consumption of queries mix/size of data 44
5.4 Query response time (seconds) on HTC Desire 46
5.5 Query response time (seconds) on Galaxy Nexus 46
5.6 Query response time (seconds) on Nexus 7 tablet 47
5.7 Memory consumption query mix on different size of data 47
B.1 Parameters of SPARQL queries 57
ix