Comments (10)
@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.
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.
Hi @bieniusa , I used LWWRegister and with Python client.
from antidote.
To facilitate your debugging, I attached my test code @bieniusa
from antidote.
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.
Thanks for your reply, @peterzeller ! Some comments/questions:
-
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?
-
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.
-
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?
-
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.
@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:
- 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.
- 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.
@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.
It is on master now; I just merged the PR.
from antidote.
from antidote.
Related Issues (20)
- The command 'make test' fails when performed locally
- Survey on globally distributed software engineering HOT 1
- Missing Spec Annotations
- Prune / Trim Log
- Prune or Trim Log HOT 1
- What's the status of this project? HOT 3
- Problems with inter_dc when the first address in the list leads to connection timeout.
- Update prometheus collector
- Coverdata test file is not cleaned up
- Lint apps/antidote_crdt/test
- Release source code not found warnings for prometheus dependency
- Add test cases for multiple updates on the same key
- Syntax error in antidote/apps/antidote/rebar.lock
- Inter DC partitioning can disrupt replication HOT 1
- Document supported hardware architectures
- pn-counter can lose :ok'd increments in a no fault environment
- pn-counters are susceptible to partitioning
- Document upgrade and downgrade processes
- Last release 2 years old HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from antidote.