Giter Site home page Giter Site logo

Comments (2)

kuujo avatar kuujo commented on June 14, 2024

To be clear, the reason one primitive can slow down other primitives when sharing a client is because a read-heavy primitive that uses SEQUENTIAL read consistency can block command/query responses from a leader in sequencing until a sequential response is received, which often has to wait for entries from the leader since that client has seen recent indexes in other primitives.

from copycat.

kuujo avatar kuujo commented on June 14, 2024

I have been looking in to the idea a bit more tonight, and I think it could be hugely beneficial for both stability and performance. Essentially, this idea evolved out of investigating the thread model in ONOS. What I realized was that the same arguments I made about the threading model in ONOS should apply inside the Copycat client as well. Namely, that we can only guarantee order within a single thread, so the Copycat client is imposing unnecessary overhead on one thread when it has to wait for sequencing for operations that occur another thread.

So, what I'm interested in doing is creating a thread-aware client where it treats each thread as a separate logical session. A logical session adds no overhead - all sessions within a client are still managed with a single register request and keep-alives are shared - but request/response/event sequencing occurs independently of all other sessions, and each logical session appears as a separate session to state machines as well. Each primitive would then use the new thread model to use a specific logical session.

All this would really do is extend ONOS's primitive thread model into Copycat all the way down to the transport layer. That means it would take much better advantage of Netty's concurrency. But more importantly for fault tolerance, it would isolate failures in one thread/primitive from failures in other threads/primitives. For example, if a map put command in one thread gets lost and has to be resent in order to fix sequencing in the cluster, that lost command won't affect/block e.g. a leader election command in another thread until resequencing is complete. It also means sequencing of responses and events will happen independently, so a primitive that's waiting for an event from a follower doesn't block a response from a leader. From what I've seen in the logs, I think this will have a huge impact when the cluster is under high load.

from copycat.

Related Issues (20)

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.