从哪里开始使用 JavaSpaces?

发布于 2024-10-17 19:27:27 字数 190 浏览 7 评论 0原文

我需要从 JavaSpaces 开始,我找到了这篇文章。但是我找到了 JINI 库并下载了它,但找不到 JavaSpaces 库。是转移到JINI还是什么?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

二货你真萌 2024-10-24 19:27:27

有两种值得注意的 JavaSpaces 实现:BlitzGigaSpaces XAP。 Blitz 是开源的; XAP 是商业版,但有一个免费使用的社区版本。

我严重偏向XAP;我为他们工作。 :) 也就是说,有很多理由考虑 XAP:

空间获取 使用

GigaSpaces 获取空间引用的机制比使用默认的 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 改进

默认的 JavaSpace API 有对空间中的多个元组匹配没有补偿。最近的(即8岁?)确实如此,并且Blitz实现了它,但它仍然不是很灵活。另外,您仍然会陷入 JINI 条目的困境,它遵循以下规则:

  1. 每个字段都必须是公共的。 (即“public String foo”)
  2. 每种类型都必须扩展 Entry。
  3. 每个字段都必须扩展 Object。 (即,Long 而不是 long 等)

XAP 允许您使用 Entry,但不要求它;有了XAP,你就可以使用普通的POJO。由于通配符(null 是 JavaSpaces 通配符),您仍然希望更喜欢对象类型,但这取决于您。

XAP 还提供 SQL 查询机制以及基于文档的条目模型(无模式),还可以使用 Spring 来管理通知和远程处理。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文