Giter Club home page Giter Club logo

udpserverclient's People

Contributors

staed avatar wuhanmonkey avatar

Watchers

 avatar  avatar

Forkers

staed

udpserverclient's Issues

Issue with show-all

Tested with continue. Out of Index on line 144 which just printing out the message. show-all still been broadcast out. Working on it now.

Create an Ack for RW commands in Model 3&4

We will probably have to amend the heldAcks dict to include the
command that was issued. Since Python keys can use tuples as keys
because tuples are immutable, we can change the keys to the following:
heldAcks key is [(command, key)]

This should have minimal change to the existing code.

From the Milestone:

For Model 3&4 (Eventual Consistency):
The client node does not receive the results of the Send operation until all
nodes have done the operation and ACKed the Central server. In this case
the central server is responsible for processing the Acks and determining
which is the correct response.

This is done by comparing timestamps.

Commands [Insert] and [Update]

Given the wording in the requirements as well as later required
functionality it seems that these commands only execute locally instead of
globally as it is currently done. Can you confirm this, so I can go ahead on
the change?

Repair Inconsistencies Functionality

To avoid impacting the rest of the code as much as possible, periodic
repair is probably going to be our best option. Something of the form:

<In Central_server.py>
if int(time.time() % 10) == 5:
    repairInconsistencies()

or

if message and (message.split(" "))[0].lower() != 'ack':
    count += 1
if count > 5:
    count = 0
    repairInconsistencies()

where the function sends out a special show-all to the clients where
the client doesn't print it out on the terminal but sends the results and
modified time to the server. Then the server adds all the values to a
temporary dict on it's own side. It replaces only if time in dict > new time.

When all special show-all have been received, it iterates through each
key in the dict and sends a insert for that specific key-value

for key in tmpData:
    for s in self.server_list:
        nmsg = 'insert ' + key + ' ' + (tmpData[key])[0] + ' ' + self.model + ' ' s
        self.s_send.sendto(nmsg, (self.h, int(s)))
    time.sleep(0.2)

This requires modifying insert and update so that the hashtable
data has a tuple (value, sysTime) instead of the current value

From Milestone:

The client node does not receive the results of the Send operation until all
As replicas may grow out of sync with each other, have a way to repair the
these inconsistencies via last-writer-win rule. We can use any of the three
following methods to do this:

write repair
read repair
periodic repair

The struct of Eventual consistency

I think we should not use a central server for eventual consistency, or at least we should mute the broadcast of central server.

Here is the reason:
When sending request for 'insert', 'get' or 'update', if it go through the central server, the central server will broadcast it. Since we ensure FIFO on the node, they will be added into the priority queue. Thus, there would be no inconsistency since all operations will be process in the same order across the node and result in a linear or sequencial consistency.

What we should do:
1.When we choose model 3 or 4 on Central server, it acknowledge all nodes.
2.Except for 'get', 'insert' and 'update', other operation should still go through the central server and been broadcasted if necessary.
3.For 'get', 'insert' and 'update', the local node will not send request to central server. Instead, it sends the request to other 3 nodes. Collect acks based on W=k and R=k.

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.