Hi all,

This is proposing to add transaction support API for Kerby backend for 
efficiency. Kerby provides various backends, some of them is file based, like 
the Json one. I'm attempting to add another one based on Google Flatbuffers 
format. Such backends based on simple file would be better to have transaction 
support for efficiency. In existing codes, every call to 
addIdentity/updateIdentity/deleteIdentity will require to write the memory 
buffer/states to the disk file, quite inefficiently.

For simple, it would be good enough to be:

1.       A backend instance allows only one transaction at a time;

2.       When it's in a transaction, any mutation operation via non-transaction 
API (existing one) will be denied;

3.       In a transaction, multiple mutation operations can be made via the new 
transaction API, and states are only updated to the memory, no store/save/flush 
to the disk file;

4.       When the transaction ends, the memory state will be persisted/synced 
to the disk file, then the update content will be visible to other backend 
instances if it reloads.

5.       For backends that use a system already supporting transaction, like 
Mavibot, LDAP and Zookeeper, the new transaction API will have default 
implementation that performs no-op.

I'd like to hold on some time for feedbacks before proceed, since I'm not 
expert for such system designs. I wish it to be practical, simple, efficiency, 
and easy to do.
Thanks.

Regards,
Kai

Reply via email to