Host cache agents, Computer Engineering

Assignment Help:

Your task is to program software agents able to send and receive messages according to the two Gnutella protocols above.

Your solution should have two types of agents: 

  •  Agents to simulate host caches - host caches supply information about which servent(s) are available. 
  •  Agents to simulate servents - servents come and go; when they go, they must let the host caches know about it. The fist time a servent connects to the network, they interact with the host cache agents as below, then they interact with other servents.

Host Cache Agents

You should program a host cache agent to behave as follows: 

1.  The first time a servent enters the network, it interacts with the host cache to "introduce" itself. The host cache should keep a record of all servents, and their status (online or offline). The host cache should be able to detect when a servent is returning or if it is its first time connecting to the network 

2.  After the registration is finished (if it is the first time the servent joins the network) or after updating the status of the servent (if a returning servent), the host cache supplies the servent with another servent id; these two servents interact as explained below.  The number of host caches is fixed; you are free to choose how many, but it should be more than one. Notice that the host caches are exactly the same, that is, they behave in the same and they only differ in their ids and the servents they have in their records. 

Servent Agents

You should program a servent agent to behave as follows:

1.  The servent initially interacts with the host cache agents to obtain one (1) servent it can "ping". If this is its first time joining the network, the host cache "registers" the new servent. 

2.  In possession of one servent id, the servent agent uses the "ping-pong" protocol to find out at most 4 (four) other servents (this number includes the servent whose if the host cache provided). This step should ensure each servent ends up with 4 neighbours

3.  When a servent agent receives a ping from another agent, it replies with a pong, but also forwards the "ping" message to one of its neighbours, as explained in our lectures. This forwarding of "ping" messages should go on for 3 "hops", guaranteeing that the servent that initiates the protocol ends up with 4 neighbours. 

4.  After the servent agent gets to "know" other servents, then it should search for a number of files. 

5.  The search should have a "TTL" (time-to-live) of n hops, where n is a parameter of the system (that is, it should not be hardcoded). The search should follow the peer-to-peer "flooded request" search algorithm, studied in our lectures.


Related Discussions:- Host cache agents

What is indirect addressing mode explain, Q. What is Indirect Addressing Mo...

Q. What is Indirect Addressing Mode explain? Indirect Addressing Mode In the indirect addressing modes operands employ registers to point to locations in memory. So it is

Short notes on displacement only addressing mode, (a) Write short notes on...

(a) Write short notes on displacement only addressing mode. (b) Explain the formats of a 80-bit floating point number. (c) Given the following assembly program. Instructi

Which device converts BCD to seven segment, A device which converts BCD to ...

A device which converts BCD to Seven Segment is called ? Ans. DECODER is a device that converts BCD to Seven Segment. This coverts binary words in alphanumeric characters.

Find the boolean expression for boolean algebra, Find the Boolean expressio...

Find the Boolean expression for logic circuit shown in Figure below and reduce it using Boolean algebra. Ans. Y = (AB)' + (A' + B)' = A' + B' + AB' by using Demorgan's Theorem. =

Execute sparse matrix dynamically, To execute sparse matrix dynamically, Wh...

To execute sparse matrix dynamically, Which data structure is used Linked List data structure is used to execute sparse matrix dynamically

Anti reflection coating, expression for thickness and refractive index of c...

expression for thickness and refractive index of coating material to act as anti reflection coating

#titlecompiler design.., c program for converting context free grammar to g...

c program for converting context free grammar to griebach normal form

Explain the method to identify the object classes, Explain the method to id...

Explain the method to identify the Object Classes You would always be careful while identifying relevant object classes from application domain. Objects may include physical e

How e-commerce works for the customer, The customers visit the website and ...

The customers visit the website and browse through the products, looking at pictures and products details. When the customer finds his desired product, he usually adds it to his ca

A graph ''g'' with ''n'' nodes is bipartite, A graph 'G' with 'n' nodes is ...

A graph 'G' with 'n' nodes is bipartite if it have  no cycle of odd length.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd