users@shoal.java.net

[RFE] accessing JXTA's System ADV information or equivalent

From: Michael Bien <mbien_at_fh-landshut.de>
Date: Tue, 19 Feb 2008 14:48:33 +0100

Hello,

JXTA stores in the system advertisement a lot of useful and never
changing information about the node's runtime environment. It would be
great if Shoal would provide this kind of immutable "node info"
additional to the mutable "node details" (DistributedStateCache).

I use currently the DSC for this purpose:

            updateNodeDetail(NodeDetailKeys.CPU_COUNT,
Runtime.getRuntime().availableProcessors());
            updateNodeDetail(NodeDetailKeys.OS_ARCH,
System.getProperty("os.arch"));
            updateNodeDetail(NodeDetailKeys.MAX_MEMORY,
Runtime.getRuntime().maxMemory() / 1000000);
            updateNodeDetail(NodeDetailKeys.JVM,
System.getProperty("java.vm.name"));
            updateNodeDetail(NodeDetailKeys.JAVA_VERSION,
System.getProperty("java.version"));
            updateNodeDetail(NodeDetailKeys.OS_NAME,
System.getProperty("os.name"));
            updateNodeDetail(NodeDetailKeys.OS_VERSION,
System.getProperty("os.version"));
...

    public void updateNodeDetail(Serializable key, Serializable value)
throws GMSException {
        gms.updateMemberDetails(nodeName, key, value);
    }

This works but feels a little bit redundant, leads to (probably)
unnecessary communication and the values are not guaranteed to arrive at
the same time (could cause problems).

public API changes:
-node info getter in the GMS
-node info getter in Signal

optional (but cool):
allow custom values on node join (add properties with unknown keys to
the node info?)


(just a thought)

best regards,

michael