question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The current use of SyncedEnforcer can meet the multi-threaded situation, And is it possible for Casbin to support multi-process use in the future?

I try to modify on the basis of SyncedEnforcer. (The data mentioned below refers to the data in the memory)

  1. Modify _rwlock, replace the thread read-write lock with the process read-write lock;
  2. Multi-process data synchronization (addition, deletion and modification);

For 1, try to use the Redis module to replace the use of the RWLockWrite internal thread module. For 2, there can be multiple implementation methods:

  1. Consider rewriting Watcher, and modify the update method, internally use the form of message subscription publication for multi-process data synchronization;(No parameters are passed in watcher.update in the project)
  2. Use Redis as data storage to achieve data synchronization;

The above ideas were partially implemented and then interrupted. Because of insufficient personal ability, I felt that such implementation would cause the program to be complicated.

So I want to ask whether it will support multi-process use in the future, or Casbin is for multi-threaded service from the beginning.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hsluoyzcommented, Nov 23, 2022

@zhang-wujun we already have the official Redis watcher for PyCasbin, please use it: https://github.com/pycasbin/redis-watcher

0reactions
hsluoyzcommented, Feb 7, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Process Support Job Description | Velvet Jobs
Process support provides input on how to improve internal efficiencies; grow knowledge and be aware of best practices and market trends.
Read more >
Process Support - The Process Session #8 - The Leonardo Blog
The week's Process Session video session discusses process support - providing the support required to implement successful process-based ...
Read more >
How to Classify Your Processes to Structure Your Business ...
Support processes are enabling processes designed to assist the value-delivering core processes by providing the resources and infrastructure required by ...
Read more >
Business Process Support Specialist | Computer Science
Business Process Support Specialist. Job Description. POSITION SUMMARY: Responsible for meeting the support needs for the client(s) as they relate to the ...
Read more >
Process Support, llc | Franklin WI - Facebook
Process Support, llc, Franklin, Wisconsin. 3 likes. Professional Process Serving and document support in Milwaukee, Waukesha, Racine and Washington...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found