Coder Social home page Coder Social logo

Comments (10)

20211202na avatar 20211202na commented on June 16, 2024 1

@preguica @bieniusa @peterzeller Thanks for fixing the python client issue!! The new version is running smoothly so far. I'll get back to you if any anomaly identified :D

from antidote.

bieniusa avatar bieniusa commented on June 16, 2024

Thank you @SuperLeilia! We will try to reproduce the setup and test to debug.
One question: What type of CRDT are you using for the reads/writes, e.g. LWWRegister?

from antidote.

SuperLeilia avatar SuperLeilia commented on June 16, 2024

Hi @bieniusa , I used LWWRegister and with Python client.

from antidote.

SuperLeilia avatar SuperLeilia commented on June 16, 2024

To facilitate your debugging, I attached my test code @bieniusa

data_generator_antidote.txt

from antidote.

peterzeller avatar peterzeller commented on June 16, 2024

The Antidote Python client currently does not support session guarantees, so there is no happens-before relation between operations that are executed on the same thread. Does your analysis depend on session guarantees or is it still a consistency violation?

Session guarantees are supported in the Javascript client (see https://antidotedb.github.io/antidote_ts_client/#session-guarantees) and Java client (pass CommitInfo timestamp to a transaction).

from antidote.

SuperLeilia avatar SuperLeilia commented on June 16, 2024

Thanks for your reply, @peterzeller ! Some comments/questions:

  1. We followed https://github.com/AntidoteDB/antidote-python-client, as well as the official document, to deal with client-side logic (for txns). We couldn't find anywhere that python clients cannot work with causal consistency. Are we missing anything?

  2. What do you mean by "no happens-before relation"? Our ops and txns are closed loop and they are definitely ordered by the program order, right? Additionally, based on the returned data, we can infer the write-read order among operations/txns (from possibly different clients) as well, right? If Antidote provides causal consistency, we shouldn't have seen the counterexample posted above.

  3. For python client, what about causal consistency at the process level (e.g., one single thread per process)? There should not be any doubt that a process itself constitutes a session, right?

  4. Are you suggesting that, to benefit from Antidote's causal consistency guarantee, we must currently use either Javascript or Java client?

Looking forward to your reply! Thanks!

from antidote.

peterzeller avatar peterzeller commented on June 16, 2024

@SuperLeilia I have added the option to the python client in this PR: AntidoteDB/antidote-python-client#4

With this change you can set the minimum snapshot time in your code like this:

tx = clt.start_transaction(min_snapshot=clt.last_commit)

The last_commit field is set whenever you have committed a transaction.

Our ops and txns are closed loop and they are definitely ordered by the program order, right?

Antidote does not use the implicit program order - you need to pass the commit timestamp from the previous operation to the next operation manually.

I don't remember exactly why we designed it like this, but I think it was something like this:

  1. Ideally, Antidote clients would automatically fail over to different data centers if the current one cannot be reached. If you always want to enforce program-order that would mean a potential very long wait until the updates from the crashed data center are replicated to the other one. With explicit ordering the programmers have more control to state where the order is important and where it is not.
  2. In many programming languages, program order is not so easy to define. With thread-pools and features like async/await you can have code that looks like it happens on one thread but actually happens on several threads.

Would be cool if you could try with the min_snapshot option.

from antidote.

SuperLeilia avatar SuperLeilia commented on June 16, 2024

@peterzeller Thanks for your reply! I noticed that the new commits (e.g. last_commit field) are on the branch 'session-guarantees-support'. We install Antidote client via "pip antidotedb" which we assume works with the master branch. How can we proceed with the testing?

from antidote.

bieniusa avatar bieniusa commented on June 16, 2024

It is on master now; I just merged the PR.

from antidote.

preguica avatar preguica commented on June 16, 2024

from antidote.

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.