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

[Core] Add interceptors for Attributes #107

Open
yuripourre opened this issue May 2, 2021 · 2 comments
Open

[Core] Add interceptors for Attributes #107

yuripourre opened this issue May 2, 2021 · 2 comments

Comments

@yuripourre
Copy link
Member

I have no idea how heavy it will be but we need a way to be updated if a certain concept gets updated.

Concepts could have a list of listeners (can be empty) that are updated/called when there is a change.

@yuripourre
Copy link
Member Author

yuripourre commented May 2, 2021

The problem with the suggested approach is that each null listener requires 4 bytes of memory.

One alternative is to keep the knowledge base immutable, add the interceptors to the knowledge base and everytime a concept is queried by the knowledge base it is wrapped in a way that those trackers are enabled.

The wrappers will have all the copied data from Concept and update the real data after changes.

@yuripourre
Copy link
Member Author

Another way to do it is to only update concepts through the Knowledge Base.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant