English 中文(简体)
备选方法:同行适用
原标题:Design Alternatives : Peer to Peer application

I am about to develop a peer to peer file sharing application in Java for a school project and was thinking over its design. I am stuck with two alternatives :

1 P-4, 1 P-3, 1 FS, 1 NS

A. 导 言 拥有国家资料的同龄人,如国家身份证、其偏爱的邻居、物品数目等。

and

“同龄人”一类,是同龄人的一个接口。 该文件将提及同侪目标,然后使用相应方法。 其中一些方法是更新PNeighbours,与另一个同侪连接或脱节,产生新的风险。 记录等。

但是,当我从办事处的设计角度考虑这一问题时,我感到,同侪目标应当对其行为负责。 下面我要谈谈第二种选择:

2)

A. 导 言 同行接口,包括与其他同侪连接、更新邻居等所有方法(以前在同侪管理中)。

并且实施这一接口,即“同侪审查”,其中包含所有的国家信息,并采用接口中的所有方法。

但是,我对这种做法的质疑是,它将取消“保姆”类。 国家由许多信息组成,因此,我需要拥有它们的编造者和编造者,以便其他校友能够更新国家。 此外,如果我还必须采用所有接口方法,就会使执行类别变得庞大,很难维持甚至 de。


是否有其他办法解决这一问题,是否有任何建议? 或者我选择哪一位?

PS: I cannot give all the requirements of the project here as it will make the post too big, but what I have described is more or less the essence of the project.

最佳回答

不知道你问题的细节,很难具体处理。 然而,如果你从数据模型的角度看待同侪类别,似乎有两类数据(至少是):作为同侪物体特性的身份证,以及像喜欢邻居的同类财产一样属于同侪财产。 我对将这些物品分成单独的物体类别给予某种考虑。

关于第二种做法的复杂性问题:在第一个办法的同侪管理类别方面是否存在同样的问题? 在我看来,这似乎既是一个问题,也不利于另一种做法。

问题回答

暂无回答




相关问题
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 ...

热门标签