Code Monkey home page Code Monkey logo

Comments (10)

hhblaze avatar hhblaze commented on August 28, 2024

With Raft you are sending commands, so send command AddUser. If will fire in all nodes inside of oncommitted callback, open there transaction and write your user into favorite Db, that is all - user is stored everywhere. You can grab your user from any node... Sorry, no code within nearest 3 weeks...Vacation...

from dbreeze.

Lectere avatar Lectere commented on August 28, 2024

I'll gladly wait for three weeks!, Have a nice vacation!

That all makes sense. But that seems like the 'easy' part, And with easy I mean, easy using Raft. Now a node has a total crash, harddisk gone, out for at least 24 hours. OS and software reinstalled, the node joins the Raft network again. Is there a away to get the complete set from the leader, without having to send the complete set to every node?

from dbreeze.

hhblaze avatar hhblaze commented on August 28, 2024

Ok, your concern is clear, currently system will send all commands from the first one to the newly added node, there is no other faster mechanism of restoration. But such mech. is possible. I will think ab. this for the future implementation. Currently The easiest way is to stop working node, clone its content to the newly added node and start both nodes. That can be achieved with 3rd tools.

from dbreeze.

hhblaze avatar hhblaze commented on August 28, 2024

As an explanatory add on: if you have 5 nodes, one crashes, 4 others go on to live, we join a clean node instead of crashed one, it connects to the leader and gets from it in historical sequence all commands restoring its state. At the moment of restoration leader will be a bit under load giving the history to the newly added node, the other nodes will function in standard mode.

from dbreeze.

Lectere avatar Lectere commented on August 28, 2024

A total historical sequene is not necessary. If user has changed from 0 to 1, from 1 to 2, from 2 to 3. You don't need to know everything, just the current value, I only need to know the value is 3 now.

So,the clean node, or a crashed one, that's all the same to me. But it should go to the leader for a copy of the current state, during which commits are suspended. And that should be traffic from the leader to the new/clean node. Not to every node in the system. I think the word for that is 'To Catch Up' :)

Btw go enjoy your vacation :)

from dbreeze.

hhblaze avatar hhblaze commented on August 28, 2024

It works exactly like you need, also you can setup entity to remember only latest state, without history, check config in docu

from dbreeze.

Lectere avatar Lectere commented on August 28, 2024

I have read the documentation, but I can't find this section. Maybe I've overlooked it, can you point me to the specific document and page/section/chapter, thnx

from dbreeze.

hhblaze avatar hhblaze commented on August 28, 2024

Screenshot_20190715-164523

from dbreeze.

hhblaze avatar hhblaze commented on August 28, 2024

It is Raft docu, persistence in memory with only latest entity state

from dbreeze.

Lectere avatar Lectere commented on August 28, 2024

To what level DBreeze was available to store your own dataset is still unclear to me. I've already constructed a mechanism that transfers on request the total dataset to other nodes. I only use raft to determine who’s the leader. I have some other questions, but I’ll post them on the Raft git.

from dbreeze.

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.