Peersim vs Neurogrid: Java Classes
Peersim has the following classes:
Neurogrid has the following:
- Node - The P2P network is composed of nodes. A node is a container of protocols. The node interface provides access to the protocols it holds, and to a fixed ID of the node.
- CDProtocol - It is a specific protocol, that is designed to run in the cycle-driven model. Such a protocol simply defines an operation to be performed at each cycle.
- Linkable - Typically implemented by protocols, this interface provides a service to other protocols to access a set of neighbor nodes. The instances of the same linkable protocol class over the nodes define an overlay network.
- Control - Classes implementing this interface can be scheduled for execution at certain points during the simulation. These classes typically observe or modify the simulation.
Neurogrid has the following:
- Keyword - coordinates the keyword ids and the storage of keywords in hashtables, while farming out the exact nature of the keyword String representation to its child classes.
- Document - coordinates the document ids and the storage of documents in hashtables, while farming out representational details to child classes. In addition documents are assumed to contain a number of keywords, an assumption that bares out for some simulations but not for others.
- Message - contains a number of variables generic across messages, specifically a time to live (TTL) counter and three Node references, regarding where the message is now, where is was immediately previously and where it originated.
- Node - contains more data structures: a map of connections to other nodes, MultiHashtables (that support mappings of multiple values to the same key) that map keywords and document ids to specific content. It also contains a knowledge base that can store information about other nodes, a table of seen messages, a message inbox and most importantly a MessageHandler.
- Network - populate the the nodes with documents, create documents, etc.
0 Comments:
Post a Comment
<< Home