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?


Refer to this link http://java.sun.com/developer/technicalArticles/tools/JavaSpaces/. Good explanation.


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 (ie, 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:

  • Every field must be public. (ie, "public String foo")
  • Every type must extend Entry.
  • Every field must extend Object. (ie, 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.

    链接地址: http://www.djcxy.com/p/50842.html

    上一篇: 从std :: tuple中解压缩值的返回值优化

    下一篇: 从哪里开始JavaSpaces?