Porting TomP2P to NET Benchmarking P2P in Java and C

Porting Tomp2p To Net Benchmarking P2p In Java And C-Free PDF

  • Date:28 Nov 2019
  • Views:81
  • Downloads:1
  • Pages:73
  • Size:2.12 MB

Share Pdf : Porting Tomp2p To Net Benchmarking P2p In Java And C

Download and Preview : Porting Tomp2p To Net Benchmarking P2p In Java And C

Report CopyRight/DMCA Form For : Porting Tomp2p To Net Benchmarking P2p In Java And C


Master Thesis,Communication Systems Group CSG,Department of Informatics IFI. University of Zurich,Binzm hlestrasse 14 CH 8050 Zurich Switzerland. URL http www csg uzh ch, This thesis documents the porting of the core functionality of the open source TomP2P. library a P2P based high performance key value pair storage from Java to NET The. port is written in C and inter operable with its Java counterpart NET specific con. ventions and programming methodologies are used such as the C language feature for. asynchronous programming The absence of third party Java libraries i e The Netty. Project requires workarounds to achieve semantically equivalent behavior in NET The. port s API remains identical developer friendly and easy to understand Besides porting. this thesis conducts benchmarks on multiple virtual machines to compare Java and NET. with respect to execution time and memory allocation These benchmarks measure P2P. specific real world scenarios implying asynchrony network latency and I O streams The. gained results show that NET s Command Language Runtime CLR yields better results. regarding the average execution time especially for the first few executions of code blocks. In the long run however Java Virtual Machines JVMs produce similar results The. different memory allocation strategies for CLR and JVM implicate initially higher but. gradually steadier allocations for the CLR and initially low but gradually exceedingly. high memory consumption for JVMs When it comes to speed in network operations both. Java and NET achieve comparable results For long term networking scenarios however. TomP2P for Java scales better in terms of memory thanks to third party functionality not. yet present in the NET counterpart,Zusammenfassung. Diese Masterarbeit dokumentiert die Portierung der Kernfunktionalita t der TomP2P. Bibliothek einer P2P basierten und hochperformanten Speicherlo sung fu r Schlu ssel Wert. paare von Java nach NET Die portierte Bibliothek ist mittels C geschrieben und mit. der Java Version kompatibel Es werden NET spezifische Konventionen und Program. miermethodiken angewandt sowie Spracheigenschaften von C beispielsweise fu r die. asynchrone Programmierung genutzt Aufgrund fehlender Java Module von Drittanbietern. wie dem von The Netty Projekt sind Hilfskonstruktionen notwendig um eine semantische. A quivalenz in NET zu erreichen Die portierte API bleibt identisch entwicklerfreundlich. und einfach zu verstehen Neben der Portierung fu hrt diese Masterarbeit auch Benchmarks. auf mehreren Virtual Machines durch um Java und NET bezu glich Laufzeit und Spei. cherverbrauch zu vergleichen Diese Benchmarks messen reale P2P spezifische Szenarien. welche Asynchronita t Netzwerklatenz und Datenstro me mit einbeziehen Die gewonnenen. Resultate zeigen dass NET s Command Language Runtime CLR bessere Resultate im. Bezug auf die durchschnittliche Laufzeit vor allem fu r die ersten paar Ausfu hrungen von. Codeblo cken erzielt Allerdings erreichen die Java Virtual Machines JVMs auf die Dauer. a hnliche Resultate Die verschiedenen Strategien zur Speicherzuweisung von CLR und. JVM fu hren zu einer initial ho heren aber auf die Dauer stabileren Speicherbelegung fu r die. CLR und initial tieferem dafu r mit der Zeit u berma ig hohem Speicherkonsum fu r JVMs. Was die Geschwindigkeit von Netzwerkoperationen anbelangt erreichen Java und NET. vergleichbare Resultate Bezu glich Speicherverbrauch skaliert TomP2P fu r Java jedoch. besser bei langfristigen Netzwerkszenarien Der Grund dafu r sind Optimierungsfunktionen. von Drittanbietern die in NET noch nicht verwendet werden. Acknowledgments, I would like to thank the people that enabled the realization of this master thesis First.
of all I want to express my deep gratitude to my supervisor Dr Thomas Bocek. for his competent assistance enthusiasm and ever cooperative interaction and support. Furthermore I sincerely thank Prof Dr Burkhard Stiller for the permission of this project. in context of the Communication Systems Group,Abstract i. Zusammenfassung iii,Acknowledgments v,1 Introduction 1. 1 1 Motivation 1,1 2 Description of Work 2,1 3 Thesis Outline 2. 2 Related Work 3,2 1 Java vs C 3,2 1 1 The Evolution from Java to C 3. 2 1 2 Commonalities Differences 4,2 1 3 Why C 5,2 2 Migration from Java to NET 5.
2 3 Interoperability 6,2 4 Benchmarking 7,viii CONTENTS. 3 Proposed Solution 9,3 1 Layout 9,3 2 Interoperability 10. 3 2 1 Interoperability Concerns 10,3 2 2 Interoperability Testing 14. 3 3 Code Equivalence 15,3 3 1 TomP2P Version 16,3 3 2 Data Structures 17. 3 3 3 API Requirements 18,3 3 4 Asynchrony 19,3 4 The Netty Project Counterparts 20.
3 5 Benchmark Suite 24,3 5 1 Benchmarking Approach 24. 3 5 2 Benchmark Procedure 25,4 Benchmarking 27,4 1 Setup Information 27. 4 2 Execution Time 28,4 2 1 Virtual Machine Comparison 28. 4 2 2 Warm up Phase 29,4 2 3 Local vs Remote Networking 30. 4 3 Memory Allocation 31,4 3 1 Virtual Machine Comparison 31.
4 3 2 Initial Phase 33,4 3 3 UDP vs TCP 34,5 Summary 37. 5 1 Summary Conclusion 37,5 2 Future Work 38,CONTENTS ix. Bibliography 39,Abbreviations 43,List of Figures 43. List of Tables 45,List of Listings 47,A Mapping from Java to C 51. A 1 Keywords Framework Types 51,A 2 Java Futures to C Tasks 51.
B Benchmarking Script 55,C Tools Frameworks Languages 57. D Installation Guidelines 59,D 1 TomP2P NET 59,D 2 Interoperability Testing 59. D 3 Benchmark Suite 60,E Contents of the CD ROM 61. x CONTENTS,Introduction, This chapter starts with the motivation followed by a description of the objectives Before. going into the proposed solution a brief outline of this thesis is given. 1 1 Motivation, Peer to peer P2P systems are still popular and account for a large portion of Internet.
traffic 8 Although most of this traffic is related to file sharing new types of P2P applica. tions are emerging For this reason the availability of free software for the development of. such distributed applications is important TomP2P 2 is an open source P2P based high. performance key value pair storage library that is used in many applications They range. from file synchronization and sharing 15 32 over video live streaming 14 to bitcoin. exchange 1, The implementation of the TomP2P library is based on Oracle s Java technology and. thus benefits from its operating system independence Given the similarities of the Java. Runtime and Microsoft s NET Framework porting the TomP2P library is feasible in the. time frame of this thesis With a version in both Java and NET the size of the developer. community to which the TomP2P library can be exposed increases accordingly. Thus the goal of this thesis is the port of the existing implementation to an equivalent. counterpart for the NET environment Not only does the ported version exhibit the. exact same functionality and behavior it also copes with the interoperability between. the two platforms Furthermore both implementations are compared with respect to. execution time and memory allocation on different virtual machines and hardware Instead. of performing the more common but less informative micro benchmarking more realistic. analyses of real world scenarios implying asynchrony network latency and I O streams. are conducted,2 CHAPTER 1 INTRODUCTION,1 2 Description of Work. The major aspect of this thesis is the porting of the software to an equivalent NET. counterpart The main focus is directed at the TomP2P core package the most fundamental. part of the library In order to achieve this goal the internals of the core package need to be. understood by examining what it is doing and how it works This process of understanding. can be done incrementally and in parallel to the porting task This thesis starts with. the most basic module the protocol and proceeds with the next abstraction layer So. as to verify the ported code unit testing of the NET components has to be maintained. Furthermore tests for cross checking the correctness of these components with the Java. implementation have to be conducted in order to achieve interoperability between the two. platforms With the finished NET port benchmarks for several workloads are performed. to compare the two implementations with respect to both execution time and memory. allocation Any potential bottlenecks in both versions are analyzed and solutions for. optimizations are found,1 3 Thesis Outline, After this chapter has given an insight on the motivation and the target of this thesis. Chapter 2 sheds light on related approaches After that the proposed solutions for all goals. are presented in Chapter 3 Besides the key aspects to be addressed when porting from. Java to C in the context of TomP2P the projects required for interoperability testing and. benchmark execution are explained Chapter 4 takes up with the benchmarking results. their evaluation and interpretation for different scenarios Finally Chapter 5 draws the. conclusion of this work and lists future work,Related Work. This chapter composes related research and development The key areas of this thesis. each dealt with in a separate subsection consist of the comparison of the Java and C. programming languages the migration from the former to the latter their interoperability. and performance comparison,2 1 Java vs C, This section is about the comparison of the Java and C languages Their common history.
related work about commonalities and differences as well as arguments for using C as. the target language are included,2 1 1 The Evolution from Java to C. The Java programming language originally designed by Sun Microsystems is aimed at. enabling developers to quickly build a wide range of applications and to shorten development. time by freeing the programmer from worrying about several low level plumbing issues. such as memory management and type safety concerns It is no secret that Microsoft was. impressed by the simplicity of Java and its force of attraction to the developer community. History shows that Microsoft in fact was using Sun Microsystems Java but with its. own implementation called Visual J which was introduced in 1996 Further efforts. produced the fastest JVM on the market 27 as well as the so called Windows Foundation. Classes WCF a set of Java classes that wrapped the Win32 API In addition to this. Microsoft wanted to apply changes to Java to integrate it more closely with Windows i e. make it inter operate with C and Visual Basic As a side effect such changes would. have broke the compliance with the Java Standard and hence Sun Microsystems sued. Microsoft in 1997 for its Java license agreement violation Due to that Java s appeal to. Microsoft was lost and the company took its advances in the Java language compiler and. virtual machine to morph them into an even more ambitious project which in the year. 2000 finally resulted in the NET Framework As part of this framework the programming. language J whose syntax is close to Java was introduced Its main purpose was to help developers migrating from Visual J or Java to the new NET Framework Later in 2002 as part and main language of the NET Framework C was introduced as a modern simple general purpose and object oriented programming language Regarding the history

Related Books