Running the code

Running the netlet is exactly the same as before. We start a node with our client netlet. However, this time the output from the service is slightly different, including the message:


% jnode 211 -netlet-stdio hello1-client.xml
Jnode starting...
Initialising Nodality...
Bootstrap starting
starting hello1-client
Bootstrap complete
netlet:211.0.2: Server started
netlet:211.0.2: Instantiating org.jtrix.project.helloworld.IHelloFacet
netlet:211.0.2: Facet instantiated
netlet:211.0.1: Hello, world
^C

% 

At the end of this Jnode continues running, so we have to hit Control-C to stop it and get our prompt back.

Just as before, jnode's first argument has to be some arbitrary node ID, and we again follow it with the option to output netlet standard I/O. Then we name our client netlet.

Jnode runs the netlet, which causes our new access point netlet to start up. It gives a short commentary on its progress and the first netlet announces the message it retrieved.

And let's remind ourselves about Jnode's output, which this time is a bit different. For one thing, there are two netlets, and they have output 211.0.1 (for the first netlet, the client) and 211.0.2 (for the second netlet, the access point and server).

For another thing, we cannot expect each netlet's output to appear in the correct order with respect to the other netlet and Jnode itself. The buffering we mentioned with the last example is the cause of this.

Nik Silver 2002-03-09