-
Notifications
You must be signed in to change notification settings - Fork 6
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
Proposal: Support for Block Bookings #299
Comments
I'm really excited about this proposal! So the I guess the more complicated part is working out how to specify this on the
|
:) Good catch on Yes for An alternative could be to use the existing I wonder if there might be another approach here that solves this slightly differently... hmm... |
I think Payload size probably won't be an issue, as even with 100 bookings, it's still less than 1,000 lines. I think you're right about avoiding nesting, it can cause lots of issues and makes the cancellation/modification flow much more complex. I like the idea for idTemplates, do you have an example of how this would work? |
Proposer
On behalf of School Space, Badminton England and Playfinder
Use Case
There is currently an implicit assumption that block bookings are handled in the same way as ad-hoc booking by the OpenActive specifications.
Block bookings generally happen several months in advance (e.g. 6 months in the future), where as ad-hoc bookings tend to happen only a few weeks in advance (e.g. only 2 weeks in the future).
Search for block booking availability generally happens with a particular day and time in mind, and a number of weeks.
Additionally there may be other differences between ad-hoc and block bookings, including pricing, duration of slot and even the type of slot itself. For example a block booking may be for a "half sports hall (containing 3 badminton courts)", whereas an ad-hoc booking is likely to be for "1 badminton court". Different booking rules and approval processes also often apply to both.
Proposal
Instead of treating both block bookings and ad-hoc bookings using the same data model, feeds and assumptions, they should be treated separately.
For example a dataset may contain:
IndividualFacilityUse
andSlot
IndividualFacilityUse
andBlockBookingSlotSchedule
So the
Slot
andBlockBookingSlotSchedule
feeds would be separated, and could both be linked to the sameIndividualFacilityUse
(thoughIndividualFacilityUse
s could also be separated for simplicity).A new type e.g.
BlockBookingSlotSchedule
would be defined to represent the potential block booking, withavailableDate
used to indicate which days of the block are available (orexceptDate
,startDate
andendDate
could be used instead for the inverse, which could simplify modelling but add complexity to implementation due to shifting startDates and the need for data processors to maintain schedule generation logic).Note
availableDate
is suggested instead of timespans here as it is likely simpler to process and reason about, and also simplifies the model. Additionally most organisations allow block bookings for 6 or 12 months in advance, so the maximum number of items in this array is small (26 or 52).BlockBookingSlotSchedule
would be booked together in the usual way (e.g. 2 hour contiguous booking = 4 x 30 minuteBlockBookingSlotSchedule
), as per openactive/open-booking-api#219.This representation should greatly reduce data volume in the feed, as a
BlockBookingSlotSchedule
is only updated each time a block booking is confirmed, so the volume of updates is roughly equal to the volume of bookings made. This is in contrast to theSlot
representation for this usecase, where a large number of updates are generated for each block booking made. Additionally this more compact representation also significantly reduces the volume of data in the feed (e.g. by a factor of 26 for 6-months of availability).For data users this format is also easier to process and query, as the data is organised according to the most common search request. It also allows the data to be easily displayed week-by-week in a GUI.
Example
An illustrative example of a
BlockBookingSlotSchedule
is as follows (note this is far from a final suggested modelling):The text was updated successfully, but these errors were encountered: