Synchronizing issues when several instances
See original GitHub issueDoes casbin support working in several application instances or does it provide an interface to implement such?
Problem
Let us say we have 2 instances of API: API 1
and API 2
.
Each of these instances have casbin enforcer inside the application.
So, we have casbin 1
in API 1
and casbin 2
in API 2
.
Each of them are looking in the same collection in database. But, considering the implementation of casbin, it stores permissions/roles in memory.
It leads to the problem that can be reproduced by the following scenario:
- Developer grants a role to a user via API call to
API 1
. API 1
does make changes incasbin 1
instance and adapter stores the changes in database- Though,
API 2
andcasbin 2
know nothing about recent change and use an out-of-date information fromcasbin 2
memory.
Any assumptions how it can be resolved?
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
On some synchronization problems with multiple instances
Many classical synchronization problems such as the assembly line crew scheduling problem (ALCS), some data association problems or ...
Read more >Syncing between multiple instances of the same program
The best way to talk between two instances of the same application is use IPC. Bellow see example of class that can be...
Read more >Multiple Instances without Synchronization - Workflow Patterns
Within a given process instance, multiple instances of a task can be created. These instances are independent of each other and run concurrently....
Read more >How to synchronize two Jira instances without being ruined!
In this article, you will learn how to have two Jira instances synchronizing issues between each other using the "Integrations Hub for Jira" ......
Read more >Synchronizing user configuration on multiple instances - Cleo
Collisions can occur if users on two synchronized systems both update an item at the same time. If the same item is updated...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@hsluoyz I got a permission from our CTO to publish an adapter. The adapter I wrote fully tested and already being used in production. Though, we can do that somewhere in January, I need time for cleaning up the code, make required preparations for open-source it.
That’s good news! Thank you for your support on Casbin 😃