GithubHelp home page GithubHelp logo

Comments (4)

benschermel avatar benschermel commented on June 11, 2024

Please take a look at the documentation site: https://docs.keydb.dev/docs/multi-master where there is an example. If you just have 2 nodes you may want to try out active-rep option.

Cheers,

Ben

from keydb.

shivakumarss avatar shivakumarss commented on June 11, 2024

Thanks a lot Ben, I will use the documentation, some how i didnt find it earlier.

I had started with active-active deployment but my use-case seems to not fit in there, let me tell you what i am trying to solve and what is my expectations.

  • right now i am having a isolated redis setup in each of the zones ( EU, Asia, SG ) .
  • Each of them are maintaining some counters which are zone specific.
  • Now the requirement is these counters should not be zone specific it should be shared across.
  • I am looking for a solution, lets a key "a" can be incr across zones and they in sync.

I have already evaluated active-active where it doesn't seems to solve my problem, here is what i did.

servera - define a variable and set it to 1 and incr to 3
serverb - verify its value is 3.
-- disconnect the server by giving the wrong port and restart ----
servera - incr the variable till it reaches 6
serverb - incr the variable till it reaches 6
-- sync -- 
servera - value is 6
serverb - value is 6

here my expectation was to have a value of 9 but since the framework uses last write strategy, the variable was synced with value which was written by its latest timestamp.

Is there any way i can change the sync strategy ?

Here i am assuming multi-master would solve the problem, because as per documentation it would not drop the database while the sync with master and it would merge read/writes.

Edit : Based on the merge strategies available and the use case, i think CRDT based resolution will solve the issue. please let me know how do i achieve it or direct me to the documentation for the same.

Thanks a lot.
Shiva

from keydb.

JohnSully avatar JohnSully commented on June 11, 2024

Is there any way i can change the sync strategy ?

Hi @shivakumarss

I intentionally only started with the most simple synchronization strategy. CRDTs are a planned feature but its quite complex to implement and will take some time.

from keydb.

shivakumarss avatar shivakumarss commented on June 11, 2024

Hi @JohnSully Thanks for letting us know.
I have created another ticket for feature request for CRDT sync strategy #47 for us to know once it is done and i am closing this ticket.

Thanks a lot.
Shiva

from keydb.

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.