Groovy + JXTA

"Guillaume Laforge" <[email protected]> Mon, 18 Dec 2006 09:35:58 +0100
Newsgroups gmane.comp.java.jxta.user
Message-ID <[email protected]>
Hello,

I'm working on the Groovy project, the dynamic language for the JVM.
For one of my customers, I was investigating the JXTA technology.
And I was wondering whether there could be some ways to make JXTA more Groovy.

For instance, it could be nice to use the configurator that way:

def conf = new NetworkConfigurator().configure {
    home = new File(jxtaHome)
    peerId = "..."
    name = "my name"
    multicast = false
    // etc...
}

We could also use Groovy's coercion mechanism to transform closures
into rendezvous listeners in a single line:

def listener = { RendezvousEvent evt -> println evt.toString() } as
RendezvousListener

It'd be nice to have some easy ways for creating peer groups, pipes or
other JXTA artifacts.
I feel that JXTA is quite complicated to master and understand, and
that some Groovy basic layer above raw JXTA libraries could help
foster the adoption of JXTA for building simple P2P applications --
while still being able to fine-tune more complex applications with the
raw power and capabilities of JXTA.

What do you think?

Guillaume

PS: I'm really just thinking aloud, and I'm neither an exeprt of JXTA,
not able to implement those ideas as I'm a total JXTA newbie