`

How can you run MyJXTA in a private network

阅读更多

Running MyJXTA is relatively trivial, either via WebStart or source. While WebStart totally rocks I encourage folks to try building and running from source. I'll get to why in a bit.

MyJXTA runs, by default, on the "Public JXTA Network," affectionately called the "PubNet." This is basically an massive sandbox with which JXTA developers can deploy their wares and the JXTA curious can scratch their itch. A forum of sorts.

More frequently we've been asked "How can you run MyJXTA in a private network" to which this entry should shed a bit of light. The reasons vary but I believe the principal motivation behind this question is to to fundamentally expose colleagues and management, potentially skpetics, to the wonders of JXTA yet run it within a safe and well known environment. Being all for "enlarging the pie" here's a short little recipe on how to go about deploying MyJXTA on a "private network."

At this point in time, you will need to get the source. Go ahead. Don't be shy. 2 Ant commands and you will be ready to bake.

In order to change MyJXTA's default PubNet behaviour one must, today, edit 2 configuration files:

  • src/net/jxta/myjxta/resources/myjxta.xml
  • src/net/jxta/myjxta/resources/profile.xml

myjxta.xml is the principal MyJXTA configuration file whereas profile.xml is the JXTA Configuration Extention, aka ext:config, configuration file. More on the later at another time.

Firstly, myjxta.xml. All that needs to be added to this file is the "private network" deployment data, that being:

  • id
  • name
  • description

note: name and description are optional but for usability reasons you should include meaningful values

 

Now, all that needs to be done is add the aptly named attributes to the network data structure, as follows:

  <network id="urn:jxta:uuid-01234566789abcdef0123456789abcde02"
    name="My MyJXTA"
    description="JXTA Rules">

More information regarding JXTA's data structures, et al can be found in spec.jxta.org.

Ok. That was pretty easy. What's next. Oh yeah, the profile.xml. This file describes the type of JXTA network environment the hosting application will bootstrap into. The first thing we'll need to modify is to specify an alternative bootstrap address, Boostraps are simply well known peers that are utilized to establish the intial network context. For this, we will assign a rendezvous and relay boostrap URI:

    <rendezvous bootstrap="file:///tmp/bootstrap.txt"
      discovery="false">
    ...
    <relays bootstrap="file:///tmp/bootstrap.txt"
      discovery="false">

The bootstrap can be any valid URI that lists seeding context JXTA peers. You can see the PubNet bootstraps here:

With that, all that remains is to disable multicasting. This is actually done by convention, mine, at present although another option is to simply change the multicast address. The included multicast address in the sample below is not valid. Sticking to convention for the moment, we simply need to disable multicast. To do so, we set the enabled attribute of the multicast descriptor to "false:"

        <multicast enabled="false">udp://12.34.56.78:1234</multicast>

That's it. Now all that remains is to place the cake into the oven and let it bake. Thusly, we turn to Ant:

  % ant run

At this point, you are running a private network deployment of MyJXTA! Not that painful and rather enabling in the overall scheme of things. That being, to actively infect those around you with the "connected network" vision that is JXTA. That we no longer have to put up with "static addressing." Free them. Free their minds. [flash matrix imagery]

Back to the source. The above, while k3w1, relatively painless and all it is not, well, all that intuitive for those that don't care about angle bracketed text, et al. One of the big "MyJXTA.next" items is "preferences" to which this and a multitude of other like features will be customer [I'm an xp fan ... people you care about and/or connect with are not users]. There is a wealth of preferences features that when appropriately exposed will truly put the My in MyJXTA. If you have an interest in helping to sling some MyJXTA prefernces code, don't be shy.

To close, I am soooooo loving my shiny new iPod. Golden! I'll explain my reasons for getting it at this time but my wife, who knows better, isn't buying it for a moment.

MyJXTA :: use it - learn it - do it

Java == platform independence
XML == application independence
JXTA == network independence

Secure End-to-End Computing

in my ears: Paul Oakenfold/Ibiza/Arena

 

http://weblogs.java.net/blog/gonzo/archive/2005/02/my_myjxta.html

分享到:
评论

相关推荐

    jxta-myjxta-2.5.zip_file sharing in chat_jxta 2.5 例子_jxta2.5.jar

    综上所述,"jxta-myjxta-2.5.zip"提供了一个学习和实践JXTA技术的良好平台,涵盖了P2P网络的核心功能,并通过"file_sharing_in_chat"和"jxta_2.5_例子"标签强调了文件共享和聊天服务的实现。开发者可以通过这个实例...

    jxta-myjxta-minimal-2.5.zip

    《JXTA与MyJXTA:探索P2P技术的深度实践》 JXTA(Java XML-based Peer-to-Peer)是Oracle公司推出的一种基于XML的对等网络框架,它提供了一种开放的、标准化的平台,用于构建对等应用程序。而MyJXTA则是JXTA的扩展...

    jxta-myjxta-src-.zip

    在"myjxta-"这个压缩包中,我们可以预见到一系列与JXTA相关的源码文件,这为我们深入理解JXTA的实现机制提供了宝贵的资源。通过分析源码,我们可以了解到以下几个关键知识点: 1. **JXTA协议栈**:JXTA协议栈由一...

    jxta-myjxta-src-2.5.zip_2.5 myjxta_jxta 2.5_jxta-myjxta-2.5.zip_

    《JXTA技术详解——基于myjxta2.5源码分析》 JXTA(Java XML-based Peer-to-Peer Technology)是Sun Microsystems推出的一种开放的、基于XML的P2P(Peer-to-Peer)网络协议。它允许对等节点之间进行通信,共享资源...

    jxta-myjxta-docs-2.4.1_helloworld_

    《JXTA与MyJXTA 2.4.1:HelloWorld教程详解》 JXTA(Java XML-based Peer-to-Peer Technology)是Oracle公司推出的一种基于XML的P2P(Peer-to-Peer,对等网络)技术,旨在提供一个开放、分散的网络平台,使得节点...

    jxta-src-2.4.1.zip_JXTA2.4.1_MyJXTA2.4_jxta_jxta-lib-2.4.1.zip_j

    "myjxta2.4"可能是指MyJXTA,这是一个基于JXTA的开发工具集,简化了JXTA应用的开发流程,提供了友好的API接口和示例代码。 "jxta-jxta-lib-2.4.1.zip"标签暗示了JXTA的库文件,这是运行和开发JXTA应用的基础。JXTA...

    jxta2.2 开发文档

    8. **工具与Shell**:“jxtashell_doc.zip”和“myjxta-2.2a-doc.zip”可能包含JXTA Shell和MyJXTA的文档,这两个工具可以帮助开发者更方便地管理JXTA网络,执行命令行操作,调试和测试应用程序。 9. **即时P2P**:...

    zuixin.txt

    解压后将`jxta-2.2-bin.zip`文件中的`myjxta-2.2a.zip`解压到`D:\Java\JXTA`目录下。 ##### 3.3 环境变量设置 为了使JXTA能够被系统识别,需要在环境变量中设置以下路径: - `JAVA_HOME`: 设置为`D:\Java\j2sdk...

    JXTA开发包3

    2. **myjxta.jnlp** 和 **shell.jnlp**:这两个文件是Java Web Start(JNLP)文件,用于启动基于Java的应用程序。它们可能分别对应于一个JXTA的示例程序或者开发环境的启动脚本,使得开发者能够轻松地运行和调试JXTA...

Global site tag (gtag.js) - Google Analytics