casbin / casbin-rs

An authorization library that supports access control models like ACL, RBAC, ABAC in Rust.
https://casbin.org
Apache License 2.0
832 stars 67 forks source link

casbin-raft implementation #114

Open GopherJ opened 4 years ago

GopherJ commented 4 years ago

I don't really like the idea of watchers because it's buggy and heavy, image when one enforcer AddPolicy, the others need to reload all the policies from DB.....

we should find other solutions.

See also: https://github.com/casbin/casbin/issues/421

GopherJ commented 4 years ago

On the same machine we don't need multiple enforcers, we just need to wrap enforcer inside Arc<RwLock>.

We only need this when there are multiple enforcers on different machines and they need to synchronize each other.

GopherJ commented 4 years ago

Not sure if: https://github.com/railgun-rs/actix-raft helps

GopherJ commented 4 years ago

It seems that we can try to use actix-raft first, here an example project I found:

https://github.com/oronsh/raftor

GopherJ commented 4 years ago

Let's start the work from here: https://github.com/casbin-rs/casbin-raft and try to implement it step by step so that casbin scales well