Code Monkey home page Code Monkey logo

lindadistributedstoragemodel's Introduction

Linda

Project Description:

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.

Linda Commands:

  • 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

Note

  • 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

Run the Program

Compile the Files

  • run "make"

Run the Program

  • "java P1 "

Clean up files

  • "rm *.class *.txt

Examples:

$ 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>

lindadistributedstoragemodel's People

Contributors

josephkphan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.