Design and Implementation of Peer to Peer Network for File Sharing
Chapter One
Aim and Objectives of the Study
The main aim of this thesis is to build a Peer-to-Peer system for wireless devices to share files. The system design will be based on an open, protocol-based P2P platform called JXTA, which enables the developer to focus on the end-system instead of the extensive task of creating the P2P network. The prototype will be developed in Java for the Android platform. To achieve the stated aim, the following specific objectives were laid:
- Firstly, J2ME, P2P networking and the JXTA technology will be investigated. Based on this a Mobile Peer-to-Peer system will be designed and simple a prototype will be implemented using phone emulators or real android phones.
- Design an emergency reporting system to test the developed system where users share image and video files
- Next, the application will be tested to see how it performs in a scalable network and how it performs when transferring large files.
CHAPTER TWO
REVIEW OF RELATED LITERATURE
INTRODUCTION
This chapter summarizes topics that have been explored as a foundation for my own contribution to this thesis. References to relevant sources with domain elaboration are referred to and found in the References chapter. I have investigated today’s research and development in the area of Mobile devices, Java 2 Micro Edition (J2ME), P2P technology and the JXTA framework. Some topics have been explained in more detail for the reader to better understand the remainder of the project.
Mobile devices
The Mobile phone has become a necessity in our lives; it is always with us, it is always on. It has become so much more than just a phone; it has become an extension of who we are. As the mobile phone development continues its astonishing progress, we are now experiencing a fusion of technology into a mobile device, not only being able to make phone calls, but also including radio, music player, mega pixel camera, camcorder and internet connection to name a few properties. In this chapter I will give a short overview of today’s mobile phones’ constraints and limitations. Peer-to-Peer Programming on Wireless Devices
Constraints
A mobile phone still has many constraints compared to larger computing devices, such as personal computers. In the Table below, I have listed a few mobile devices with relevant constraints and possibilities. Even though more powerful phones exist, this table represents what is considered modern phones at the time of writing (June 2005). Interesting properties are:
- Screen resolution, size and colour
- Data transfer type
- Memory size, Heap memory (RAM)
- Memory size, persistent memory to store files such as images or music.
- Maximum JAR size, determines how large an application can be.
- Supported APIs
The information is extracted from [33] and all the images of the phones are taken from this website.
Java 2, Micro Edition (J2ME)
The Java programming language was originally developed for consumer electronic devices, but over the years it evolved into a set of technologies used primarily to develop desktop, server-based applications and mobile phones. So, in a way, you can say that the latest contribution to Sun’s Java Platform, the Java 2 Micro Edition (J2ME) is returning to the very origins of Java technology. J2ME is descending from several early java platforms for small devices: The Oak part of the Green project (early 1990’s), Java Card (1996), Personal Java (1997), EmbeddedJava (1998) and the Spotless System and the K virtual machine (1999). The Java Card technology is still separated from the J2ME platform, and remains an important technology based on smart cards [Traversat et al., 2003].
CHAPTER THREE
SYSTEM ANALYSIS AND DESIGN
INTRODUCTION
In this chapter I will propose a P2P system for wireless devices using the JXTA platform. The system will be based on what I have learned in my research around P2P and JXTA, and also what I have come to experience during testing – what is possible in theory and what actually works. This is closely related to the possibilities and constraints of today’s mobile phones, the J2ME technology and wireless network. I will also point out what makes the JXTA framework suitable for this system.
ANALYSIS OF THE ESISTING SYSTEM
Currently, peer to peer communication has been implemented on computers. Little effort has been made to implement such technology on mobiles. However, it will be an interesting idea if small wireless devices (such as mobile phones and wireless sensors) are also made peers. In this context, programming wireless devices has many challenges. Currently some implementation of peer to peer networks does not consider device limitations such as total power remaining in the battery, losing communication with other peers at anytime, small displays, and Peer-to-Peer Programming on Wireless Devices limited CPU power and memory). These specifications affect the solutions to a problem and the program logic. Also in existing peer to peer file sharing, in dynamic emergency situations, like power failure or disruption in communications, the peers loses file been shared and transfer has to start from the beginning.
ANALYSIS OF THE PROPOSED SYSTEM
P2P system for wireless devices using the JXTA platform is implemented in this project. Creating a P2P System design is not easy due to its complex nature. One of the goals of the JXTA Project is to ease this heavy load off the developer, so that they can spend more time developing the actual application. Unfortunately, the JXME Project is an ongoing process and is not fully complete. Being a lightweight version of JXTA, JXME can only perform the most basic P2P operations.
CHAPTER FOUR
SYSTEM IMPLEMENTATION
INTRODUCTION
In this chapter, the newly developed system is addressed before it is deployed into the operations of the business. As a result, I am therefore going to examine the tools used for coding the system as well as testing, the system test plan, actual testing and finally propose a suitable change over method that the business should employ in order to bring the system into operation.
CHAPTER FIVE
SUMMARY, CONCLUSION AND RECOMMENDATION
SUMMARY
Peer-to-Peer programming on wireless devices is an innovative domain with great potential, and commercial implementations will probably be growing similar to the popularity of conventional Peer-to-Peer we have seen in the last few years. The system I have proposed uses a Proxy Service on a fixed network to ease the workload on constrained mobile phones. With the increasing power of mobile phones, a Proxyless version of JXME would be possible, giving developers the freedom to avoid the fixed JXTA network, enabling pure mobile P2P networks. Large file sharing is mostly constrained by a mobiles heap memory; my testing of file segmentation shows that the images are segmented and re-assembled correctly as long as the phone has enough available memory.
CONCLUSION
Developing Peer-to-Peer networks for wireless devices is a new and promising research area, rising with the new mobile technology. With this thesis, I have proposed a way to implement a mobile Peer-to-Peer system based on the common protocols of the JXTA technology, an effort to define a common framework for P2P applications. JXTA is a highly complex P2P framework with many protocols and concepts to keep track of. . The JXME API is a lightweight version of JXTA, which lets the developer create mobile P2P solutions fast without extensive knowledge of JXTA.
Because of a mobile device’s technological constraints, the best wireless P2P solution should involve more powerful peers acting as a proxy and relays on a fixed network. This gives both the advantages of a fixed P2P network and the mobility of a wireless device. Since the JXTA for J2ME technology is under development, the documentation and tutorials available are very limited. With this thesis, further development based on this domain should have a solid foundation for understanding the technology and implementing a P2P system.
The system designed can be used to develop virtually any mobile P2P application; mobile multiplayer games, monitoring systems, instant messaging or file sharing to name a few. Such systems are very likely to grow rapidly with the introduction of third generation mobile networks and the ever improving memory and computing power on a mobile phone. I believe mobile P2P technology will be the next big thing in the technology industry; not only does it enable direct search and sharing of multimedia content such as images, mobile games, music and video, but mobile devices has the extra dimension of being a personal device that is with us all the time, and in many ways defines us as individuals. The challenge will be to take advantage of this fact and find new areas to utilize the technology.
RECOMMENDATION
To improve the mobile P2P system, one should look more closely at the JXME Proxy Service to cope with the problems I have encountered. This would improve the system functionality and utilize the Proxy Service much more than the proposed system does. The prototype has made a lot of simplifications, and it would be interesting to see how it performs on real mobile devices. It would be especially interesting to implement the camera-function to share images taken with the mobile’s camera and the Location-function to distribute geographical data automatically when the Peer is moving.
Even though the system proposed is working, I believe a Proxyless solution would be more successful in smaller P2P solution and is the right way to go for further research and development of pure wireless Peer-to-Peer programming. I propose developers who want to continue this research to join the JXTA community effort to port the JXME Proxyless implementation from the CDC environment to the CLDC environment.
REFERENCES
- Gong, Li. Project JXTA: A Technology Overview, Sun Microsystems, Inc, 2002
- Biström, Johnny and Partanen, Ville. Mobile P2P – Creating a mobile filesharing environment, Helsinki University of Technology, 2004.
- JXTA Project, [web site] http://www.jxta.org
- Dochstader, Mark. Peer to Peer Networking: Next Big Boom or Next Big Bust?, ITtoolbox Networking, 2001-03-12
- Galla, Preson. Five Live Ones, Darwin Magazine, [online] http://www.darwinmag.com, 2001-08-01
- CacheLogic. [web site] http://www.cachelogic.com. [accessed] 2005-04-06
- Sun Microsystems, Java 2 Platform, Micro Edition, [online] http://www.java.sun.com/j2me/docs, [accessed] 2005-06-14
- JXME project, [web site] http://jxme.jxta.org
- Arora, Akhil, Haywood, Carl and Kuldip Singh Pabla, JXTA for J2ME™ – Extending the Reach of Wireless with JXTA Technology. Sun Microsystems Inc., March 2002
- TINI Project, [web site] http://tini.jxta.org
- Unknown. Differences between PersonalJava and MIDP Java Environments, Symbian, [online] www.symbian.com/developer/ techlib/papers/ PJAE_MID P/PJAE_MIDP_2.pdf, [accessed]14-06-2005