Giter VIP home page Giter VIP logo

distributed-systems's People

Contributors

jonahgeorge avatar jordancrane avatar

Watchers

 avatar

distributed-systems's Issues

[Project 2] I didn't realize how terms were supposed to be used

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

Lack of copy trait on strings preventing Atomic operation

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`.

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.