distsysmp0's People
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.