Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement automatic auditing of entities #142

Open
sai-pullabhotla opened this issue May 22, 2017 · 0 comments
Open

Implement automatic auditing of entities #142

sai-pullabhotla opened this issue May 22, 2017 · 0 comments
Assignees

Comments

@sai-pullabhotla
Copy link
Owner

sai-pullabhotla commented May 22, 2017

Implement automatic auditing of entities. Create a new annotation, @Audited, that can be specified on the entity classes. When this annotation is present, any WRITE operations of the entity should be logged to the Cloud Datastore. Also support another annotation, @NotAudited which can be specified on Entity Fields to not audit certain fields of the entity.

Auditing should store snapshots of the auditable fields of the entity in a separate entity. Each time an entity is inserted, updated, upserted or deleted, that affected entity should be stored to the audit table (Kind). When an entity is deleted, it is not required that all fields of the entity be stored to the audit table, just the entity ID is sufficient. The reason for this -

  1. Entities can be deleted by their ID/Key, which means the entity is not read from the Datastore.
  2. Deleted entity does not require its fields be logged, the previous audited entity should have the values.

For the initial version, auditing can be done synchronously (in the same thread that affected the entity), but also explore the options for auditing asynchronously, so the application threads are not locked while auditing.

@sai-pullabhotla sai-pullabhotla self-assigned this May 22, 2017
@sai-pullabhotla sai-pullabhotla added this to the 2.1.0 milestone May 22, 2017
@sai-pullabhotla sai-pullabhotla modified the milestones: 2.2.0, 2.1.0 Jun 20, 2017
@sai-pullabhotla sai-pullabhotla removed this from the 2.2.0 milestone Jul 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant