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

Querying the DB for next events #128

Merged
merged 9 commits into from
Sep 10, 2022

Conversation

harshit-sharma-gits
Copy link
Contributor

For issue: #122

The scope of this PR: To get the events-to-be-reminded in fEventList and manage it by adding/removing the events as per the requirement.

@harshit-sharma-gits
Copy link
Contributor Author

This commit is not complete yet. Currently, it only fetches the list from QueryDBManager and add events to the list when an event is added.

I am working on the attribute change and event removing.

Copy link

@nielx nielx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot to unpack. I did a first glance, but as you write, you still have to finish the work.

I do want to make clear that I will not approve a design where every individual node is going to be watched. This is not scalable. Even if it works for a little test data, you are going to run into limits if someone seriously uses the application.

I also don't really understand how this is supposed to work. There is an fEventList. You manually add things there, but you initialize it using a function in the QueryDBManager... Can you explain how it is supposed to work? What triggers changes? How will you determine what events to notify for next?

daemon/src/CalendarDaemon.h Outdated Show resolved Hide resolved
daemon/src/CalendarDaemon.cpp Outdated Show resolved Hide resolved
@harshit-sharma-gits
Copy link
Contributor Author

I do want to make clear that I will not approve a design where every individual node is going to be watched. This is not scalable. Even if it works for a little test data, you are going to run into limits if someone seriously uses the application.

Yes, we can leave this (the attribute part) for now with a note to work on this post GSoC (as I stated in the mail)

I also don't really understand how this is supposed to work. There is an fEventList. You manually add things there, but you initialize it using a function in the QueryDBManager... Can you explain how it is supposed to work? What triggers changes? How will you determine what events to notify for next?

QueryDBManager::GetEventsToNotify() fetches a list of event that are to be reminded, so I am using this to get the events list instead of making a function for it myself (code re-use).
The changes are triggered by Node Monitor, which we are using on the events directory. That is, if any entry is created/removed from the events directory, it triggers the daemon to "refresh" the events list.

The idea is to get the events list when the daemon is started and then node monitor the events directory to get the updates (adding/removing) which we can manually add/remove to/from the fEventList.
What we can alternately do is, in any case (event adding/removing) we can fetch for a fresh list of the events with the fDBManager->GetEventsToNotify() and update the fEventList. Would that be better option?

main/src/db/QueryDBManager.h Outdated Show resolved Hide resolved
@nielx
Copy link

nielx commented Sep 10, 2022

For issue: #122

The scope of this PR: To get the events-to-be-reminded in fEventList and manage it by adding/removing the events as per the requirement.

@nielx nielx merged commit da6c977 into HaikuArchives:master Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants