jordancrane / distributed-systems Goto Github PK
View Code? Open in Web Editor NEWCoursework for Distributed Systems
Coursework for Distributed Systems
This is a really dumb requirement.... Going to have the make a chained reducer to count the number of records
starts up ─┐ times out,
│ ┌─────────starts ─────────┐ receives votes
│ │ election │ ┌────from majority ───┐
│ │ ▼ │ of servers ▼
│ ┌──────────┴─┐ ┌──────────┴─┐ ┌────────────┐
└────▶│ Follower │ ┌────│ Candidate │──┐ │ Leader │
└────────────┘ │ └────────────┘ │ └────────────┘
▲ ▲ discovers current ▲ │ │
│ │ leader or new term │times out, │
│ └─────────────┘ └───new ─┘ │
│ election │
│ │
│ │
│ │
└─────────────────────discovers server ─────────────────┘
with higher term
One remaining issue:
error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied
--> src/server.rs:45:6
|
45 | impl Service for Server {
| ^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String`
|
= note: required because of the requirements on the impl of `std::marker::Sync` for `atomic::Atomic<std::string::String>`
= note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<atomic::Atomic<std::string::String>>`
= note: required because it appears within the type `server::Server`
= note: required by `server::Service`
error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied
--> src/server.rs:27:5
|
27 | leader_id: Arc<Atomic<String>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String`
|
= note: required by `atomic::Atomic`
error: aborting due to 2 previous errors
error: Could not compile `machine-project-2`.
Need to add a second chained MapReduce job to count the number of total and unique words. Will likely use a modification of the total pair count method from task 2 to add this functionality.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.