JXTA Peers

We’ll start our examination of JXTA’s key concepts with the notion of a peer. As defined in the JXTA specification, a peer is a device that implements one or more JXTA protocols. The key idea is that something implements the protocols. Don’t get too hung up on the notion of a device—a device is not necessarily a machine. A single machine can host multiple JXTA programs, each of which is really a peer. The program is really a virtual device.

Of course, peers normally communicate with each other over a network, so a JXTA community typically has many different machines within it. However, some of these machines could be running multiple JXTA peers. A single JXTA peer could be a distributed application running across multiple machines. And if you’re following the example in this chapter at home on your own single computer, you’ll end up running many peers on your local system.

To start our first peer, we’ll execute the JXTA Shell. On Microsoft Windows systems, you can do this by selecting Programs Jxta JXTA Shell from the start menu. On other platforms, you can do this by executing these commands:

piccolo% cd /files/JXTA_Demo/Shell
piccolo% sh shell.sh

When you first start the shell, you’ll see the window displayed in Figure 2-1. This allows you to configure the shell for the network on which it will run. We explain the configurator in detail later in this chapter. For now, we’ll just step through the two required elements that you must configure.[1]

Figure 2-1. The ...

Get JXTA in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.