JXTA

Tue, 2007-07-10 10:00

JXTA Concept.

Submitted by chatsiri on Tue, 2007-07-10 10:00.

Posted in | | | | chatsiri's blog | add new comment | quote | 687 reads »

Last Article,I talked concepts JXTA Frameworks,but not discuss detail JXTA Frameworks.In this article talk about Peer,Peer Group,Advertiesment,Message,service. Concept JXTA helpful to understand strategy peer to peer of the JXTA.

Peer and Peer Group.
Peer provice service of they network.Peer can user Mobile phone,PDA,Computer.For peer can shear service such as rendezvous,gateway,router.One peer on one computer,Certainly one peer per device use P2P network.Peer Group using adverties of specifies services that are available to group menbers.Other way provice group numbers by security and protocol specifies authentication of allow to group.

Advertiesment.
Advertiesment are also XML documents.The content in an JXTA descript the properties of peer,peer group,pipe and message.Advertiesment use of share basic service,join group,Advertiesment like DNS record of web site.

Service.
Service with in group numbers.If you join peer group,JXTA provice services are available in group menbers.

Pipes.
Pipes use for transfer data file and communtication between peer or peer group.Stratege of pipes are undirectional and asynchronous.Pipe not concept TCP/IP socket or Unix pipes.It's can management peer connection and communication between peer such as one-to-one message pssing,one-to-many message passing.

Message.
Message has Header,Source endpoint Information(use URI),Destination endpoint information(use URI),A message digest(optional secure),Message are also XML document.

Sun, 2007-07-08 18:12

Initial JXTA Socket.

Submitted by chatsiri on Sun, 2007-07-08 18:12.

Posted in | | | | chatsiri's blog | 1 comment | quote | 818 reads »

Recently,I just initial socket of JXTA for network programming project.I knew JXTA frameworks is useful peer to peer programming,Certainly it's head to using it and if you don't know concept JXTA frameworks such as Peer,Peer Group,End Point,Advertisement,Pipes,Message
and Redezvoes(Reference:jxta-java-p2p-programming,Sams publishing)
,you can't initial JXTA framework powerful.Before you coding JXTA Socket should "import" of JXTA Socket[link] version 1.1.4(unstable) .See below import library.

import java.net.*;
import java.net.socket;
import net.jxta.socket.*;
import net.jxta.socket.JxtaServerSocket;
import org.p2psockets.P2PNetwork;
import org.p2psockets.P2PServerSocket;
import org.p2psockets.P2PSocket;

For coding you can see "Introduction to the peer ot peer Socket Project"[link].I compare JXTA Socket with Java Socket API.JXTA Socket resemble Java Socket API in case of initial socket server.

//JXTA Socket Server.
ServerSocket socketP2PServer=
new P2PServerSocket("127.0.0.1",9701);
Socket client=socketP2PServer.accept();

//Java Socket API.
ServerSocket serverSock=new ServerSocket(9701);
Socket sockServ =serverSock.accept();

After you coding JXTA Socket.You will seen JxtaConfiguratoris configuring(not have example because content endless).You see in JXTA Configurator from web page[link].See below picture of after compile JXTA Socket Server.

From chatsiri.com

Example below enough for introduction using JXTA Socket.If want to know Implement JXTA service,can learn in Reference below.
Reference JXTA:
http://www.onjava.com/pub/a/onjava/2001/04/25/jxta.html?page=1
http://www.ibm.com/developerworks/wireless/library/wi-jxta/
(link below have box content about JXTA beside page.)
http://www.onjava.com/pub/a/onjava/excerpt/jxtaian_2/index1.html?page=1

Sat, 2007-06-16 19:13

Peer ot Peer Socket.

Submitted by chatsiri on Sat, 2007-06-16 19:13.

Posted in | | | | | chatsiri's blog | add new comment | quote | 718 reads »

Last Times,Coding socket standard of j2ee.[link] Right now,i coding socket on peer to peer for jxta.[link] I be use to import java.net in class,but this time netbeans can't see java.net.P2PNetwork and java.net.P2PServerSocket on library.Why?,I forget add peer to peer library to Netbeans IDE.Just now search "java.net" keyword.there are article "JXTA" and "Introduction to peer-to-peer socket project[link].them was show about package and example of initail package "peer-to-peer socket".Below show add library to Netbeans.

From linux

Syndicate content