Replies: 3 comments 1 reply
-
This was one method that I found for the storage of the recurring events, and it provides utmost flexibility, but it has the problem that the same is not very database efficient and relies heavily on the SQL nature of event storage. |
Beta Was this translation helpful? Give feedback.
-
@EshaanAgg seems like a good idea to me.
|
Beta Was this translation helpful? Give feedback.
-
@EshaanAgg The articles and forums discussing this use case rely much on the relational heavy nature of SQL. like you said but the same will not work in mongoDB where JOIN operations are a nightmare and multiple DB requests would be very hard on the performance. We should not store each occurrence a its own event, it will become a nightmare to manage most of us can already visualise that. For MongoDB, the only data model "flexible " enough I could think of is probably storing the metadata of each occurrence of a recurring event into that event object itself and mapping the timestamp of the event occurrence to the const eventSchema = new Schema({
.... other fields ,
reccurrences_metadata : {[
occuranceTimeStamp: {
type:Date ,
} ,
occuranceEventProjects {[
.... Array of references to Event Projects model
]}
occuranceAttendees {[
.... Array of references to User model
]}
]}
}) This way we can query for timestamps a lot better in the graphql layer by querying for The updation for each occurrence can be also then customized according to each occurrence with a given timestamp. However, some extra care would be needed for changing the updation. I have not thought it through completely though what might the possible pitfalls this approach can fall into? |
Beta Was this translation helpful? Give feedback.
-
Currently, the API aims to provide support for recurring events so that users can easily make multiple events in a single go. But the same has not been implemented anywhere in our resolvers; thus, currently, the same is just using database space. To proceed with the implementation of the same, there are some common questions that we need to answer:
EventProjects
andAssignees
)WEEKLY
,MONTHLY
, andYEARLY
type recurrences enough, or do we need to provide support for recurrences of the typeEvery first Monday of every Month
(because just recurrences are very common for many communities).Tagging some potential contributors and mentors so that we can discuss the same, and make this part of API functional as it is one of the most critical features that we should be working on if we want Talawa's Event Management capabilities to be actually used by communities and people.
@palisadoes @xoldyckk @kb-0311 @anshgoyalevil @DMills27 @literalEval
Beta Was this translation helpful? Give feedback.
All reactions