MNET ==== Sources ------- Text: Mojo Nation Technology Overview [1] Mojo Nation FAQ [2] MNet hackerdocs (part of the mnet distribution) Practical: mnet install (see cvs at http://mnet.sourceforge.net for sources) Summary ------- What is MNet? What is Mojo Nation? What is the difference? MNet is a file sharing network based on a globally distributed file store which is based on a p2p resource sharing architecture. In MNet when files are shared, they are injected into the network and stored on a number of the nodes that make up the network. A file injected into the network is broken up into pieces and the individual parts are stored at separate nodes. Retrieving a file from the network requires finding the pieces that make up the file, downloading them from the nodes that store them and reassembling the file. An MNet node offers a configurable amount of disk resources to store these chunks of files. A node can also offer processing resources to help search for files, or to relay requests through firewalls. A file that has been injected into the network cannot be modified or deleted (?). MNet uses a virtual currency called mojo to help keep resource supply and demand in balance. Peers pay mojo to use services (storage or processing) offered by other nodes. Thus nodes that offer more services and resources can use more services and resources. MojoNation was the predecessor to MNet. When the Evil Geniuses For a Better Tomorrow (the company developing MojoNation) ran out of money the development switched to the open source code base which is MNet. Concepts -------- User - the user running an MNet node Node/Peer - a computer on the mnet network. More specifically a collection of programs (also called agents) running on one host on behalf of a user Mojo - the virtual currency used to pay nodes for use of their resources and services. denominated in 'tokens' or 'mojos' Broker - the middleman between the user interface and the network. provide services ... ? Block server - A broker that provides storage space for file blocks Metatracker - A broker that notes the network location of brokers that are online and the services they provide. Content Tracker - A broker that stores dinodes. Content trackers are used to search for content. Publication Tracker - A broker that keeps track of which block servers hold which blocks. Relay - placed outside a firewall. A relay stores messages for brokers behind the firewall. the brokers can retrieve the messages through the fire wall and process them. (file) Piece - a fixed size(?) piece of a file (file) Block - an eighth part of a file piece. A file piece is usually split up into 8 blocks. Each block is redundant in that any 4 of these 8 blocks are sufficient to recreate the file piece. BlockID - a cryptographic hash of a block used to identify the block Sharemap - a description of which pieces make up a file and which blocks make up those pieces Dinode - a list of blocks making up a sharemap How it works ------------ Publishing. Publishing a file, or injecting a file into the network, goes through a user's broker. The file is passed to the user's broker where it is split into a number of pieces. Each piece is split into eight blocks. The blocks are redundant in that any 4 blocks are enough to reconstruct the piece. A block ID is then generated for each block. The broker gets a list of block servers from the meta tracker. A block server can limit the range of block IDs that it is willing to store. The broker chooses appropriate block servers and sends them the blocks. The broker then tells the publication tracker where each block has been stored. The broker then creates a sharemap. The sharemap describes how which pieces make up the file and which data blocks make up those pieces. The sharemap itself is encrypted and split into blocks. The list of blocks making up a sharemap is called a dinode. The dinode is registered with the content tracker. The content tracker also stores other descriptive information about the file represented by the dinode. This may include the publisher's name, a description of the content, etc. Searching. Searching the network is also done through a user's broker. The user passes any serch criteria to the broker. Generally the search criteria include a file type (e.g., audio, video, software, etc.) and any criteria relevant to that type (e.g., bitrate, resolution, etc.). Upon recieving the search criteria the broker locates every content tracker on the system (how?) and chooses a number of these (based on price and reputation) to perform the search on. The broker performs the search by passing the search criteria to the chosen trackers, who return any information they have that matches those criteria. Included in this returned information must be a dinode that refers to the file. The information may also include details about the file such as its name, a description and file type specific properties. These search results are returned to the user. Downloading. Like publishing and searching, downloading of a file is also done through a user's broker. In order to download a file the broker requires that file's dinode. The broker first uses the dinode to reconstruct the file's sharemap, then uses the sharemap to reconstruct the file. A list pf block servers carrying the requested blocks is provided by the meta tracker. When choosing which block servers to download from a broker may evaluate properies such as cost (in mojo), download speed, reputation, previous transactions, etc. Protocol -------- The MNet communication protocol is message-based and asynchronous. Mnet defines four layers of protocols. The transaction layer is the top layer, while the transport layer is the lowest layer. Transport Layer. Moves bits from one party to another. TCP/IP, however it is possible to have mnet communicate over a datagram protocol. Encryption and Authentication Layer. Provides secure and private communication between two parties. Converstation Layer Defines the communication between two parties. This is message based. As such, this layer defines the different kinds of messages two parties can send each other. There are two general types of messages: initiaing and response messages. an initiating message starts a conversation. The initiating message is assigned a conversation identifier (a nonce - a random number) that is used in subsequent reply messages. Transaction Layer Defines the exchange of mojo for services/resource use. This is generally based on IOUs (credit) rather than direct exchanges of mojo. This layer also defines the protocol for negotiating between peers. There are also a number of other protocols that are use for the tracking services. Metatracking protocl generally every broker will be a meta tracker. The broker starts with a hardcoded bootstrap list of metatrackers. it sends "hello" messages to these metatrackers. they reply with their lists of metatrackers. As such, the broker builds up a large list of metatrackers. It then picks a number of these metatrackers (based on costs and reputations) and asks them for a list of brokers. Content Tracking Publication Tracking Mojo Economics -------------- In MNet all services must be paid for in mojo. Thus, in order to participate in MNet a user must also provide services and/or resources. This is a mechanism for preventing freeloading and denial of service attacks, as well as a mechanism for balancing resource supply and demand. The choice of which server to use for any particular service is usually influenced by the price charged for that service. Not only the price, but a node's reputation is also an important factor when choosing services provided by other nodes. Each broker maintains a list of reputations for other brokers. reputations are based on the brokers' history regarding quality of service in previous transactions. Note that it not only costs mojo to download content, but also to publish content. This is because mojo must be paid to the nodes who store the file blocks. Application Features -------------------- All MNet users must run a broker. Once a broker is running there are two ways to access MNet. One way is by connecting to the broker with a regular browser. The other is by connecting to the broker using an MNet GUI application. Both offer the same functionality: publishing, searching and downloading. When publishing a file the applications allow the user to fill in details (type, title, etc.) about the file. When searching, search results include these details. When downloading the applications show the download progress. They do not show which nodes the file blocks are being downloaded from. installing MNet is relatively easy on Linux. I have not succeeded on Solaris yet due to weird compilation/linking problems Setting up a Local Network -------------------------- Comments -------- I'm not sure how important the role of mojo (and the whole mojo economics) is in MNet. It could be that MNet does not actually use mojo. References ---------- [1] http://web.archive.org/web/20020127125928/www.mojonation.net/docs/technical_overview.shtml [2] http://web.archive.org/web/20001213095500/www.mojonation.net/docs/faq.shtml