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 conventions 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.
Description:
Abstract
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 conventions 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.