Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9524151

Have any Question?


Related Questions in Computer Engineering

Question critical infrastructures -1discuss cybersecurity

Question: Critical Infrastructures - 1. Discuss cybersecurity policy issues affecting SCADA and ICS systems for Critical Infrastructure services for the public, and compare those issues to the policy issues that affect t ...

Question suppose that in n a particular implementation of

Question : Suppose that in n a particular implementation of the MIPS single-cycle design, the lw instruction takes the longest amount of physical time to execute at 3.5 ns. What would be the theoretical maximum clock rat ...

Reading the biographybook where the body meets memory by

Reading the Biography Book : "Where the Body Meets Memory" by David Mura Questions: On page 62 to 66, David Mura talked about an incident when he was in fifth grade. A bully called Mike Wrangel was trying to beat up anot ...

When using todays digital cameras file sizes are often

When using today's digital cameras file sizes are often saved in a format that is well over 1 Megabyte. This may be great for high definition photo reproductions but is a disaster for uploading to the web. Images on your ...

Question group work this weekbull introduce yourself to

Question: Group work this week: • Introduce yourself to your group • Start planning out the project with your group • The group should compile the following information into a draft document 1. What specific and detailed ...

Determine the critical values for a left-tailed test of a

Determine the critical? value(s) for a? left-tailed test of a population mean at the alpha α=0.01 level of significance based on a sample size of n=15.

Question how will you create the cicd process for this

Question: How will you create the CI/CD process for this application? Propose the tools, technologies required to achieve CI/CD in general. The response must be typed, single spaced, must be in times new roman font (size ...

Question there are a number of key steps necessary to

Question: There are a number of key steps necessary to effectively handle an incident. Please briefly describe the basic activities in the incident response procedure . Choose two activities in the basic activities in th ...

Given an undirected graph with both positive and negative

Given an undirected graph with both positive and negative edge weights, design an algorithm to find a maximum spanning forest with the largest total edge weights.

A small sports club keeps information about its members and

A small sports club keeps information about its members and the fees they pay. The secretary wants to be able to record when members pay and print a report similar to that in the figure below. last n me - first_narne - p ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As