• 沒有找到結果。

Chapter 2.  Related Work

2.3  JXTA Technology

The Peer-to-Peer technology becomes a popular topic because of the music file-sharing programs, such as the Napster and Kazaa. SUN hopes to invest more applications by JXTA.

For example, to build Peer-to-Peer network in the office could reduce the cost from the central server structure, and avoid network problems like the hot spot and system maintenance [3, 26].

SUN developed JXTA in 2001. JXTA is an open source platform for Peer-to-Peer network, and its name comes from the Juxtapose. This platform defines the XML-based framework for the message exchange and the network topology integration.

JXTA provides the series open protocols, and these protocols are allowed to make devices (e.g., mobile phone, PDA and computer) connection amid nodes. In the JXTA virtual network, even if some nodes exist behind the firewall or NAT can still communicate with other nodes directly [29].

2.3.1 JXTA Architecture

Overall, JXTA framework can be divided into three layers, as the following:

„ Core Layer

This layer is the JXTA core. It gathers the basic functions for Peer-to-Peer Network in a package, including the node search, media transmission (e.g., transmission media data through the firewall), group establishment, and other security mechanisms.

„ Service Layer

JXTA services layer supports the Peer-to-Peer network services and the normal operation. But in different Peer-to-Peer environment supports different degree of services, including for peer discovery, index service, data sharing, certification, distributed structure and Public Key Infrastructure, and so on.

„ Application Layer

JXTA application layer supports application implement and combine, such as Peer-to-Peer message transfer, data and resource sharing, entertainment media content management and publishing, mail management, the auction system, and other functions can be deployed on the Peer-to-Peer network.

Figure 2-3 The JXTA three-layer architecture

2.3.2 JXTA Service

JXTA provides varies network services, including the web service, Remote Method Invocation (RMI) and Common Object Request Broker Architecture (CORBA), and these services are delivered by the pipelines. JXTA also can adopt other standards for improve system efficiency such as Web Services Description Language (WSDL) and Simple Object Access Protocol (SOAP). By the following services are the most commonly used in JXTA. As long as there have a node survive, JXTA will provide these services constantly.

„ Advertisement

Advertisement plays the conversation bridge in the JXTA network. Like the real world advertisement, advertisement in JXTA describes the information, including the peer, group, pipe and the service, and all above information need advertisement to keep the communication in the JXTA network. Advertisement using the XML format as show in Figure 2-4. XML with the following characteristics:

-

Standard

XML standard was made by the World Wide Web Consortium (W3C), and has a high degree of acceptance in computer science fields.

-

Global

XML parser supports UTF-8 character set, this is a global language and Unicode standard. Users can edit XML using all countries language.

-

Self-describing

XML format is constructed by the Meta data, tag and attribute. The user can self-describe the data format.

-

Extensible

In contrast to HTML, XML allows users to define their own tag and to structure

their information. Because of these important characteristics, XML could make communication and editing easily by the JXTA Protocol.

Figure 2-4 JXTA XML format

„ Peer Service

Peer service, it is could be a network device or one or more JXTA protocol, such as the PDA, phone and personal computer. Each node has a unique peer id, and can be existed in many types as different functions

„ PeerGroup Service

Peer group is a set to collect the node and own the same share mechanism in a group. At any time, the node could belong to the multiple groups. When the node is built, it will join the “Net Peer Group” at the beginning, and then the node could join the other group.

Similar with the peer service, each group has their unique group id, and there are many group types in the group services, including the secure group, limit available scope group and monitor peer group. JXTA protocol describes the node how to publish, discovery, join and monitor these service.

<Peer>MyPeer</Peer>

<PeerId>urn:jxta:uuid-59616261646162614A78746150325033BCCEADFAD24D44C5ACF38BD18BFF00 9403</PeerId>

<TransportAddress>jxtatls://uuid-59616261646162614A78746150325033BCCEADFAD24D44C5ACF38B D18BFF009403</TransportAddress>

<TransportAddress>tcp://192.168.200.141:9701</TransportAddress>

<TransportAddress>tcp://210.240.197.6:9701</TransportAddress>

<TransportAddress>relay://uuid-59616261646162614A78746150325033BCCEADFAD24D44C5ACF38B D18BFF009403</TransportAddress>

2.3.3 JXTA Protocol

In this section, we explain the JXTA protocols are mentioned before.

„ Peer Discovery Protocol

By using Advertisements in this protocol, the node could publish its resource information, such as the peer, group, pipeline, and other services, and allowing nodes to discovery others. Peer discovery protocol delivers two types of messages:

- A request format to use to discover advertisements - A response format for responding to a discovery request

„ Peer Information Protocol

Most Peer-to-Peer applications always want to know what remote nodes doing now.

When the node publish its information, we can know its message, such as how long it will exist, how many message were published from it. This protocol provides two types of messages:

- Peer Info Query Message:To query information of node’s state.

- Peer Info Response Message:To response the node state to other node.

„ Peer Resolver Protocol

With the need to resolve other node, JXTA defines the protocol “Peer Resolver Protocol”.

This protocol provides implementation of PRP and defines how node exchanges queries and response information with another one. In general, Resolver service provides the following two types of messages:

- Resolver Query Message:The type of send query message.

- Resolver Response Message:The type of response query message.

„ Peer Endpoint Protocol

This protocol can assure the message’s route, and deliver messages to endpoint node correctly.

„ Pipe Binding Protocol

Pipe Binding Protocol is one of the most used in JXTA, and it could be used to create virtual communication channels (or pipes) between one or many nodes. By this protocol allowing node have the ability to find the communication pipe, and the node can combine the information to the endpoint.

„ Rendezvous Protocol

Rendezvous can be viewed as a point for collector where nodes could exchange information each other. Through broadcasting of buffered nodes, Rendezvous peer could reserve other node’s information. Thus, Rendezvous peer helps nodes to find out other node or redirect the query request to other Rendezvous peer. In fact, Rendezvous peer means that a node can handle request from other node, and also delegate requests to other Rendezvous peer. Its main purpose is conveniently search information in local network. Each node can be dynamically assigned to be or not to be Rendezvous peer. In hybrid centralized Peer-to-Peer architecture, the central server is been the Rendezvous peer, but in decentralized architecture, Rendezvous peer may be not only one anymore.

Through the Rendezvous protocol, we can resolve the problems of node searching and incomplete data query.

2.3.4 Java Virtual Machine

Java interpreter can translate original program to the byte code, which can be executed in any machine with Java Virtual Machine (JVM). By translating program to the byte code, a program can be executed in a cross-platform or cross-OS manner. It means users can execute the same program in different operate system, such as Windows, UNIX, or Macintosh’s Mac OS. In this study, JVM help the cross-platform development.

相關文件