-
Notifications
You must be signed in to change notification settings - Fork 752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transaction API. High prio #4918
Comments
can i take this issue? i have got some issues about how to maintain the data relationships in an transactional manner like #4823 (delete a role, but the users still have the leaked role granted), it would be much easier to get these data relationships cleaner with these transactional apis |
Of course my man! Thank you so much! |
thank you, i'd take a try transform the existed create_table-like cases into the mini-tx-language representations before coding the implementations, maybe there're some possbilities about the implementations with the mini-language about the existed procedures. 🤝 |
/assignme |
That will be the final great goal:D |
BTW, the pseudo-code above lacks Every record value in metasrv is a pub struct SeqV<T = Vec<u8>> {
pub seq: u64,
pub meta: Option<KVMeta>,
pub data: T,
} The transaction mini-lang needs several commands that manipulate // Since there is already the famous |
It seems like need a simple vm with a few opcodes like https://github.com/vectordotdev/vector/blob/master/lib/vrl/compiler/src/vm/machine.rs ? |
here's a transaction API from etcd, it seems quite simple, only a batched IF expressions and a batched THEN operations: |
One brain storm: may be can introduce Lua VM into metasrv, like redis? |
script is a way to make transaction serializable (meets the Isolation from ACID), but it might make things hard to keep consistent across different nodes, it requires every compution is determined, otherwise any undertermined behaviour would be dangerous in the raft replication case, which might corrupt the data across the nodes:
IMO, an restricted operations set other than a turing complete vm might be easier to reason about the consistency across the nodes. 🤔 |
Make metasrv as a blockchain with raft consensus in additional EVM? |
metasrv provides a small language with which a complete tx can be expressed as this demo illustrated(embedded tx support solution and the tx-language solution).
Statements
to describe transaction). This can be considered a small script language.Statements
.Workflow:
A caller(metasrv client) creates a
Statements
, and sends it to metasrv.metasrv replicates it through raft protocol, commits it, and executes it. Then respond the result to the client(metasrv client).
The text was updated successfully, but these errors were encountered: