express-gateway icon indicating copy to clipboard operation
express-gateway copied to clipboard

E5/S1: Create RBAC with User CRUD endpoints

Open IrfanBaqui opened this issue 9 years ago • 8 comments

  • [x] Spec (if applicable)
  • [x] Implementation
  • [x] Tests
  • [ ] Code Review
  • [ ] Demo
  • [ ] Docs (if applicable)

IrfanBaqui avatar Apr 26 '17 16:04 IrfanBaqui

How can we link the consumer-management repo to waffle? Here is the PR: https://github.com/LunchBadger/consumer-management/pull/1

Will add more endpoints..

IrfanBaqui avatar May 02 '17 06:05 IrfanBaqui

add the following to the end of PR title: connect to lunchbadger/express-gateway#49

jimhw avatar May 02 '17 06:05 jimhw

It didn't work... are waffle boards confined to each repo?

IrfanBaqui avatar May 03 '17 02:05 IrfanBaqui

you should type "connect to" on the title, instead of "close"

jimhw avatar May 03 '17 14:05 jimhw

please provide readme with spec, usage and test.

jimhw avatar May 04 '17 16:05 jimhw

need code review after the restructuring need to create test for data persistent

jimhw avatar May 04 '17 18:05 jimhw

Here's the PR: https://github.com/LunchBadger/consumer-management/pull/2

It's rather long, but the functionality should be very straightforward looking at the specs.

IrfanBaqui avatar May 05 '17 05:05 IrfanBaqui

Regarding our conversation on data persistence, I think it's the user's/db-admin's responsibility to define how often they want to persist data to disk. There is an option in the config file where they can define it. Various things, such as whether they're operating a cluster or single instance, would define how often they want to save.

Invoking the BGSAVE command on each write is not recommended because Redis does point-in-time snapshops and not a diff between the last saved and current version. Now if users are using a single instance of redis for several data models, frequent snapshots can be costly on the resources.

Folks using redis in production should define a good architecture of their cluster themselves, in order to prevent data loss during outages. There are other ways of recovering data in case such as scanning log files... and users should be aware of that.

So, what we should offer is not frequent SAVES, but adequate logging so they can recover data in case of a failure or an option to trigger a user-defined callback in case of any db operations. That call-back can write to user's log files or store data in a secondary storage.

Here's a good read: https://redislabs.com/ebook/part-2-core-concepts/chapter-4-keeping-data-safe-and-ensuring-performance/4-1-persistence-options

@altsang @DrMegavolt @jimhw

IrfanBaqui avatar May 05 '17 05:05 IrfanBaqui