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

Which function type is used for using "at exit-command", Which Function typ...

Which Function type has to be used for using "at exit-command" ? To Use AT EXIT - COMMAND, We must assign a function Type "E" to the relevant function in the MENU Painter OR S

C programming, There is a pebble merchant. He sells the pebbles, that are u...

There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing that

What is line option explicit, What is line option explicit Line explici...

What is line option explicit Line explicit function makes the compiler to recognize all the variables which are not particular by the dim statement. This command significantly

Representation scheme in ai, Representation scheme in AI: • It's fairl...

Representation scheme in AI: • It's fairly trouble-free to represent knowledge in this way. It allows us to be expressive enough to represent largely knowledge, while being co

How many voice channel have a master group, A Master group consists of? ...

A Master group consists of? A master group have 300 voice channels.

Difference between the real mode and the protected mode, Problem (a) ...

Problem (a) Explain the difference between the real mode and the protected mode in the 80x86 family of processors. (b) The 32-bit physical address 047C:0048 is to be conv

Design a alarm system - microprocessor system, A burglar alarm system is co...

A burglar alarm system is controlled by a microprocessor system. The system has three independent circuit each consisting of 7 passive infra red sensors. The controller can be prog

How will you fine-tune a class, How will you fine-tune a class? It is u...

How will you fine-tune a class? It is useful to fine-tune classes before writing code in order to examine development or to improve performance. The purpose of execution is to

Give brief summary of common aspects found in spreadsheets, Give brief summ...

Give brief summary of common aspects found in spreadsheets -  It's made up of columns and rows; every row is identified by a number and every column is identified with a letter

Importance of decentralization, What are the importance of Decentralization...

What are the importance of Decentralization? a) Self responsibility b) Work autonomy c) Quick decisions d) Continuous involvement and e) Better control. What are the differe

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