Linda is a distributed model (Peer to Peer System) for a tuple storage system. Remote processes can access the tuple space by atomic operations(in, rd, inp, rdp, out, eval). For my model, I have only implemented in, rd, out, add, and delete This program supports redundancy and fault-tolerance. There replication factor of 2 Any host and any process can fail but the network configurations (i.e., host IP addresses and port numbers) should always available, and the tuples space should consistent. To create this redundancy, consistency, high availability, and fault tolerance, I integrated consistent hashing to efficiently add and remove hosts while redistributing tuples.
- in(tuple) - will Request a tuple from the tuple space and delete it. It is also a blocking call
- rd(tuple) - will Request a tuple from the tuple space and read it. It is also a blocking call
- out(tuple) - will insert a tuple into the tuple space
- add{(host name, ip address, port number)} - adds the following host
- delete(host name{,hostname}) - will delete a list of hosts from the system
- This program only handles edge cases for at most one host is crashed at a time
- If a host is crashed, all the requests will get redirected to that host's back up
- Hosts within the system are the only ones that can add in new hosts. An outside host cannot add a member of the system
- While a host is crashed - only in, rd, out are taken care of. CANNOT ADD OR DELETE when a host is crashed
Compile the Files
- run "make"
Run the Program
- "java P1 "
Clean up files
- "rm *.class *.txt
$ P1 host_1
129.210.16.80 at port number: 9998
linda>
$ P1 host_2
129.210.16.81 at port number: 3571
linda> add (host_1, 129.210.16.80, 9998)
linda> out(“abc”, 3)
put tuple (“abc”, 3) on 129.210.16.81
linda>
linda> in(“abc”, ?i:int)
get tuple (“abc”, 3) on 129.210.16.81
linda>