Forum Academy Marketplace Showcase Pricing Features

Planning recurring events : What could be the best option?

Hi Bubblers :wave:

**Every help, thoughts, ideas, adviseS on this will be very appreciated **

I have an event app launching next week. After some beta testing and demos with potential users, I am considering adding new features and need some advise on this.

The App :
This is an event app, where users can create and/or book events.
Events have different data fields (start and end date, number of participants, max number, etc.), have a list of options/parameters (paid/free, online/Irl, categories…) and have also lists (list of participants, lists of bookings…).

The problem :
For the purpose of my app and my company, I build the app considering only unique events (meaning happening one time only).
Though, an event could be duplicate easily by the event creators if he wants do do it again.

**I am now considering adding the ability to create recurring events, (meaning once it sets, it is available, bootable every day/weeks/or months during a time period ) and I am trying to figure out what would be the best database structure to allow it ?

Below are a few options I consider and limits I see. Please if anyone has experience in it or good advise / point of view, let me know !**

1. Adding List of dates and time
I could just add a field in the Events Data types with a list of date for each date the event will happen. This looks like the fastest and easiest option ! Just has to add dates based on rules defined by the user and with a time limit (one year for example).
But I see a number of limits here : cant change something for only one date/time, like number of participants, if it’s online or IRL, price, and so on. Would certainly limit things in time.´ for the event creator as something always happen.

**2. Create a master and it’s occurrence : **
I could change my initial data structure : create a « master event » with field that are not supposed to change in time (title, description…) and « occurrence » with everything that could be changed from time to time. So unique events has a list of 1 « occurrence » and recurring has a list of xxx occurrence…
This sounds pretty good! But when looking at my data, I think almost every field could potentially have the need to be modified by the events owner … so doesn’t really works because I would have almost nothing in the Master data Type.

**3. Duplicate the event x times through backend workflows : **
I ended up thinking the best way would definitely be this : when a user create a recurring event, I will let them set their rules (for example every week on Tuesday and friday) with of course some restrictions and a time limit. When the event is created, It launch a backend workflow to « duplicate » the event for each coming date, till the limit date.
So for example, it could be a recursive workflow creating the Tuesdays and Fridays event for the next 3 month.
Then, a month or so, prior to the last event, I could either email The user to ask him/her to set the date for the next months, or automatically do it with a schedule workflow that repeat the process : duplicate this event every tuesdays and fridays for the next 3 months…
I believe this last option is very powerfull and open full control for the user for each date/time, and would be exactly what I need to offer to my user, and the best solution regarding my actual data Structure.
My main concern for this is the size of the Data, and how it could affect performance and storage in the long run ?
If I have 100 users having 1 event happening 5 times a week, which is not that much, it’s 500 events/weeks, 2000/months.
Bubble could handle that this way ? Will it turn my data base into a big mess ? Will it slower the app ?

Thank you very much if you read this and have any ideas or comments

Cheers

1 Like

Hey there! we just published a plugin & guide for this:

If you give us an app name, we can have you try it out!

1 Like

Hey @banbimmo, after playing around what did you settle on ? I’m leaning towards a mix of 2 and 3 (a bunch of generated child events with a master that lists all the children and holds the recurrence parameters) but not sure what would be the most stable / light option.

@mike7 your app looks good ! Since your team has experience with the issue, same question : once you have the list of dates from your scheduler element, how do you advise structuring the database ? Any of @banbimmo’s methods or something else ?

Hey @alix.ladent, I’m going to loop in @Kayami, our more technical brain half to help you out here :slight_smile:

1 Like

@alix.ladent honestly it’s pretty simple. The plugin returns a list of bubble dates. You can then simply run Schedule API Workflow on a list and pass in the list that the plugin exposes.

Then for each item in the list, you can create the Thing that needs to be recurring. For example, in this demo we create an Event. This thing can hold all of the other data related to the event like location, title etc.

Cool ! So no master ?

I’m curious then, how would you advise to access the set of events later down the line ? If the user wants to change the rhythm of the recurrence or change the title, for example.

Hey @alix.ladent sorry for the late response, just saw this.

To change the rhythm of the recurrence you can simply delete the future events and generate a new list of dates. How exactly you do this depends on how your app is structured of course.

To change the name I’d just use Make changes to a list of things and change each Event thing’s title.

Scheduling and API workflow on a list of events is one way to do things, but it could also be resource intensive. With the new element that ships with my calendar Plugin, the Recurring event Generator, you can complete this action client side and save the list with one button push. No need to schedule an API or backend workflow to save the list