Giter Club home page Giter Club logo

cs542's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

tcarroll25

cs542's Issues

Client accepts keys whether they are alphabetic or numeric

On the client side, you enter a string instead of a number when prompted for a key. This works for all command types. Server accepts this and interprets string as the number 0, unless the string begins with a series of numbers, in which case that is the index used.

Steps to reproduce, with a few different scenarios:

  1. Spawn server

  2. Spawn client

  3. On client, use put command

  4. When prompted for key, type "test"

  5. Continue entering parameters as normal

  6. Note that data is put at index 0 (if empty)

  7. On client, use get command

  8. When prompted for key, type "foo"

  9. Note that you actually get index 0

  10. On client, use remove command

  11. When prompted for key, type "bar"

  12. Note that you actually remove index 0

  13. On client, use put command

  14. When prompted for key, type "22fast2furious"

  15. Continue entering parameters as normal

  16. Note that data is put at index 22 (if empty)

  17. On client, use put command

  18. When prompted for key, type "9 9999999"

  19. When prompted for file, type "n"

  20. When prompted for data, type "test"

  21. Note that "9999999 test" is put at index 9 (if empty)

Looks like we just need to do some validation on the client side.

Clients getting the results from other clients

If multiple client actions are performed in quick succession then sometimes one client will get the results back from another client and vice versa. For example:

A performs REMOVE
B performs GET
A gets failed GET
B gets successful REMOVE

Using the put command on an exceptionally long string results in saving the beginning of the string but not all of it

Very long strings are not stored in full, only the beginning is stored.

Steps to reproduce:

  1. Spawn server
  2. Spawn client
  3. Find an empty index and use the put command on it
  4. When it asks you to enter the data, hold down the a key for a really long time
  5. Like, a really long time. A couple minutes. Put something on your keyboard and walk away.
  6. When you come back, press enter to store the data
  7. Use a get command on that index
  8. Note that the full string does not get retrieved

This may have something to do with a maximum buffer length specified by the client/server communication

On multiclient communication, if one client quits, the server doesn't handle the other clients properly anymore

If two clients are active, quitting with one of them causes problems when another client tries to access the server.

Steps to reproduce:

  1. Spawn server
  2. Spawn client A
  3. Spawn client B
  4. Do a few actions on each client, but make sure you remove at index 8
  5. On client A, quit
  6. On client B, put the string "hi" at index 8
  7. Server console should read:

The client disconnected!
Received: put 8 hi
Unable to send the data!
-bash-3.2$

  1. Note that server is now disconnected
  2. Note that the put command actually worked, and you can do a get on index 8 for "hi"

We may not be handling a disconnect properly in the event that many clients are connected to the server.

When server receives two commands from two clients at the about the same time, the server responds by sending client A's response to client B and vice versa

If a server receives two commands at about the same time, the commands are correctly processed. However, the server responds to the clients with the wrong message. Instead of the first client getting the message that corresponds with its command, it gets the message that corresponds with the second client's command.

Steps to reproduce:

  1. Spawn server
  2. Spawn client A
  3. Spawn client B
  4. Have client A put "test" in index 1 (if it fails, no big deal, that means there is something there already)
  5. On client A, type "remove" and press enter
  6. On client A, type "1" and stop
  7. On client B, type "get" and press enter
  8. On client B, type "1" and stop
  9. Go back to client A, press enter, press Alt+Tab, and press enter (this will end up sending client B's command to the server also)
  10. Note that the server received the commands properly and the get command fails, however the clients receive each other's messages from the server instead of their own

James said that tracking the clients would solve this issue and he knows how to fix it.

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.