English 中文(简体)
Where to start with JavaSpaces?
原标题:

I need to start with JavaSpaces and I found this article. But I found JINI library and downloaded it but couln t find JavaSpaces library. Is it moved to JINI or what?

问题回答

There are two JavaSpaces implementations of any note: Blitz and GigaSpaces XAP. Blitz is open source; XAP is commercial, but has a community edition that s free for use.

I m heavily biased towards XAP; I work for them. :) That said, there are a lot of reasons to consider XAP:

Space Aquisition

The mechanism for acquiring a space reference is far easier with GigaSpaces than it is with default JINI:

UrlSpaceConfigurer urlSpaceConfigurer = new UrlSpaceConfigurer("/./space");
IJSpace space = urlSpaceConfigurer.space();
// space is a close JavaSpaces analog, extended because the specification is rather limited

GigaSpace gigaSpace=new GigaSpaceConfigurer(space).gigaSpace();

// gigaSpace has **many** API improvements and is far more flexible.

API Improvements

The default JavaSpace API has no compensation for multiple tuple matches in the space. The more recent (i.e., 8 years old?) does, and Blitz implements it, but it s still not very flexible. Plus, you still get stuck with JINI Entries, which follow something like these rules:

  1. Every field must be public. (i.e., "public String foo")
  2. Every type must extend Entry.
  3. Every field must extend Object. (i.e., Long instead of long, etc.)

XAP allows you to use Entry, but doesn t require it; with XAP, you can use ordinary POJOs. You still want to prefer Object types, because of wildcards (null is the JavaSpaces wildcard) but that s up to you.

XAP also provides a SQL query mechanism, as well as a document-based model (schemaless) for entries, and can also use Spring to manage notifications and remoting.





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签