5

I am building a software program that follows the scenario:

I have many computers, and add each one of them to the a cluster. Each computer in the cluster can add a file to a distributed table (dictionary,hashmap, should be fast enough).

So now I have a place where everyone can see what files does the group/cluster contains. Now a computer from the group/cluster requests a file. He can access all the information about the file from the distributed table ( on what computer it can find the file etc...).

By some mechanism it should get the file from point B ( computer that has the file ) to point A ( the computer who requested the file ).

Basically it should do data replication. ( but for very large files )

So you probably wonder by now, what is this quy asking for, here it is :

The data replication should be as fast as possible. What would be the best approach ? I thought about something like flux networks.

What would be the best framework, to use for a software following the scenario ?

I AM SEARCHING FOR A JAVA FRAMEWORK :). (I NEEDED TO RUN CROSS-PLATFORM)

Thank you!

4

4 回答 4

4

我敢肯定你已经发现有很多用于 java 的库可以让你实现这种受干扰的地图。

  • Hazelcast - 新手,非常易于使用,并提供标准 java 接口的实现,如 ConcurrentMap
  • JGroups - 真的只是群组消息的库,但包含一个 DisturbutedHashMap 实现
  • jBoss Cache - 建立在 jGroups 之上,提供了一个更完整的受干扰的缓存系统,具有可选的持久性和事务
  • 兵马俑- 大且非常受欢迎,商业支持
  • Oracle Coherence - 他们的父亲,价格标签相匹配

还有更多(更多),我个人目前的偏好是 Hazelcast,它非常容易上手。我列出的所有缓存框架(我认为)都依赖于能够(至少暂时)能够将整个条目加载到内存中,如果您尝试将大文件的内容放入内存中,这可能是一个问题他们。

在您的情况下,我可能会使用受干扰的地图来存储位置数据,即一些数据来告诉任何其他节点某个特定文件在哪里,然后使用一些超出范围的方法(例如 HTTP)直接转到该节点。

于 2009-08-06T11:55:10.263 回答
1

JXTA是 Sun 的 Java 对等框架,最有可能在这里使用。

或者查看Jini及其服务租赁、动态发现和协议独立客户端/服务器通信的能力。使用 Jini,您可以发布具有特定属性的每个服务(在这种情况下是您的文件名?),或者也许将它与Javaspaces一起使用(但是我不确定这里的空格是否合适)

于 2009-08-06T11:28:05.717 回答
0

对于分布式哈希图,上面有一些很好的答案。

如果可能的话,为了实际复制文件,我宁愿不复制任何东西,只使用一些共享存储解决方案。如果您必须为每台计算机使用单独的磁盘,那么在每台计算机上设置 FTP 服务器等简单的操作应该可以工作。这不一定是基于 Java 的,但如果你只想要 Java 的解决方案,像Apache MINA这样的解决方案可以工作。

于 2009-08-06T12:38:47.690 回答
0

看起来您正在搜索:Project Voldemort或其他自动故障转移、复制等的 Key=>Value 数据存储。

于 2009-08-06T11:21:27.120 回答