Code Monkey home page Code Monkey logo

distsysmp0's People

Contributors

co1010 avatar

Watchers

 avatar

distsysmp0's Issues

Code Review

  • Redeclaration of Message, ACK, checkError

    • As weird as it sounds, everything within a package is shared. Breaking them up into individual files is just for our reading convenience and the compiler essentially cats the .go files in a package together. You don't need to redeclare these structs and functions.
    • Message should be abstracted into its own package. Same with Ack (or it could be absorbed with Message into a generic messages package). Main thing is that it shouldn't be in the process code.
    • checkError could go into util.go or something similar to make it clearer where it lives and what its function is.
  • tcpS.go

    • Use argparse
    • For such a small project, just a main function works. You will need to get in the habit of breaking things out into separate functions in the future.
    • l.Close() should be deferred
    • errors aren't handled well
  • tcpC.go

    • Similarly, break these functions out. Constructing the message from the command line can happen in the message package. It isn't unique to the client process.
    • errors aren't handled well

You did a good job finding the gob package, however your README is a bit lacking. We want with the MP psets for you to develop critical thinking skills when designing and building distributed systems. This means doing more than implementing the system, but actually understanding and defending your design. Why is Gob better? Why is your Message struct good? Why is the way you wrote your code good? Convince me that the Message struct belongs in tcpC.go and not in its own package. Why is it okay to ignore some errors and not others? Can you 'prove' those errors would never occur with the way your wrote your code?

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.