-
Notifications
You must be signed in to change notification settings - Fork 51
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
[IMPROVEMENT] Improve the Send Reminder Notifications 2 Days Before Book Due Date Feature #58
Comments
Hey @ajaynegi45 I’d love to try my hands on this issue and see how I can contribute. Could you assign it to me? Looking forward to working on it! |
Hey @7vk, Thanks for showing interest in tackling this issue! I'd be happy to assign it to you, but before I do, could you walk me through how you plan to implement this feature in detail? Also, before jumping in, I recommend giving the Readme.md a thorough read. It'll help you get a solid grasp of the project's goals and purpose. Plus, check out the Contributing.md file for some handy guidelines that’ll make your contribution process smoother, especially if you're new around here. If you run into any questions or need help along the way, don’t hesitate to reach out! |
I suggest we create a separate entity to schedule reminders which would schedule the reminders when the book is borrowed. What do you think about this approach? your guidance would be much appreciated. |
Thank you for your suggestion, @7vk! Benefits of a Separate Reminder Entity1. Reduced Database LoadBy introducing a separate entity for scheduling reminders, we can avoid the need for daily scans of all borrowings, significantly cutting down the number of queries and reducing the strain on the database. Instead, we could query only the reminders that are due, leading to a more efficient process. 2. Improved PerformanceThis approach could make the system more scalable and performant, especially when handling a large volume of users and borrowings. Fewer and more targeted queries should result in noticeable improvements in speed and resource usage during the reminder process. Edge Cases to ConsiderTo ensure the robustness of this approach, we’ll need to manage certain key edge cases effectively: 1. Book Renewals or Due Date ChangesIf a user renews a book or if the due date changes for any reason, we need to ensure that the associated reminder is also updated. Failing to do so could result in sending incorrect reminders. Solution: 2. Book Returns Before the Due DateIf a user returns a book early, the corresponding reminder should be removed from the system to avoid sending unnecessary notifications. Solution: Additional Feature: Fine Calculation & Overdue Notifications1. Daily Notifications After Due Date PassesOnce the due date for a book passes, the system should automatically send daily notifications to the user, reminding them that the due date has passed and that a fine of Rs. 10 per day is accruing. This notification should also display the current fine amount until the book is returned. Solution: To avoid performance bottlenecks, we can batch-process overdue reminders in off-peak hours, sending notifications and calculating fines for all overdue books at once, ensuring that the process remains scalable even with a large user base. Next StepsI've assigned this issue to you and I'm confident that your approach will make the system more optimized, faster, and scalable. Be sure to document your code thoroughly using Javadoc comments to ensure clarity and maintainability. Feel free to reach out if you have any questions or need assistance as you proceed. Looking forward to seeing your implementation! |
@ajaynegi45 I'll get it done. If I need help with anything I'll reach out. |
Is this feature already requested?
Problem or Missing Functionality
The system currently sends reminder notifications 2 days before the book's due date by querying the database on daily basis to check for due books. This process may involve daily database queries, which can lead to performance inefficiencies.
Improvement Request
Optimize Database Queries:
Performance Enhancement:
Documentation:
Expected Outcome
The text was updated successfully, but these errors were encountered: