[quote]1) what do you think about Jini, JavaSpaces, Java Shared Data Toolkit and such higher level networking?
[/quote]
Jini is a distributed computing platform, designed to support dynamic service discovery, failover, etc, etc so it really doesn’t fit in this category.
JavaSpaces is a pretty simple, elegant API built on Jini which can be used to build a wide variety of applications, including chat apps, but is especially good for things like compute servers, and loosely coupled, distributed applications. Also, if your not familiar with the programming model it can be a bit of a paradigm shift.
Jini, and therefore JavaSpaces as well, are built on RMI, which is the underlying network communications model.
The Java Shared Data Toolkit was actually designed for collaborative desktop applications such as games, but it is essentially a dead product, so it hasn’t been updated to take advantage of things like NIO, etc.
JMS, as has been pointed out, is a high-level messaging API designed for industrial strength communications between mission-critical business apps.Modern JMS servers have gotten pretty fast, but are unlikely to ever match the speed of raw socket communication. That said, there is at least one commercial game server (TerraZona from Zona, inc) that uses JMS as its primary communications channel.
[quote]2) How usefull could they be for example for turn based games?
[/quote]
It really depends on the latency requirements of the game.
I disagree with the assessment that “JMS is too slow, so don’t use it” as this is going to largely depend on the nature of your game. True, if you’re sending data 15 to 20 times a second, JMS probably isn’t for you. If you’re sending data 2 to 3 times a second, or even less frequently, JMS will give you a lot of power for very little effort. It is very easy to learn and use and has a number of nice features for things like secure communications, message filtering, temporary topics for callbacks, etc, and is designed to reliably scale to tens of thousands of simultaneous connections. If it fits with your preformance requirements I say go for it.
JSDT was designed to be much more efficient without a lot of the armor-plating of JMS, but as I pointed out, it’s no longer actively supported, so you have to take that into consideration.
[quote]3) Are their eating much more speed & bandwidth or isn’t the difference that big?
[/quote]
JMS and JSDT both come with a certain amount of overhead, which may be significant, depending on your app. Once again, unless your trying to deliver real-time simulation updates 10+ times a second, this probably isn’t going to be an issue.
[quote]6) Can they interact with Servlets?
7) Is remote database access also part of them?
[/quote]
This is an orthogonal issue. The answer is yes, in the same way any Java API may interact with servlets or jdbc.
[quote]8 ) Are they compatible with RMI?
[/quote]
Jini and Javaspaces are both RMI-based, but may not address your needs. JMS is message based and JSDT is channel-based so neither really maps directly to RMI.
[quote]9) Could they easely be used for making multiple chat sessions, storing name and passwords and such things…?
[/quote]
Multiple chat sessions, sure. storing names and passwords is beyond the domain of the networking APIs, but there’s no reason you can’t communicate this information over any of these networking mechanisms and then store them any way you like.
[quote]So, there is another important question coming: which one is intuitive and easy to learn?
[/quote]
IMO JMS is extremely easy and intuitive to learn, and probably provides a lot more capability than you’re likely to need. There is a cost in terms of latency, but unless extremely low latency is an issue, which it may not be in a turn-based game, JMS may be your best bet for getting off the ground quickly with a minimal learning curve.